in reply to Re: PDF::Create Fonts
in thread PDF::Create Fonts

The reason that PDF::Create doesn't support non-base fonts is simply that it doesn't have the code to embed them...

But there's no requirement that non-base fonts be embedded, is there? Surely you can specify any font you like, and if it's not available, your PDF reader will simply substitute something else. This would be perfectly adequate for many purposes -- particularly when PDFs are going to be used within a corporate network where it's known which fonts will be available, or where the desired font is an extremely common one that's overwhelmingly likely to be available (e.g. one of the Microsoft web fonts).

It's also what Adobe Acrobat itself does rather readily when creating PDFs, if the number of documents I get to read in glorious Adobe Serif is anything to go by ... ;)

Replies are listed 'Best First'.
Re^3: PDF::Create Fonts
by almut (Canon) on Apr 11, 2009 at 00:24 UTC
    But there's no requirement that non-base fonts be embedded, is there?

    Yes and no.  For one, there's substitution by name, e.g. Arial <-> Helvetica, etc. However, unless their visual appearance, and in particular the individual character widths are quite similar, the results may be poor.

    Then, there's font emulation. For example, Adobe Reader comes with two Multiple Master fonts (Adobe Sans, Adobe Serif), which are used to emulate fonts whose glyphs aren't available. However, as the technique essentially uses linear interpolation (without any info about the original font except basic data like character widths, boldness, slant, etc.), it's never really the typeface originally intended, although the results can look pretty decent.  Moreover, in order to get decent results with this technique, at least the font description and the character widths for the non-base font would have to be embedded, which PDF::Create doesn't do either...

    In short, if you want precise results, there's no way around embedding the font including the appropriate glyph subset.

    Other than those technical details, I was under the impression the OP wanted a very specific font. If s/he had been happy with some substitute for whatever sans-serif font, s/he might just as well have left Helvetica as it was (which already is sans-serif). But maybe I've misread the intentions...