Bug 163140 - Add an option to fully embed fonts when exporting to PDF
Summary: Add an option to fully embed fonts when exporting to PDF
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.5.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/writer-...
Whiteboard:
Keywords: needsDevEval, needsUXEval
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2024-09-25 06:26 UTC by Mirto Busico
Modified: 2024-09-25 17:47 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirto Busico 2024-09-25 06:26:04 UTC
In some use cases it is necessary to export a Writer document to PDF embedding completely the fonts used.

Now the export generates only subset of fonts embedded.

It should be useful if there will be an option to fully embed fonts
Comment 1 V Stuart Foote 2024-09-25 12:24:15 UTC
IIUC our font embedding (File -> Properties -> Font tab) subsets into ODF, but with poppler export to PDF it also renames the font to meet PDF needs. Would we need to add an 'Export' control(s) to the Font tab?

Also there are font file format issues with .cff, .woff, .otf, .ttf and then each font carries its own permissions as to allowing subset or full-embedding as licensing.

Seems a real can of worms to attempt full font embedding.

An equally viable approach for users needing to publish to PDF might be authoring with "do not require embedding" fonts, the "base 14" Courier (Regular, Oblique, Bold, Bold Oblique), Helvetica (Regular, Oblique, Bold, Bold Oblique), Times (Roman, Italic, Bold, Bold Italic), Symbol, and ITC Zapf Dingbats

Which is what we've already done with fields in our PDF forms export to assure our exported form fields are fully editable.

Just not seeing the need to attempt this.
Comment 2 Heiko Tietze 2024-09-25 13:00:27 UTC
Please elaborate on the need to export the entire font. What use case is not covered with the current implementation?
Comment 3 V Stuart Foote 2024-09-25 13:01:49 UTC
(In reply to Heiko Tietze from comment #2)
> Please elaborate on the need to export the entire font. What use case is not
> covered with the current implementation?

See the liked Ask question.
Comment 4 V Stuart Foote 2024-09-25 13:04:31 UTC
sorry s/liked/linked/
Comment 5 Heiko Tietze 2024-09-25 14:09:50 UTC
Duplicate of bug 50879 "form exported as pdf does not embed all required fonts" (patch submitted by Miklos in https://gerrit.libreoffice.org/c/core/+/99032) or
bug 78216 "PDF export should not remap embedded font". At least related is bug 78216 "PDF export should not remap embedded font". And there is bug 85295 - PDF: handling of embedded fonts, glyphs, subsets with the statement from Michael Stahl "PDF does not embed fonts, it embeds those glyphs which are used." and many more tickets.

File > Properties > Font offers "[x] Embed fonts in the document" and "[ ] Only embed fonts that are used in documents" - is this options respected on export to PDF?

But at https://kdp.amazon.com/en_US/help/topic/G202145450 I read:
"You can find out if the fonts are embedded by opening the file in Adobe Acrobat and checking under the File/Properties on the Fonts tab. Every font in the list needs to show "Embedded" or "Embedded Subset" for your file to work.", nothing about a restriction to complete fonts.
Comment 6 Mirto Busico 2024-09-25 17:47:34 UTC
Just my 2 cents.
You can see the embedding status of fonts with the Open Source pdffont utility

As an example my last writer file exported as PDF says

pdffonts hosepla_book.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
BAAAAA+LiberationSans-Bold           TrueType          WinAnsi          yes yes yes   2126  0
CAAAAA+LiberationSans                TrueType          WinAnsi          yes yes yes   2106  0
DAAAAA+LiberationSerif               TrueType          WinAnsi          yes yes yes   2121  0
EAAAAA+LiberationSerif-Bold          TrueType          WinAnsi          yes yes yes   2101  0
FAAAAA+LiberationSerif-Italic        TrueType          WinAnsi          yes yes yes   2111  0
GAAAAA+LiberationMono                TrueType          WinAnsi          yes yes yes   2131  0
HAAAAA+LiberationMono-Bold           TrueType          WinAnsi          yes yes yes   2136  0
IAAAAA+DejaVuSansMono                TrueType          WinAnsi          yes yes yes   2116  0
JAAAAA+NotoColorEmoji                Type 3            Custom           yes yes yes   2139  0