Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering.

[RT 123470] Embedding Fonts

  • 0 Replies

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 364
    • View Profile
[RT 123470] Embedding Fonts
« December 25, 2017, 03:24:31 PM »
Tue Oct 31 16:43:54 2017 NHORNE [...] - Ticket created
Subject: Embedding Fonts

Some systems, such as prestoprint, require embedding of fonts. How do I embed these fonts into the output PDF?

  • Times-Bold
  • Times-Italic
  • Times-Roman

 PhilterPaper commented on Nov 2

I haven't tried it out yet, but TrueType support includes a -noembed option. Presumably it embeds a TT font unless you ask it not to. Perhaps this could be extended to other font types (Type1, at least). It's not clear whether core fonts can be embedded, as these fonts are normally installed with any reader.

The ability to embed fonts is an important part of PDF/A (RT 120375/#52).

Also discussed in

 PhilterPaper commented on Nov 3

Note that all fonts, not just core fonts, suffer from the issue of having different versions on the PDF producer's (writer) machine and the consumer's (reader) machine. There may be different glyph widths, affecting justification, and even missing or added glyphs. In addition, the use of single byte font planes (via the automap method) cannot be guaranteed to produce consistent results (even for core fonts), as there might be a different set of glyphs between the two machine's font files and metrics information. Thus, embedded fonts can solve this problem, at the cost of much larger PDF files.

Add: note that "core" fonts vary by implementation. There are 3 typefaces (Times, Helvetica, Courier) x 4 variants (Roman, Italic, Bold, Bold-Italic) plus 2 symbol typefaces for 14 basic core font files. Windows implementations may add another 15 or so font files. Implementations are free to replace a basic core font with another (with similar metrics). Thus, for a consistent look, it would indeed be very good to embed core fonts in a PDF document, unless there are copyright/licensing issues or space is very tight.

 PhilterPaper commented on Nov 11

With core fonts, in particular, only the CP-1252 (Latin-1+) glyphs and their widths are defined. This leads to non-Latin-1 glyphs getting the "missing width" assigned width, which is much too narrow and causes character overlap (see #7). Reading the font file for widths, and even better, embedding it in the PDF, should fix this problem.