Bug 162928 - For converter use PDF export filters should detect and notify of font substitution
Summary: For converter use PDF export filters should detect and notify of font substit...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Substitution PDF-Export
  Show dependency treegraph
 
Reported: 2024-09-12 12:07 UTC by Vincent Lefevre
Modified: 2024-09-12 13:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
testcase (triggering the issue only when some fonts are not available) (9.69 KB, application/vnd.oasis.opendocument.text)
2024-09-12 12:07 UTC, Vincent Lefevre
Details
PDF file obtained with odt2pdf (unoconv) (10.59 KB, application/pdf)
2024-09-12 12:10 UTC, Vincent Lefevre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lefevre 2024-09-12 12:07:18 UTC
Created attachment 196396 [details]
testcase (triggering the issue only when some fonts are not available)

PDF export should provide a way to detect font substitution for converters like unoconv (which uses the UNO bindings / standard LibreOffice API), which then could warn the user (or exit with a failure).

I've attached a .odt file as a simple testcase, which has 2 characters "n" using different fonts (respectively Times New Roman and TimesNewRomanPSMT, according to the UI). FYI, the styles (e.g. font names) come from a copy-paste of text from the IEEE 754-2019 standard (I've replaced the text by just 2 characters "n"). In the official PDF version of the original document, the fonts are the same (or at least look identical), but here under Debian/unstable, the first "n" uses a serif font and the second "n" is larger and uses a sans-serif font; this occurs both in the UI[*] and in the PDF obtained with unoconv (where the pdffonts utility says that the fonts are LiberationSerif and NotoSans-Regular).

To be clear: This bug is not about "fixing" the output, but to warn the user that there is a potential issue with the document (in the present case, the change of the style in the original document in unintended).

[*] There is no warning in the UI either, which is bug 96872 (covering only the UI: see bug 96872 comment 29).
Comment 1 Vincent Lefevre 2024-09-12 12:10:26 UTC
Created attachment 196397 [details]
PDF file obtained with odt2pdf (unoconv)

I've attached the PDF file obtained with odt2pdf (unoconv) under Debian/unstable, without any warning about the font substitution.
Comment 2 Vincent Lefevre 2024-09-12 12:50:22 UTC
Note: this also concerns "libreoffice --convert-to pdf", which uses the writer_pdf_Export filter.
Comment 3 V Stuart Foote 2024-09-12 13:19:03 UTC
OK