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.

font = p.load_font("Times-Roman", "unicode", "");Host fonts. If the font name matches the name of a system font (also known as a hostfont) on Windows or Mac it will be selected. See Section 5.3.2, »Host Fonts on Windowsand Mac«, page 103, for more details on host fonts. Example:font = p.load_font("Verdana", "unicode", "");On Windows an optional font style can be added to the font name after a comma:font = p.load_font("Verdana,Bold", "unicode", "");Host font names can be encoded in ASCII. On Windows Unicode can also be used.Extension-based search for font files. If PDFlib couldn’t find any font with the specifiedname it will loop over all entries in the SearchPath resource category, and add allknown file name suffixes to the supplied font name in an attempt to locate the fontmetrics or outline data. The details of the extension-based search algorithm are as follows:> The following suffixes will be added to the font name, and the resulting file namestried one after the other to locate the font metrics (and outline in the case of True-Type and OpenType fonts):.ttf .otf .afm .pfm .ttc .tte.TTF .OTF .AFM .PFM .TTC .TTE> If embedding is requested for a PostScript font, the following suffixes will be addedto the font name and tried one after the other to find the font outline file:.pfa .pfb.PFA .PFB> All trial file names above will be searched for »as is«, and then by prepending all directorynames configured in the SearchPath resource category.This means that PDFlib will find a font without any manual configuration provided thecorresponding font file consists of the font name plus the standard file name suffix accordingto the font type, and is located in one of the SearchPath directories.The following groups of statements will achieve the same effect with respect to locatingthe font outline file:p.set_parameter("FontOutline", "Arial=/usr/fonts/Arial.ttf");font = p.load_font("Arial", "unicode", "");andp.set_parameter("SearchPath", "/usr/fonts");font = p.load_font("Arial", "unicode", "");5.3.2 Host Fonts on Windows and MacOn Mac and Windows systems PDFlib can access TrueType, OpenType, and PostScriptfonts which have been installed in the operating system. We refer to such fonts as hostfonts. Instead of manually configuring font files simply install the font in the system(usually by dropping it into the appropriate directory), and PDFlib will happily use it.5.3 Locating, Embedding and Subsetting Fonts 103

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

Saved successfully!

Ooh no, something went wrong!