Correcting problems using Xprint with Mozilla Mail 1.7.2 : wrong font typeface

Jay Smith <[email protected]> Sun, 19 Sep 2004 23:55:56 -0400
Newsgroups gmane.comp.mozilla.devel.prefs
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
This is a bit of a cross-post from the mail-news group, but last month 
somebody posted on this group regarding a similar subect.  This may be of 
interest to a number of people for differing reasons.....


The answer has been found by *Jan Willem Stumpel* and has just been
published on his website: http://www.jw-stumpel.nl/stestu.html#T9 within
the last couple days.

Jan publishes two important fixes for using Xprint with Mozilla:

The first concerns problems printing the page headers/footers (missing
spaces, missing numerals, etc.) [Jan published this information some time
ago.]  This is fixed by moving aside an xprint font file.

The second concerns the incorrect proportional font used when printing mail
messages (should be fixed-width font).

The solution is to add to (or add entirely) the userContent.css file that
may be in the chrome directory -- on some installations, there may be an
example file that should be renamed to userContent.css.

In case his website should disappear, here is the content for the CSS file
that Jan publishes on his website -- all the credit is to Jan; I am just a
messenger.

The key for the mail body font problem is the .moz-text-plain bit.

userContent.css

@media print {
    body, table {
        color: black;
        font-family: 'Times New Roman', times, serif;
        font-size: 12pt;
    }
    tt, pre {
        font-family: 'Courier New', courier, typewriter, monospace;
    }
    :lang(zh) {
        font-family: 'Ar PL SungtiL GB';
    }
    :lang(ja) {
        font-family: 'MS Mincho', 'MS Gothic';
    }
    :lang(ko) {
        font-family: 'Baekmuk Batang';
    }
    :link, :visited {
        color: black !important;
        text-decoration: underline !important;
    }
    .moz-text-plain {
        font-family: 'Courier New',courier,monospace !important;
    }
}

Jay Smith said the following on 09/13/2004 01:19 PM:
> I upgraded from Mozilla 1.6 to 1.7.2 a week ago. We are running on 
> RedHat 8 Linux.  At the same time, Xprint was installed and turned on.  
> We are almost forced to use Xprint because of incompatibilities in our 
> environment, running Mozilla LINUX through Cygwin displaying X on 
> Windows 95 (yes, I know...), if we use kprinter with the native mozilla 
> printing, our Cygwin/X environment crashes.  Xprint does not seem to 
> have that problem.
> 
> So, the problem is... with the font / typeface that prints when we print 
> mail use Xprint.
> 
> The message body font is san-serif, proportional-spaced.  That is NOT 
> what we want.  (The header font is also the same, but I don't really 
> care about that.)
> 
> We a want serif (courier), fixed-spaced font for printing mail, so 
> columns of number will print in columns, etc.
> 
> Our preferences are clearly set to use Courier.  I have tried changing 
> those settings and then changing them back, with no result.
> 
> When I try printing with the native mozilla postscript printing through 
> kprinter/cups, the printing IS correct -- serif/courier, fixed width.
> 
> The problem only occurs using Xprint.  All our users have the identical 
> problem since this "upgrade" to 1.7.2 from 1.6.
> 
> I have not been able to find anything on bugzilla.mozilla.org about this 
> -- other than my comment in another thread.  I found a vague reference 
> on bugzilla.freedesktop.org that pointed to a website that I had already 
> found via Google.  On that website, the author explained a) how to fix 
> the page header printing problems (missing numbers, missing spaces) when 
> using xprint and b) that he was aware of the font/typeface problem and 
> and did not know of any solution.
> 
> I have not been able to find anything in the about:config that obviously 
> addresses this.  If it is there, please help me out.
> 
> Thanks.
> 
> Jay