Bug 104541 - Some fonts don't appear on PDF Export, but are printed correctly
Summary: Some fonts don't appear on PDF Export, but are printed correctly
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-09 23:36 UTC by João Paulo
Modified: 2020-11-28 19:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
document where this bug appears (18.41 KB, application/vnd.oasis.opendocument.text)
2016-12-09 23:38 UTC, João Paulo
Details
exported PDF from original document where this bug appears (34.48 KB, application/pdf)
2016-12-09 23:39 UTC, João Paulo
Details
PDF generated with a virtual printer (30.19 KB, application/pdf)
2016-12-09 23:41 UTC, João Paulo
Details
contents of the exported PDF when copy-pasted from SumatraPDF (781 bytes, text/plain)
2016-12-09 23:42 UTC, João Paulo
Details
This is a document with many fonts and always trigger this bug on my system. I has other open source or freeware fonts which I'll add the download locations on a comment (31.62 KB, application/vnd.oasis.opendocument.text)
2016-12-10 00:24 UTC, João Paulo
Details
exported PDF from complex document which triggers this bug (144.13 KB, application/pdf)
2016-12-10 00:33 UTC, João Paulo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description João Paulo 2016-12-09 23:36:08 UTC
Description:
Running LibreOffice 5.2.3.3 (x64) release, build ID d54a8868f08a7b39642414cf2c8ef2f228f780cf, on Windows 10 Pro x64, gives invisible fonts output when trying to export as PDF.

I used the open source Merriweather Sans font family, available at "https://www.fontsquirrel.com/fonts/merriweather-sans" and only the Book and Regular variants were exported correctly: Bold, Italic, Bold Italic, Extra Bold, Extra Bold Italic don't appear.

Also, the exported text is scrambled on parts of the PDF when trying to select, copy and paste the text inside the PDF.

There is a similar bug with the Aller font at "https://www.fontsquirrel.com/fonts/aller", but it happens only when printing (PDF Export is always correct) and sporadically. I don't know how to reproduce it.

Steps to Reproduce:
1. Install the Merriweather Sans font family (all of them) on Windows.
2. Open LibreOffice Writer and edit an existing document with Merriweather Sans font family and format some of the text as the font variants.
3. Sometimes the PDF is exported correctly, sometimes not.

Actual Results:  
After the document start to be exported incorrectly once, every time it is exported there will be invisible fonts on the exported PDF.

It depends if the document already has Merriweather Sans Book on it and later some characters are formatted as Book Italic, Regular, Italic, Bold or Bold Italic.

Expected Results:
LibreOffice should export a document as PDF just as it shows on the screen.


Reproducible: Sometimes

User Profile Reset: No

Additional Info:
I attached the documents I used to test the bug and created two PDFs, one by exporting as a PDF and the other by printing with PDF Forge virtual printer (http://download.pdfforge.org/).

Although using a virtual printer is an easy workaround, there are people unaware of this bug that may send the incomplete documents. I was lucky I started previewing the PDFs after I noticed some printed documents had characters missing from a font I use on the Page Header, or else I wouldn't discover the invisible fonts on the middle of a PDF. That could have caused a lawsuit to be lost as the judge wouldn't have read the PDF correctly on the electronic process of law.


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:3.0) Goanna/20161201 PaleMoon/27.0.2
Comment 1 João Paulo 2016-12-09 23:38:49 UTC
Created attachment 129434 [details]
document where this bug appears
Comment 2 João Paulo 2016-12-09 23:39:34 UTC
Created attachment 129435 [details]
exported PDF from original document where this bug appears
Comment 3 João Paulo 2016-12-09 23:41:17 UTC
Created attachment 129436 [details]
PDF generated with a virtual printer
Comment 4 João Paulo 2016-12-09 23:42:52 UTC
Created attachment 129437 [details]
contents of the exported PDF when copy-pasted from SumatraPDF
Comment 5 João Paulo 2016-12-09 23:49:57 UTC
Clarification:

