• Fonts in PDF

    From Stefan Ram@21:1/5 to All on Sun Mar 31 10:08:29 2024
    I have generated a PDF file using a program where I have requested a
    certain font. Now, the PDF file is indeed being shown with that font.

    So, now I wonder/worry: If this special font is part of my PDF file,
    do I need a license for this font before I am allowed to give the file
    to someone else?

    As a special technical detail: All the PDF viewers I have
    installed do not show me the fonts used in a document and
    whether they are embedded or not. How could I get this
    information for a given PDF file? TIA!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Stefan Ram on Sun Mar 31 12:18:51 2024
    ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
    I have generated a PDF file using a program where I have requested a
    certain font. Now, the PDF file is indeed being shown with that font.

    After looking at the decoded streams in the PDF file, I found indeed:

    |2006 Microsoft Corporation. All Rights Reserved. Georgia is
    |either a registered trademark or a trademark of Microsoft
    |Corporation in the United States and/or other countries.
    |Microsoft Georgia Bold Version 5.00 Georgia-Bold Carter &
    |Cone Matthew Carter You may use this font as permitted by the
    |EULA for the product in which this font is included to
    |display and print content. You may only (i) embed this font
    |in content as permitted by the embedding restrictions
    |included in this font; and (ii) temporarily download this
    |font to a printer or other output device to help print
    |content.

    . So it seems that the PDF generator has embedded Georgia.

    I wonder whether I can now process the PDF to remove this embedding
    and use the Georgia font at the reader's site (if available)?

    Is there a list of fonts that are always available for PDF and
    do not need to be embedded?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Stefan Ram on Sun Mar 31 13:28:40 2024
    ram@zedat.fu-berlin.de (Stefan Ram) schrieb oder zitierte:
    Is there a list of fonts that are always available for PDF and
    do not need to be embedded?

    Yes. There are 14 standard font, like "Times". But even if
    I use "Times", my PDF creator will still embed it. I also
    tried the name "Times-Roman".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Stefan Ram on Sun Mar 31 13:31:07 2024
    ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
    Yes. There are 14 standard font, like "Times". But even if
    I use "Times", my PDF creator will still embed it. I also
    tried the name "Times-Roman".

    Or I would like to learn about fonts which clearly allow their
    embedding for free.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Stefan Ram on Sun Mar 31 23:53:15 2024
    On 2024-03-31 14:18, Stefan Ram wrote:
    Is there a list of fonts that are always available for PDF and
    do not need to be embedded?

    Very few fonts, 4 or 6; I had that list, but they stopped being useful because modern software can't use them (LibreOffice).


    In Linux, pdffonts tells you that information:

    cer@Telcontar:~/Documents> pdffonts fonts.pdf
    name type encoding emb sub uni object ID
    ------------------------------------ ----------------- ---------------- --- --- --- ---------
    BAAAAA+LiberationSerif TrueType WinAnsi yes yes yes 24 0
    Times-Roman Type 1 WinAnsi no no no 40 0
    DAAAAA+LiberationSans TrueType WinAnsi yes yes yes 34 0
    Helvetica Type 1 WinAnsi no no no 43 0
    NimbusSanL-Regu Type 1 Builtin yes no yes 39 0
    GAAAAA+LiberationMono TrueType WinAnsi yes yes yes 29 0
    Courier Type 1 WinAnsi no no no 42 0
    Symbol Type 1 Symbol no no no 41 0
    cer@Telcontar:~/Documents> pdffonts fonts.pdf


    Look at the column "emb".

    The fonts names in LibreOffice were "Times", "Helvetica", "Symbol". They were called "printer fonts", I think.

    Ah, found and old email from 2008, when I asked about them:

    +++---------------------------------
    ,----[ Base 14 Fonts ]
    | 1. Times-Roman
    | 2. Times-Italic
    | 3. Times-Bold
    | 4. Times-BoldItalic
    | 5. Helvetica
    | 6. Helvetica-Oblique
    | 7. Helvetica-Bold
    | 8. Helvetica-BoldOblique
    | 9. Courier
    | 10. Courier-Oblique
    | 11. Courier-Bold
    | 12. Courier-BoldOblique
    | 13. Symbol
    | 14. ZapfDingbats
    `----

    These are the fonts that are guaranteed to come with every Postscript
    printer originally are in the postscript specs. The are mapped to a set
    of cloned fonts (donated by URW) by Ghostscript for printing. ---------------------------------++-

    +++---------------------------------
    There is also an extended set (also mapped to URW fonts by Ghostscript)
    called base 35. In addition, these fonts are includes:

    ,----[ Additions to Base 14 to Make Base 35 ]
    | 15. AvantGarde-Book
    | 16. AvantGarde-BookOblique
    | 17. AvantGarde-Demi
    | 18. AvantGarde-DemiOblique
    | 19. Bookman-Demi
    | 20. Bookman-DemiItalic
    | 21. Bookman-Light
    | 22. Bookman-LightItalic
    | 23. Helvetica-Narrow
    | 24. Helvetica-Narrow-Bold
    | 25. Helvetica-Narrow-BoldOblique
    | 26. Helvetica-Narrow-Oblique
    | 27. NewCenturySchlbk-Bold
    | 28. NewCenturySchlbk-BoldItalic
    | 29. NewCenturySchlbk-Italic
    | 30. NewCenturySchlbk-Roman
    | 31. Palatino-Bold
    | 32. Palatino-BoldItalic
    | 33. Palatino-Italic
    | 34. Palatino-Roman
    | 35. ZapfChancery-MediumItalic
    `----

    These are some times referred to as the "35 classical postscript fonts".

    ---------------------------------++-

    +++---------------------------------
    FWIW, the current "best practice" in PDF generation is to also embed (subsets of) the 14 standard fonts.

    Or, as the PDF specs says several times (on p.411-416 for PDF 1.7):

    Note: Beginning with PDF 1.5, the special treatment given to the
    standard 14 fonts is deprecated. All fonts used in a PDF document
    should be represented using a complete font descriptor. For
    backwards capability, viewer applications must still provide the
    special treatment identified for the standard 14 fonts.

    "Best practice" is not only to include font descriptors, but also the font programs. Acrobat Distiller does it
    (there is a special profile ``smallest file size'' to not embed them), pdfTeX or dvips in their default
    configuration do it, and most other publishing systems do this as well. Thus I doubt that OOo will change the
    default. You're right that it should give you the choice, though.

    Just my 0.02 EUR, from an OOo outsider. (I belong to the TeX developer community.)

    Joachim

    ---------------------------------++-


    I was looking for information about why these fonts stopped being supported (at least in Linux LibreOffice), but did not find it.

    Found this reference, which is related:

    https://ask.libreoffice.org/t/how-to-access-printer-built-in-fonts/23946/5




    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Carlos E.R. on Sun Mar 31 22:07:51 2024
    "Carlos E.R." <robin_listas@es.invalid> wrote or quoted:
    FWIW, the current "best practice" in PDF generation is to also embed (subsets of) the 14 standard fonts.

    Ah. In the meantime, I tried to use "Times" and observed that
    it was still embedded. And it is very hard to get free software
    to remove such embedded fonts.

    So now I will take another way: I am going to embed fonts which
    have a free license like the SIL OFL (open font license) or the
    Apache license. The Apache license might require that one adds
    a copy of the license to the PDF, so I might prefer the OFL.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Flynn@21:1/5 to Stefan Ram on Thu Apr 4 09:42:25 2024
    On 31/03/2024 13:18, Stefan Ram wrote:
    ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
    I have generated a PDF file using a program where I have requested
    a certain font. Now, the PDF file is indeed being shown with that
    font.
    [...]
    So it seems that the PDF generator has embedded Georgia.

    I think all software creating PDF embeds the fonts it uses.

    I wonder whether I can now process the PDF to remove this embedding
    and use the Georgia font at the reader's site (if available)?

    I believe it is technically possible to remove an embedded font, but why
    would you want to do that? All it means is that no-one without their own
    copy would be able to read the document.

    Is there a list of fonts that are always available for PDF and do not
    need to be embedded?
    "Since nearly the very beginning of their existence, Adobe’s products
    have been accompanied with a basic collection of fonts, first containing
    only 13 components, then extended to 35: ITC Avant Garde Gothic (4
    fonts), ITC Bookman (4 fonts), Courier (4 fonts), Helvetica (8 fonts),
    New Century Schoolbook (4 fonts), Palatino (4 fonts), Times (4 fonts),
    ITC Zapf Chancery Medium (1 font, italic), Symbol (1 font), and ITC Zapf Dingbats (1 font)." [https://tug.org/TUGboat/Articles/tb29-1/tb91ludwichowski-fonts.pdf]

    Those fonts were available without the need for embedding in
    Postscript, because they were included in the firmware of Postscript
    printers. This was extended to other printer drivers, and in 1996, to a replicate subset in the non-Adobe Ghostscript. AFAIK PDF also has the
    Adobe fonts built in. But one original reason (disk space) has long been irrelevant, although Adobe would of course like to trap users with its
    fonts.

    Today, I think almost every piece of software generating PDF will embed
    the fonts that are used, and ignore the fact that those "35" are
    available without embedding.

    On 31/03/2024 14:31, Stefan Ram wrote:
    Or I would like to learn about fonts which clearly allow their
    embedding for free.
    All fonts can be embedded, otherwise they would be unusable.

    The important point is that the software (Word, LaTeX, whatever) ONLY
    embeds those characters that are actually used ("subsetting"), NOT the
    entire font. This makes it both useless and pointless to attempt to
    steal a font by extracting it from the PDF or Postscript. Although
    technically possible, you would end up with a font missing all the
    characters that the document did not use.

    On 31/03/2024 23:07, Stefan Ram wrote:
    Ah. In the meantime, I tried to use "Times" and observed that it was
    still embedded. And it is very hard to get free software to remove
    such embedded fonts.

    Virtually impossible. Don't waste your time trying.

    So now I will take another way: I am going to embed fonts which have
    a free license like the SIL OFL (open font license) or the Apache
    license. The Apache license might require that one adds a copy of the
    license to the PDF, so I might prefer the OFL.

    I don't think that is necessary, because embedding means subsetting, so
    you are not breaking any licence by doing so, because the license only prohibits you from giving the whole font away for someone else to use,
    and that is not the case.

    Typesetters and designers do this all day long. It's the normal way of
    working, provided you are using legally-aquired fonts (ie you have paid
    for those which are not explicitly given away).

    Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Peter Flynn on Thu Apr 4 09:10:06 2024
    Peter Flynn <peter@silmaril.ie> wrote or quoted:
    I don't think that is necessary, because embedding means subsetting, so
    you are not breaking any licence by doing so, because the license only >prohibits you from giving the whole font away for someone else to use,
    and that is not the case.

    |Many font manufacturers are now "monetizing their
    |intellectual property," as I was told by a font designer.
    |
    |They are tightening up control of their intellectual
    |property.
    |
    |This policy change started a couple of years ago and appears
    |to be spreading throughout the font industry. It's fairly
    |easy today for a font manufacturer to search websites, locate
    |the sites' PDFs and EPUBs, and identify who manufactured the
    |fonts in the files . . . and then send you an invoice for the
    |additional licensing fees that allow you to continue to
    |publish the document with those specific fonts.
    |
    2019/2020, Bevi Chagnon, PubCom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ken Sharp@21:1/5 to All on Thu Apr 4 15:10:41 2024
    In article <l777fhFeibnU1@mid.individual.net>, peter@silmaril.ie says...

    I think all software creating PDF embeds the fonts it uses.

    Not necessarily. Ghostscript and Adobe Acrobat Distiller can be told not
    to embed fonts, by name.


    Today, I think almost every piece of software generating PDF will
    embed
    the fonts that are used, and ignore the fact that those "35" are
    available without embedding.

    Ghostscript's pdfwrite devcie does not do so, nor do several other
    producers. Why ? Because the file can be smaller. Insane though it may
    seem (it does to me), some people do worry about even the tiny number of
    bytes required to embed a subset font.


    On 31/03/2024 14:31, Stefan Ram wrote:
    Or I would like to learn about fonts which clearly allow their
    embedding for free.
    All fonts can be embedded, otherwise they would be unusable.

    No, that's not true, sorry. OpenType fonts can contain a non-zero fsType
    entry in the OS/2 subtable, which contains flexible embedding rights. If
    bit 1 is set then:

    "Fonts that have only this bit set must not be modified,
    embedded or exchanged in any manner without first obtaining
    permission of the legal owner.
    Caution: For Restricted License embedding to take effect, it must be
    the only level of embedding selected."

    Bit 8 also additionally prevents subsetting the font. There are other
    bits available for other purposes; see page 162 and 163 of the 1.4
    OpenType specification.

    Ghostscript's pdfwrite device does honour these controls, though I
    believe many other PDF creators do not.

    This is not possible with PostScript type 1 or CFF fonts, though the
    license the font shipped with may limit your rights to embed the font in
    a document.

    You can still use a font for printing wihtout embedding it, provided the printer has a copy of the font.


    Ken

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Flynn@21:1/5 to Stefan Ram on Thu Apr 4 17:00:23 2024
    On 04/04/2024 10:10, Stefan Ram wrote:
    Peter Flynn <peter@silmaril.ie> wrote or quoted:
    I don't think that is necessary, because embedding means
    subsetting, so you are not breaking any licence by doing so,
    because the license only prohibits you from giving the whole font
    away for someone else to use, and that is not the case.

    |Many font manufacturers are now "monetizing their
    |intellectual property," as I was told by a font designer.

    Entirely possible. I was referring to fonts for which you have already
    paid for the appropriate license. If the foundry tried to dun me for an unwarranted extra, I'd simply stop using the font and warn my clients to
    do the same.

    Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Flynn@21:1/5 to Ken Sharp on Thu Apr 4 17:04:13 2024
    On 04/04/2024 15:10, Ken Sharp wrote:
    In article <l777fhFeibnU1@mid.individual.net>, peter@silmaril.ie says...

    I think all software creating PDF embeds the fonts it uses.

    Not necessarily. Ghostscript and Adobe Acrobat Distiller can be told
    not to embed fonts, by name.

    Yes, I should have added "by default".

    Ghostscript's pdfwrite device does not do so, nor do several other
    producers. Why ? Because the file can be smaller. Insane though it
    may seem (it does to me), some people do worry about even the tiny
    number of bytes required to embed a subset font.

    Yes they do, but this is an edge case.

    All fonts can be embedded, otherwise they would be unusable.

    No, that's not true, sorry. OpenType fonts can contain a non-zero
    fsType entry in the OS/2 subtable, which contains flexible embedding
    rights.

    Oooh. Thank you. I have not encountered that error (yet :-)
    Do you have an example of this?

    Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ken Sharp@21:1/5 to All on Thu Apr 4 17:51:57 2024
    In article <l781btFidhnU3@mid.individual.net>, peter@silmaril.ie says...

    No, that's not true, sorry. OpenType fonts can contain a non-zero
    fsType entry in the OS/2 subtable, which contains flexible embedding rights.

    Oooh. Thank you. I have not encountered that error (yet :-)
    Do you have an example of this?

    I've seen at least one font with the embedding rights disabled, but it
    is not common.

    This bug report :

    https://bugs.ghostscript.com/show_bug.cgi?id=697764

    has a PDF file attached which has an embedded (subset!) font with flags
    which do not permit the font to be embedded. So clearly the PDF creator
    (iText apparently but it has been modified after creation, possibly by something called pdfasm-console) ignored the flags. The report,
    obviously, is because pdfwrite doesn't ignore them.

    I can of course see why this is confusing for the user!


    Ken

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Ken Sharp on Tue Apr 9 14:06:33 2024
    On 2024-04-04 16:10, Ken Sharp wrote:
    In article <l777fhFeibnU1@mid.individual.net>, peter@silmaril.ie says...

    I think all software creating PDF embeds the fonts it uses.

    Not necessarily. Ghostscript and Adobe Acrobat Distiller can be told not
    to embed fonts, by name.


    Today, I think almost every piece of software generating PDF will
    embed
    the fonts that are used, and ignore the fact that those "35" are
    available without embedding.

    Ghostscript's pdfwrite devcie does not do so, nor do several other
    producers. Why ? Because the file can be smaller. Insane though it may
    seem (it does to me), some people do worry about even the tiny number of bytes required to embed a subset font.

    I did this in the past. I had to email PDFs, and there was a limit on
    email size imposed by the ISP. Not embedding the fonts did make
    significant enough difference (significant when the limit is in the
    range 1..10 MB).

    At some point, Libre Office in Linux removed support for printer fonts,
    and I could no longer produce tiny pdfs.




    On 31/03/2024 14:31, Stefan Ram wrote:
    Or I would like to learn about fonts which clearly allow their
    embedding for free.
    All fonts can be embedded, otherwise they would be unusable.

    No, that's not true, sorry. OpenType fonts can contain a non-zero fsType entry in the OS/2 subtable, which contains flexible embedding rights. If
    bit 1 is set then:

    "Fonts that have only this bit set must not be modified,
    embedded or exchanged in any manner without first obtaining
    permission of the legal owner.
    Caution: For Restricted License embedding to take effect, it must be
    the only level of embedding selected."

    Bit 8 also additionally prevents subsetting the font. There are other
    bits available for other purposes; see page 162 and 163 of the 1.4
    OpenType specification.

    Ghostscript's pdfwrite device does honour these controls, though I
    believe many other PDF creators do not.

    This is not possible with PostScript type 1 or CFF fonts, though the
    license the font shipped with may limit your rights to embed the font in
    a document.

    You can still use a font for printing wihtout embedding it, provided the printer has a copy of the font.

    What's the use case of a font that can not print? :-?

    A screen only font?

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Flynn@21:1/5 to Carlos E.R. on Fri Apr 26 23:40:31 2024
    On 09/04/2024 13:06, Carlos E.R. wrote:
    On 2024-04-04 16:10, Ken Sharp wrote:
    [...]
    I did this in the past. I had to email PDFs, and there was a limit on
    email size imposed by the ISP. Not embedding the fonts did make
    significant enough difference (significant when the limit is in the
    range 1..10 MB).

    I think we all went through that stuff.

    At some point, Libre Office in Linux removed support for printer
    fonts, and I could no longer produce tiny pdfs.

    LaTeX, specifically nowadays pdflatex (and I assume pari passu XeLaTeX
    and LuaLaTeX) can be instructed not to embed fonts with an option in the updmap.cfg configuration file, which controls font usage for Postscript
    Type 1 fonts. [Thank you to Zdenek Wagner for this, which I had forgotten.]

    It does of course mean that the user MUST absolutely restrict the
    document to font-metric identical fonts to the Adobe "35" that were
    built into printers back in the days of Postscript. Any use of glyphs
    from any other font will probably just print as white-space.

    That is probably an even harder restriction than producing tiny PDFs. If someone ever wanted tiny PDFs I would do the above, but create
    Postscript, and then zip it down hard and ensure the publisher was
    equipped with the appropriate unzip and a copy of ps2pdf :-)

    Peter

    Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Peter Flynn on Tue May 14 15:09:40 2024
    On 2024-04-27 00:40, Peter Flynn wrote:
    On 09/04/2024 13:06, Carlos E.R. wrote:
    On 2024-04-04 16:10, Ken Sharp wrote:
    [...]
    I did this in the past. I had to email PDFs, and there was a limit on
    email size imposed by the ISP. Not embedding the fonts did make
    significant enough difference (significant when the limit is in the
    range 1..10 MB).

    I think we all went through that stuff.

    At some point, Libre Office in Linux removed support for printer
    fonts, and I could no longer produce tiny pdfs.

    LaTeX, specifically nowadays pdflatex (and I assume pari passu XeLaTeX
    and LuaLaTeX) can be instructed not to embed fonts with an option in the updmap.cfg configuration file, which controls font usage for Postscript
    Type 1 fonts. [Thank you to Zdenek Wagner for this, which I had forgotten.]

    It does of course mean that the user MUST absolutely restrict the
    document to font-metric identical fonts to the Adobe "35" that were
    built into printers back in the days of Postscript. Any use of glyphs
    from any other font will probably just print as white-space.

    That is probably an even harder restriction than producing tiny PDFs. If someone ever wanted tiny PDFs I would do the above, but create
    Postscript, and then zip it down hard and ensure the publisher was
    equipped with the appropriate unzip and a copy of ps2pdf :-)

    That breaks the generic purpose of using PDF as a method of sending
    documents easy to read or print, with the paper or screen visually
    identical to what the senders saw, and in any machine with any operating system.

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)