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 or logging in.

[RT 123470] Embedding Fonts

  • 2 Replies
  • 750 Views
*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
[RT 123470] Embedding Fonts
« December 25, 2017, 03:24:31 PM »
Tue Oct 31 16:43:54 2017 NHORNE [...] cpan.org - 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 https://www.catskilltech.com/forum/pdf-builder-general-discussions/font-families/

 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.

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: [RT 123470] Embedding Fonts
« Reply #1: June 28, 2018, 02:49:28 PM »
Sat Jun 02 18:02:37 2018 The RT System itself - Status changed from 'new' to 'open'
#
Sat Jun 02 18:02:38 2018 steve [...] deefs.net - Status changed from 'open' to 'resolved'

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 417
    • View Profile
Re: [RT 123470] Embedding Fonts
« Reply #2: September 14, 2018, 01:33:39 PM »
Note that this ticket is closed as resolved on the PDF::API2 queue, but is still open here. I think the whole subject of embedding fonts in a better manner (code and documentation) is a good one, so I will leave this ticket open as a placeholder, even though the original question has already been answered (more or less).