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 130041] Warn that fonts are not embedded by default

  • 4 Replies
  • 81 Views
*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 582
    • View Profile
Wed Jul 10 22:07:18 2019 jidanni [...] jidanni.org - Ticket created

User searches for the word "embed" and finds only
Quote
       -noembed
            Disables embedding of the font file.

so assumes fonts are embedded by default.

Alas it turns out for cjkfonts no embedding is possible, which the user will only find out too late when he is already at the printing company...

[Verify, and clarify documentation as necessary.]

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 582
    • View Profile
Re: [RT 130041] Warn that fonts are not embedded by default
« Reply #1: July 12, 2019, 10:29:52 AM »
Fri Jul 12 10:21:02 2019 PMPERRY@cpan.org - Correspondence added

Hmm. Some day I'll have to deep dive into the PDF::Builder code and see what makes CJK fonts so different from other (TTF/OTF) fonts, and why they can't be embedded. Ditto for 130040 (can't synthesize a font from CJK). That's assuming that it's not a simple oversight, and that the .data files are still a significant difference.

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 582
    • View Profile
Re: [RT 130041] Warn that fonts are not embedded by default
« Reply #2: July 12, 2019, 07:02:45 PM »
Fri Jul 12 11:32:25 2019 jidanni [...] jidanni.org - Correspondence added

(Non-embedded looks great at home, no matter what browser, viewer, etc. but once you get to town... surprise surprise :-( ).

Fri Jul 12 11:38:35 2019 jidanni [...] jidanni.org - Correspondence added

Well for anybody reading this, be sure to
Code: [Select]
$ pdftocairo -pdf non_embedded.pdf embedded.pdfbefore sending your document to anybody important!

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 582
    • View Profile
Re: [RT 130041] Warn that fonts are not embedded by default
« Reply #3: July 14, 2019, 06:03:04 PM »
Sun Jul 14 16:16:11 2019 jidanni [...] jidanni.org - Correspondence added

I also note that sometimes the (pdfcairo) embedded font version of a PDF is smaller than the non-embedded font version!
Code: [Select]
  -rw-r--r--  1  84267 07-14 19:16 guihua.pdf
  -rw-r--r--  1 114732 07-14 19:16 guihua.pdf.non_embedded

[pdfcairo is a tool to convert PDF to many graphics formats. apparently with -pdf it embeds fonts in a PDF.]

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 582
    • View Profile
Re: [RT 130041] Warn that fonts are not embedded by default
« Reply #4: August 05, 2019, 06:13:47 PM »
Documentation has been clarified on when and how font file embeds are done. Only ttfont does embedding (not cjkfont, nor the others). It is often possible (with recent vintage OTF files) to use ttfont instead of cjkfont to produce CJK text. In addition, a bug in handling CFF OTF and TTF files was fixed, where the font file was always embedded (yet unusable) even when -noembed=>1.

Closing. This is in release 3.016.