PDFlib 8 Windows COM/.NET Tutorial
PDFlib 8 Windows COM/.NET Tutorial
PDFlib 8 Windows COM/.NET Tutorial
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
.tte .ttf .otf .gai .afm .pfm .ttc<br />
.TTE .TTF .OTF .GAI .AFM .PFM .TTC<br />
> If embedding is requested for a PostScript font, the following suffixes will be added to<br />
the font name and tried one after the other to find the font outline file:<br />
.pfa .pfb<br />
.PFA .PFB<br />
If no font file was found, font loading stops with the following error message:<br />
Font cannot be embedded (PFA or PFB font file not found)<br />
> All candidate file names above will be searched for »as is«, and then by prepending<br />
all directory names configured in the SearchPath resource category.<br />
This means that <strong>PDFlib</strong> will find a font without any manual configuration provided the<br />
corresponding font file consists of the font name plus the standard file name suffix according<br />
to the font type, and is located in one of the SearchPath directories.<br />
The following groups of statements will achieve the same effect with respect to locating<br />
the font outline file:<br />
p.set_parameter("FontOutline", "Arial=/usr/fonts/Arial.ttf");<br />
font = p.load_font("Arial", "unicode", "");<br />
and<br />
p.set_parameter("SearchPath", "/usr/fonts");<br />
font = p.load_font("Arial", "unicode", "");<br />
Standard CJK fonts. Acrobat supports various standard fonts for CJK text; see Section<br />
6.5.1, »Standard CJK Fonts«, page 172, for more details and a list of font names. <strong>PDFlib</strong> will<br />
find a standard CJK font at the very beginning of the font search process if all of the following<br />
requirements are met:<br />
> The specified font name matches the name of a standard CJK font;<br />
> The specified encoding is the name of one of the predefined CMaps;<br />
> The embedding option was not specified.<br />
If one or more of these requirements is violated the font search will be continued. Standard<br />
CJK fonts found in the internal list are never embedded. In order to embed one of<br />
these you must configure a font outline file. Example:<br />
font = p.load_font("KozGoPro-Medium", "90msp-RKSJ-H", "");<br />
Type 3 fonts. Type 3 fonts must be defined at runtime by defining the glyphs with<br />
standard <strong>PDFlib</strong> graphics functions (see Section 5.1.5, »Type 3 Fonts«, page 119). If the<br />
font name supplied to begin_font( ) matches the font name requested with load_font( )<br />
the font will be selected at the beginning of the font search (assuming that the font<br />
name didn’t match the name of a standard CJK font). Example:<br />
p.begin_font("<strong>PDFlib</strong>LogoFont", 0.001, 0.0, 0.0, 0.001, 0.0, 0.0, "");<br />
...<br />
p.end_font();<br />
...<br />
font = p.load_font("<strong>PDFlib</strong>LogoFont", "logoencoding", "");<br />
5.4 Loading Fonts 135