[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

A trick to make xprint work much better in Mozilla on Debian



The problem with xprint (on Debian) seems to be that it cannot always
find its fonts. If a web page says explicitly which fonts it wants to
use, xprint works OK; but if it doesn't, you get the weirdest results,
especially after doing anything with (or even just looking at) the
Preferences, Appearance, Fonts menu in Mozilla.

This is a trick to improve printing in Mozilla/xprint: go to the Mozilla
"chrome" directory (this is somewhere deep inside inside
/.mozilla/default). There is a file called userContent-example.css.
Rename this to userContent.css, and edit it, adding at the end:

@media print {
         body {
             color: black;
             font-family: 'Times New Roman', times, serif;
             font-size: 12pt;
         }
         tt, pre {
             font-family: 'Courier New', courier, typewriter, monospace;
         }
         :link, :visited {
             color: black !important;
             text-decoration: underline !important;
         }
}

This tells xprint/Mozilla that in the absence of explicit orders from a
website, something like Times New Roman should be used as the default
font, and something like Courier New for the monospaced font. It sets
the default print size at 12 points, and specifies that links should be
printed in black (instead of the default blue, which often looks rather
anemic on black and white printers). With this, for the first time in
ages, I could print the Debian home page (http://www.debian.org/)
correctly. And now I can change Moz's font preferences without messing
up printing.

Regards, Jan




Reply to: