Previous Next


                                          468
CHAPTER 5                                                                          Text



As noted in Table 5.23, a Type 1–equivalent font program or a Type 0 CIDFont
program can be represented in the Compact Font Format (CFF). The Length1,
Length2, and Length3 entries are not needed in that case. Although CFF enables
multiple font or CIDFont programs to be bundled together in a single file, an em-
bedded CFF font file in PDF must consist of exactly one font or CIDFont (as ap-
propriate for the associated font dictionary).

Note: According to the Adobe Type 1 Font Format specification, a Type 1 font pro-
gram may contain a PaintType entry specifying whether the glyphs’ outlines are to
be filled or stroked. For fonts embedded in a PDF file, this entry is ignored; the deci-
sion whether to fill or stroke glyph outlines is entirely determined by the PDF text
rendering mode parameter (see Section 5.2.5, “Text Rendering Mode”). This also
applies to Type 1 compact fonts and Type 0 compact CIDFonts.

A TrueType font program may be used as part of either a font or a CIDFont.
Although the basic font file format is the same in both cases, there are different
requirements for what information must be present in the font program. The fol-
lowing TrueType tables are always required: “head,” “hhea,” “loca,” “maxp,” “cvt ,”
“prep,” “glyf,” “hmtx,” and “fpgm.” If used with a simple font dictionary, the font
program must additionally contain a “cmap” table defining one or more encod-
ings, as discussed in “Encodings for TrueType Fonts” on page 429. If used with a
CIDFont dictionary, the “cmap” table is not needed, since the mapping from
character codes to glyph descriptions is provided separately.

Note: The “vhea” and “vmtx” tables that specify vertical metrics are never used by a
PDF consumer application. The only way to specify vertical metrics in PDF is by
means of the DW2 and W2 entries in a CIDFont dictionary.

Beginning with PDF 1.6, font programs may be embedded using the OpenType
format, which is an extension of the TrueType format that allows inclusion of font
programs using the Compact Font Format (CFF). It also allows inclusion of data
to describe glyph substitutions, kerning, and baseline adjustments. In addition to
rendering glyphs, applications can use the data in OpenType fonts to do advanced
line layout, automatically substitute ligatures, provide selections of alternate
glyphs to users, and handle complicated writing scripts.

Like TrueType, OpenType font programs contain a number of tables, as defined
in the OpenType Font Specification (see the Bibliography). For OpenType fonts
based on TrueType, the “glyf ” table contains the glyph descriptions. For Open-
Type fonts based on CFF, the “CFF” table is a complete font program containing

Previous Next