10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Legal aspects of font embedding. It’s important to note that mere possession of a fontfile may not justify embedding the font in PDF, even for holders of a legal font license.Many font vendors restrict embedding of their fonts. Some type foundries completelyforbid PDF font embedding, others offer special online or embedding licenses for theirfonts, while still others allow font embedding provided subsetting is applied to the font.Please check the legal implications of font embedding before attempting to embedfonts with PDFlib. PDFlib will honor embedding restrictions which may be specified in aTrueType or OpenType font. If the embedding flag in a TrueType font is set to noembedding 1 , PDFlib will honor the font vendor’s request, and reject any attempt at embeddingthe font.5.3.4 Font SubsettingIn order to decrease the size of the PDF output, PDFlib can embed only those charactersfrom a font which are actually used in the document. This process is called font subsetting.It creates a new font which contains fewer glyphs than the original font, and omitsfont information which is not required for PDF viewing. Note, however, that Acrobat’sTouchUp tool will refuse to work with text in subset fonts. Font subsetting is particularlyimportant for CJK fonts. PDFlib supports subsetting for the following types of fonts:> TrueType fonts> OpenType fonts with PostScript or TrueType outlines> Type 3 fonts (special handling required, see below)When a font for which subsetting has been requested is used in a document, PDFlib willkeep track of the characters actually used for text output. There are several controls forthe subsetting behavior:> The default subsetting behavior is controlled by the autosubsetting parameter. If it istrue, subsetting will be enabled for all fonts where subsetting is possible (exceptType 3 fonts which require special handling, see below). The default value is true.> If autosubsetting=true: The subsetlimit parameter contains a percentage value. If adocument uses more than this percentage of glyphs in a font, subsetting will be disabledfor this particular font, and the complete font will be embedded instead. Thissaves some processing time at the expense of larger output files:p.set_value("subsetlimit", 75); /* set subset limit to 75% */The default value of subsetlimit is 100 percent. In other words, the subsetting optionrequested at PDF_load_font( ) will be honored unless the client explicitly requests alower limit than 100 percent.> If autosubsetting=true: The subsetminsize parameter can be used to completely disablesubsetting for small fonts. If the original font file is smaller than the value ofsubsetminsize in KB, font subsetting will be disabled for this font.> If autosubsetting=false, but subsetting is desired for a particular font nevertheless,the subsetting option must be supplied to PDF_load_font( ):font = p.load_font("WarnockPro", "winansi", "subsetting");Embedding and subsetting TrueType fonts. If a TrueType font is used with an encodingdifferent from winansi and macroman it will be converted to a CID font for PDF out-1. More specifically: if the fsType flag in the OS/2 table of the font has a value of 2.5.3 Locating, Embedding and Subsetting Fonts 107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!