• Re: Fonts in PDF

    From Peter Flynn@peter@silmaril.ie to comp.text.pdf on Thu Apr 4 09:42:25 2024
    From Newsgroup: comp.text.pdf

    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, AdoberCOs 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

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From ram@ram@zedat.fu-berlin.de (Stefan Ram) to comp.text.pdf on Thu Apr 4 09:10:06 2024
    From Newsgroup: comp.text.pdf

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ken Sharp@ken.sharp@artifex.com to comp.text.pdf on Thu Apr 4 15:10:41 2024
    From Newsgroup: comp.text.pdf

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Peter Flynn@peter@silmaril.ie to comp.text.pdf on Thu Apr 4 17:00:23 2024
    From Newsgroup: comp.text.pdf

    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

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Peter Flynn@peter@silmaril.ie to comp.text.pdf on Thu Apr 4 17:04:13 2024
    From Newsgroup: comp.text.pdf

    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

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ken Sharp@ken.sharp@artifex.com to comp.text.pdf on Thu Apr 4 17:51:57 2024
    From Newsgroup: comp.text.pdf

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Carlos E.R.@robin_listas@es.invalid to comp.text.pdf on Tue Apr 9 14:06:33 2024
    From Newsgroup: comp.text.pdf

    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.

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Peter Flynn@peter@silmaril.ie to comp.text.pdf on Fri Apr 26 23:40:31 2024
    From Newsgroup: comp.text.pdf

    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

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Carlos E.R.@robin_listas@es.invalid to comp.text.pdf on Tue May 14 15:09:40 2024
    From Newsgroup: comp.text.pdf

    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.

    --- Synchronet 3.21d-Linux NewsLink 1.2