Forum How do I...?

How to disable font embedding?

Lynx
To reduce size of PDF output sometimes I prefer to avoid font embedding.
I tried --no-embed-fonts option but it did not prevent embedding (Prince issues warning like: Embedding "Arial Unicode MS, Regular").
Maybe the option was renamed to something else?
mikeday
When font embedding is disabled it is not possible to include glyphs from arbitrary UNICODE characters in the PDF file, only basic latin characters from the Adobe MacRoman subset of UNICODE can be used.

If you use other characters in your XML such as mathematical operators or Chinese characters, then Prince will be forced to embed the font despite your request not to, which is why it prints a warning message to let you know.
Lynx
OK, thanks for info.
mikeday
Today we have released Prince 6.0 rev 4, which includes support for TrueType font subsetting. This greatly reduces the size of generated PDF files by only embedding the glyphs from the font that are actually needed.
Lynx
Excellent! Many thanks :)
tarquinwj
Note that Prince sometimes adds characters in using the default stylesheet, that force it to embed fonts. For example, a nested list:

<ul><li><ul><li>foo</li></ul></li></ul>


The default stylesheet uses a 'circle' for the list marker, which forces prince to embed a font, even if the text in the document refrains from using such characters. You can override this using CSS to reset it to a character that does not need an embedded font:

li ul > li { list-style-type: disc; }