Forum How do I...?

Disable system fonts

pkmiec
I've been generating lot of pdf's using prince for many years. It's great! However, from time to time there is a change that inadvertently affects the pdf (and I do not realize it until customers complain). So I'm trying to avoid this by having our CI generate all the pdfs and compare them to the expected pdfs (btw, using i-net PDF content comparer which works great so far).

The problem is that all of the development occurs on Mac OS X and all of the production system (including CI) are CentOS. So the expected pdf is generated on OS X and CI generates pdfs on CentOS. On OS X, prince scans the fonts and finds ways to display all kinds of utf8 characters (for example, for Chinese characters it uses the LiHei Pro). On CentOS, the installed fonts are very limited and so often you get all of these "no glyphs for character" lines. So clearly a pdf with chinese character will not match a pdf with ?. Also, in general, I'm not really interested in supporting utf8 characters in pdfs ... latin1 will do.

Finally the question :),

I already supply prince with font.css which has all the mscorefonts and a micr font. Is there a way to force prince to only that set of fonts? Or turn off scanning system fonts?
mikeday
Yes, use "--no-system-fonts" on the command-line.