If the document was already saved on disk, or created another from its copy before it was opened for editing, and it already was used the Merriweather Sans Book on it and later it was used the other variants as Book Italic, Regular, Italic, Bold, Bold Italic, Extra Bold, Extra Bold Italic, then the exported PDF would have invisible text on it, as only the Regular and Book variants from the font would appear on the exported PDF.
Comment 6 João Paulo 2016-12-10 00:24:06 UTC
Created attachment 129438 [details]
This is a document with many fonts and always trigger this bug on my system. I has other open source or freeware fonts which I'll add the download locations on a comment
Comment 7 V Stuart Foote 2016-12-10 00:26:49 UTC
Don't have Merriweather fonts installed, but font fallback remains challenged through 5.2 builds, perhaps see if the new HarfBuzz layout and reworked font handling for the 5.3.0 and current master behave better for you.

On a Windows 8.1 Pro 64-bit en-US system with recent master
Version: 5.4.0.0.alpha0+
Build ID: a238c829b209d0708714aa753fb686525411825f
CPU Threads: 8; OS Version: Windows 6.29; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-12-08_10:37:27
Locale: en-US (en_US); Calc: CL

The PDF is generated with clean font fall back. While on the same system a 5.2.3.3 build chokes on the export.
Comment 8 João Paulo 2016-12-10 00:31:32 UTC
I attached a relatively complex document which uses other fonts and always trigger this bug on my system. The used fonts are:

Aller - https://www.fontsquirrel.com/fonts/aller
Asap - https://www.fontsquirrel.com/fonts/asap
Merriweather Sans - https://www.fontsquirrel.com/fonts/merriweather-sans
Open Sans - installed with LibreOffice
Permian Sans - https://www.fontsquirrel.com/fonts/permian-sans
Permian Slab - https://www.fontsquirrel.com/fonts/permian-slab

I also attached an exported PDF which shows some of the characters formatted with Aller as missing (one can see on the top of the first page the sentence "AEIOU & ABCDEF Advogados" is incomplete).
Comment 9 João Paulo 2016-12-10 00:33:50 UTC
Created attachment 129439 [details]
exported PDF from complex document which triggers this bug

On this file, even some characters (but not all) formatted with Aller font are missing.
Comment 10 João Paulo 2016-12-10 01:04:16 UTC
(In reply to João Paulo from comment #8)
> I attached a relatively complex document which uses other fonts and always
> trigger this bug on my system. The used fonts are:
> 
> Aller - https://www.fontsquirrel.com/fonts/aller
> Asap - https://www.fontsquirrel.com/fonts/asap
> Merriweather Sans - https://www.fontsquirrel.com/fonts/merriweather-sans
> Open Sans - installed with LibreOffice
> Permian Sans - https://www.fontsquirrel.com/fonts/permian-sans
> Permian Slab - https://www.fontsquirrel.com/fonts/permian-slab
> 
> I also attached an exported PDF which shows some of the characters formatted
> with Aller as missing (one can see on the top of the first page the sentence
> "AEIOU & ABCDEF Advogados" is incomplete).

I was downloading the 5.3 Beta 3 at "http://dev-builds.libreoffice.org/daily/libreoffice-5-3/Win-x86_64@62-TDF/2016-12-08_16.10.30/" to test this issue and couldn't reproduce it after I installed it on my system.

Maybe 5.3 Dev have it solved?
Comment 11 QA Administrators 2017-06-28 12:36:30 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2017-07-27 12:01:57 UTC Comment hidden (obsolete)
Comment 13 João Paulo 2017-10-05 18:44:33 UTC
I tried it on LibreOffice 5.3.6.1 x64 on Windows Pro x64 (build 15063.540) and couldn't reproduce it anymore.

I think the bug was solved when LibreOffice was updated to version 5.3.
Comment 14 V Stuart Foote 2017-10-05 18:46:09 UTC
OK then -> WFM