Previous Next


                                         430
CHAPTER 5                                                                        Text



application needs to select glyph descriptions by name, it translates from glyph
names to codes in one of the encodings given in the font program’s “cmap” table.
When there is no character code in the “cmap” that corresponds to a glyph name,
the “post” table is used to select a glyph description directly from the glyph name.

Because some aspects of TrueType glyph selection are dependent on the consum-
er implementation or the operating system, PDF files that use TrueType fonts
should follow certain guidelines to ensure predictable behavior across all applica-
tions:

• The font program should be embedded.
• A nonsymbolic font should specify MacRomanEncoding or WinAnsiEncoding
  as the value of its Encoding entry, with no Differences array.
• A font that is used to display glyphs that do not use MacRomanEncoding or
  WinAnsiEncoding should not specify an Encoding entry. The font descriptor’s
  Symbolic flag (see Table 5.20) should be set, and its font program’s “cmap” table
  should contain a (1, 0) subtable. It may also contain a (3, 0) subtable; if present,
  this subtable should map from character codes in the range 0xF000 to 0xF0FF
  by prepending the single-byte codes in the (1, 0) subtable with 0xF0 and map-
  ping to the corresponding glyph descriptions.

Note: Some popular TrueType font programs contain incorrect encoding informa-
tion. Implementations of TrueType font interpreters have evolved heuristics for deal-
ing with such problems; those heuristics are not described here. For maximum
portability, only well-formed TrueType font programs should be used in PDF files.
Therefore, a TrueType font program in a PDF file may need to be modified to con-
form to the guidelines described above.

The following paragraphs describe the treatment of TrueType font encodings be-
ginning with PDF 1.3, as implemented in Acrobat 5.0 and later viewers. This in-
formation does not necessarily apply to earlier versions or implementations.

If the font has a named Encoding entry of either MacRomanEncoding or
WinAnsiEncoding, or if the font descriptor’s Nonsymbolic flag (see Table 5.20) is
set, the viewer creates a table that maps from character codes to glyph names:

• If the Encoding entry is one of the names MacRomanEncoding or WinAnsiEn-
  coding, the table is initialized with the mappings described in Appendix D.

Previous Next