Bug 38825 - LO font support vs. PDF export
Summary: LO font support vs. PDF export
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
3.4.0 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 08:15 UTC by Konrad Pióro
Modified: 2012-08-31 10:05 UTC (History)
3 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 Konrad Pióro 2011-06-30 08:15:58 UTC
I have this very strange problem with LO when exporting to PDF via writer_pdf_export in headless mode. It seems that is forces the PDF to contain at least one TTF font, even if it is completely unrelated to the document. Let's say that my document used a Type1 "Foo Sans" font. When I export from the GUI everything is OK, the Type1 font is the only font embedded in the PDF file. However, in headless mode it embeds the first TTF font it finds along with the Type1 font. If I get rid of all the fonts in the system (all of them) and leave only one single TTF file available to fontconfig (witch I use in rrdtool), even then LO will embed it without permission to the exported PDF.

Why is this a problem you ask? I'm using this headless mode in my all2ps converter, which converts anything to PostScript (as the name implies) so that it can be printed. The OpenDocument, Office binary and OOXML conversion is handled by LO. When an TTF font is embedded in the stream, the conversion is OK, however 3 generations of our companies printers fail to print the document with PostScript offending command invalidfont (the printer does not have this font obviously). To print properly, all fonts must be embedded as Type1 fonts in the PS stream. If there is a single TTF file there will be this PS error.

I have come up with multiple solutions to this problem.

1. Some switch to disable "EmbedStandardFonts" when using headless mode. This is the most preferred method as it is least invasive.

2. Disable TrueType support altogether by hacking the LO source code, as there is no switch to disable it. I tried to disable fontconfig support but that did not help.

3. Delete all TTF fonts from the systems fontconfig directories and hack other application's font support instead. But such actions are a last resort.

4. Somehow strip TTF embedded fonts from the PDF once it has been created. I know that it can be done with Adobe's tools but I cannot seem to find anything FOSS that would accomplish this task. And if I found one I surely wouldn't be filing this bug report.

There is also a second problem. When there exist fonts both in TTF form and in Type1 form, LO will insist on using the TTF, which is bad, because it forces me to remove the TTF from the system, as I am unable to choose which ones should LO use.
Comment 1 Konrad Pióro 2011-07-04 09:36:38 UTC
It seems that I found a stable workaround for the problem. Using the method described by David Simmons on his page (http://cafbit.com/entry/forcing_gnome_terminal_to_use), I forced LibreOffice to use a different fontconfig config file. This config file contains only references to directories containing Type1 fonts (and also it replaces M$ fonts like Arial and Times New Roman with Liberation fonts, killing two birds with one stone).

Oh, and for anyone interested -- don't forget to delete the OpenSymbol TTF from LO installation directory.
Comment 2 Björn Michaelsen 2011-12-23 12:24:28 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 3 sasha.libreoffice 2012-03-01 02:49:16 UTC
@ Konrad
Thanks for bugreport. Please, verify this in last version of LibO

@ Caolan
Please, look at this bug when will have time. Something with fonts strange
Comment 4 Caolán McNamara 2012-03-01 03:15:31 UTC
please provide an easy way to reproduce, every few minutes of setup for reproduction that can be reduced helps.
Comment 5 Roman Eisele 2012-07-10 14:51:16 UTC
Just a hint:
I can't reproduce this with LibreOffice 3.5.4 and 3.6 beta 3 on MacOS X; my own files which contain only OpenType PS fonts are exported correctly with *only* these fonts embedded. But this is just a hint, it may be very well very different on Linux.
Comment 6 Florian Reisinger 2012-08-14 14:00:04 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 7 Florian Reisinger 2012-08-14 14:01:13 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 8 Florian Reisinger 2012-08-14 14:05:57 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 9 Florian Reisinger 2012-08-14 14:07:58 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian