Previous Next
438
CHAPTER 5 Text
For Type 0, the CIDFont program contains glyph descriptions that are identified
by CIDs. The CIDFont program identifies the character collection by a
CIDSystemInfo dictionary, which should simply be copied into the PDF CIDFont
dictionary. CIDs are interpreted uniformly in all CIDFont programs supporting a
given character collection, whether the program is embedded in the PDF file or
obtained from an external source.
When the CIDFont contains an embedded font program that is represented in
the Compact Font Format (CFF), the FontFile3 entry in the font descriptor (see
Table 5.23) can be CIDFontType0C or OpenType. There are two cases, depending
on the contents of the font program:
• The “CFF” font program has a Top DICT that uses CIDFont operators: The CIDs
are used to determine the GID value for the glyph procedure using the charset
table in the CFF program. The GID value is then used to look up the glyph pro-
cedure using the CharStrings INDEX table. Although in many fonts the CID val-
ue and GID value are the same, the CID and GID values may differ.
• The “CFF” font program has a Top DICT that does not use CIDFont operators:
The CIDs are used directly as GID values, and the glyph procedure is retrieved
using the CharStrings INDEX.
For Type 2, the CIDFont program is actually a TrueType font program, which has
no native notion of CIDs. In a TrueType font program, glyph descriptions are
identified by glyph index values. Glyph indices are internal to the font and are not
defined consistently from one font to another. Instead, a TrueType font program
contains a “cmap” table that provides mappings directly from character codes to
glyph indices for one or more predefined encodings.
TrueType font programs are integrated with the CID-keyed font architecture in
one of two ways, depending on whether the font program is embedded in the
PDF file:
• If the TrueType font program is embedded, the Type 2 CIDFont dictionary
must contain a CIDToGIDMap entry that maps CIDs to the glyph indices for the
appropriate glyph descriptions in that font program.
• If the TrueType font program is not embedded but is referenced by name, the
Type 2 CIDFont dictionary must not contain a CIDToGIDMap entry, since it is
not meaningful to refer to glyph indices in an external font program. In this
case, CIDs do not participate in glyph selection, and only predefined CMaps
Previous Next