PDF and fonts

When a PDF is displayed (such as in the Adobe Reader®) text is rendered using one or more fonts. The application must select fonts based on information encoded in the PDF. If the font chosen matches the one that TopLeaf used when composing the pages, the user will see the text exactly as laid out by TopLeaf. If an exact match can’t be found, the application will typically try to use a font similar to the original one. The results in such a situation are hard to predict — at best the text will be indistinguishable from the intended appearance; at worst it will be illegible. When delivering PDF documents, it is therefore prudent to ensure that you know exactly which fonts will be used to render the text.

There are two basic strategies for ensuring that the correct font is used:

  • Use fonts that you know will be installed or available on every computer that will be used to display the PDF.

  • Include the font information in the PDF so it will always be available. This is also known as embedding the font in the PDF.

The PDF specification requires that all PDF applications include a number of “standard” fonts. This means that if you restrict your mappings to use only the typefaces Times, Arial and Courier you can be confident that the PDF will always use the correct font, and there is no need to worry about font embedding. If you look at the standard font configuration, you’ll notice that the fonts for these typefaces are set to “never embed” to reflect this fact.

While it might seem that the safest strategy would be to embed every font, it’s worth noting that font descriptions are typically quite large, and can therefore have a significant effect on the size of the resulting PDF.

Font embedding is controlled by both the PDF profile chosen when the PDF is created, and by the font configuration settings for the fonts used during composition. Regardless of the settings, however, if characters outside the 8-bit “standard Latin” character set defined by the PDF standard are rendered using the font, then all or part of the font will be embedded. This is to ensure portability of the PDF (the PDF standard predates unicode, and has no intrinsic method for representing all of the Unicode characters).

While many fonts can be freely used, some must only be used within the terms of the manufacturer’s licence. These terms may prohibit the embedding of a font in a PDF, since this may allow a recipient of the PDF to use the font without compensating the manufacturer. TrueType fonts can include information about whether a font may be embedded; TopLeaf will not embed a font if this information indicates that embedding is not permitted.

[Note] Note

There is no need to embed any fonts that correspond to the PDF “standard” fonts. However, some PDF consumers, or those with older applications, may insist that you embed all fonts in PDFs. In this case, use a PDF profile with the “embed always” option selected.

Selecting this option forces the PDF to embed the local TrueType fonts into the PDF, and to use them rather than the standard fonts.