|
Bugzilla – Full Text Bug Listing |
| Summary: | Export directly to PDF from Calc creates PDF with corrupt contents. | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Chad Groneman <cgroneman> |
| Component: | OpenOffice.org | Assignee: | Petr Mladek <pmladek> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | CC: | Iago515 |
| Version: | RC 1 | ||
| Target Milestone: | --- | ||
| Hardware: | i686 | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Beta-Customer | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
ODS file to "Export directly to PDF"
Corrupt PDF file generated by OOo Calc ooo-dejavu.png ooo-helvetica.png awful: mingled letters with default font |
||
|
Description
Chad Groneman
2006-02-21 01:33:54 UTC
Created attachment 69408 [details]
ODS file to "Export directly to PDF"
Open this file and export directly to PDF through OOo. It will be corrupt.
Created attachment 69409 [details]
Corrupt PDF file generated by OOo Calc
I have reproduced it.
Hmm, the problem is that ODS file uses the font Arial. It is not available on the system, so the font Nimbus Sans L is used instead.
I tested it with the upstream package and it worked. There difference is that
the upstream package substituted to Helvetica rather than to Nimbus Sans L.
I wonder if the font Nimbus Sans L has broken metric and we should rather use Helvetica.
Mike, what do you think about it?
Note1: I'll increase severity to crytical because OOo is important application on NLD10 and we should support transition from MS format smothly.
Note2: The following list of potential substitute fonts is currently defined for Arial in /usr/lib/ooo-2.0/share/registry/data/org/openoffice/VCL.xcu:
<node oor:name="arial" oor:op="replace">
<prop oor:name="SubstFonts">
<value>albanyamt;albany;arial;nimbussansl;helvetica;lucidasans;lucida;geneva;helmet;sansserif;nimbussansl;nimbussans;andalesansui;arialunicodems;lucidaunicode</value>
</prop>
Petr> I wonder if the font Nimbus Sans L has broken metric and we Petr> should rather use Helvetica. We don't have "Helvetica". (Well, that's not completely true, we have "Adobe Helvetica" as a bitmap font, but a bitmap font is certainly not usable for embedding into a PDF). It works if the package "agfa-fonts" is installed because "Albany AMT" is used then. I think the package "agfa-fonts" is a default package on NLD → reducing sevirity to "normal". I can reproduce the problem as well when I delete the Microsoft Webfonts and the agfa-fonts. Looks like OpenOffice has a problem with embedding Type1 fonts. "Nimbus Sans L" is a Type1 font: mfabian@magellan:~$ fc-list "Nimbus Sans L" file /usr/share/ghostscript/fonts/n019024l.pfb: /usr/share/ghostscript/fonts/n019023l.pfb: /usr/share/ghostscript/fonts/n019044l.pfb: /usr/share/ghostscript/fonts/n019043l.pfb: /usr/share/ghostscript/fonts/n019064l.pfb: /usr/share/ghostscript/fonts/n019063l.pfb: /usr/share/ghostscript/fonts/n019004l.pfb: /usr/share/ghostscript/fonts/n019003l.pfb: mfabian@magellan:~$ To prove that it is indeed a problem with Type1 fonts, I edited /usr/lib/ooo-2.0/share/registry/data/org/openoffice/VCL.xcu like this: <node oor:name="arial" oor:op="replace"> <prop oor:name="SubstFonts"> <value>albanyamt;albany;arial;bitstreamcharter;nimbussansl;helvetica;lucidasans;lucida;geneva;helmet;sansserif;nimbussansl;nimbussans;andalesansui;arialunicodems;lucidaunicode</value> </prop> I.e. I added "Bitstream Charter" in front of "Nimbus Sans L". "Bitstream Charter" is a Type1 font as well (we also have some "Bitstream Charter" bitmap fonts, but OOo ignores bitmap fonts anyway): mfabian@magellan:~$ fc-list "Bitstream Charter:outline=true" file /usr/share/ghostscript/fonts/bchbi.pfa: /usr/X11R6/lib/X11/fonts/Type1/c0632bt_.pfb: /usr/share/ghostscript/fonts/bchri.pfa: /usr/X11R6/lib/X11/fonts/Type1/c0648bt_.pfb: /usr/X11R6/lib/X11/fonts/Type1/c0633bt_.pfb: /usr/X11R6/lib/X11/fonts/Type1/c0649bt_.pfb: /usr/share/ghostscript/fonts/bchr.pfa: /usr/share/ghostscript/fonts/bchb.pfa: mfabian@magellan:~$ Of course the test file looks already a bit wrong on screen because "Bitstream Charter" is a serif font and the originally specified "Arial" is a sans-serif font. When exporting to PDF one gets "Bitstream Charter" embedded into the PDF: mfabian@magellan:~$ pdffonts /tmp/foo.pdf name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- CharterBT-Bold Type 1 yes no no 20 0 CAAAAA+OpenSymbol TrueType yes yes yes 12 0 CharterBT-Roman Type 1 yes no no 16 0 mfabian@magellan:~$ And when viewing the PDF file it looks equally wrong as when "Nimbus Sans L" is used. I.e. I guess OOo has this a problem with *all* Type1 fonts. Petr> I wonder if the font Nimbus Sans L has broken metric and we should
Petr> rather use Helvetica
I don't think Nimbus Sans L has a broken metric.
The following fonts are metric compatible to Helvetica:
Arial, Albany AMT,Nimbus Sans L
I.e. "Nimbus Sans L" would be a very good replacement for "Arial"
or "Helvetica".
Other fonts which are not metric compatible to "Helvetica" are not a
good replacement for Arial.
If you specify "Helvetica" in front of "Nimbus Sans L", OOo uses bitmap fonts for the display and does *not* embed fonts into the PDF output: mfabian@magellan:~$ pdffonts /tmp/foo.pdf name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- Helvetica-Bold Type 1 no no no 14 0 CAAAAA+OpenSymbol TrueType yes yes yes 12 0 Helvetica Type 1 no no no 13 0 mfabian@magellan:~$ Then the display with xpdf, kpdf, ghostview, ... works because the PDF viewer or printing system uses some fallback for "Helvetica" (which is usually "Nimbus Sans L" again but in the PDF viewer or in Ghostscript this works contrary to OOo). If "dejavusans" is added to /usr/lib/ooo-2.0/share/registry/data/org/openoffice/VCL.xcu like this (and the "dejavu" package is installed of course): <node oor:name="arial" oor:op="replace"> <prop oor:name="SubstFonts"> <value>albanyamt;albany;arial;dejavusans;nimbussansl;helvetica;lucidasans;lucida;geneva;helmet;sansserif;nimbussansl;nimbussans;andalesansui;arialunicodems;lucidaunicode</value> </prop> printing works because the DéjàVu fonts are TrueType fonts and apparently OpenOffice has problems only with Type1 fonts. But, as I already wrote above, you cannot replace "Arial" by any random sans-serif font, it should be metric compatible, otherwise you will see problems in the screen display. Created attachment 69607 [details]
ooo-dejavu.png
screen shot which shows that "dejavusans" doesn't work well as a replacement
for "Arial". You can see overlapping glyphs due to the differences
in the metric.
If "Helvetica" is specified in front of "Nimbus Sans L" as written in comment #9, OOo apparently uses "Helvetica" via the X11 core font system, not via fontconfig/Xft because the "Helvetica" fonts cannot be found by looking into /proc/<pid-of-soffice>/maps. Created attachment 69612 [details]
ooo-helvetica.png
screen shot of the test file when using "Helvetica".
You can see that the "Helvetica" bitmap font is used on screen.
This will probably cause problems when using different font sizes
because the "Helvetica" bitmap fonts are only available in
a few discrete sizes.
I'm not sure what is the best solution here. It seems to be a bug in OpenOffice of course that it cannot embed Type1 fonts correctly. But if this cannot be fixed, maybe the only easy workaround is to move helvetica in front of nimbussansl, i.e.: <node oor:name="arial" oor:op="replace"> <prop oor:name="SubstFonts"> <value>albanyamt;albany;arial;helvetica;nimbussansl;lucidasans;lucida;geneva;helmet;sansserif;nimbussansl;nimbussans;andalesansui;arialunicodems;lucidaunicode</value> </prop> The bitmaps don't look nice on screen and will cause problems with scaling, but maybe this is less bad as the broken printout. Of course it is much better to make sure that the "agfa-fonts" package is installed, then "Albany AMT" is available which is a perfect replacement for "Arial". Great investigation! I have reproduced the bug with the upstream package and found that it is already reported as http://www.openoffice.org/issues/show_bug.cgi?id=61929. (I am sorry that I did not find it earlier but it looked like a SUSE specific bug.) The upstream bug is very fresh. I hope that they would want to fix it for OOo-2.0.2-final. I would suggest to wait one week if there is a progress. If it is not fixed by upstream, we could prefer the bitmap fonts over the Type1 fonts as a temporary workaround for SL 10.1. I would wait one week because I think that more fixes would be necessary: Helvetica vs. Nimbus Sans L Times vs. Nimbus Roman No9 L Courier vs. Nimbus Mono L ??? It is fixed by upstream in OOo-2.0.2rc4. The fixed package should be available on NLD10-beta7/SL10.1-beta8. *** Bug 157003 has been marked as a duplicate of this bug. *** Created attachment 79419 [details]
awful: mingled letters with default font
Bug still present in RC1
Reopening and changing severity to Major Embedding the Nimbus Type1 fonts works fine for me with the OpenOffice_org rpm package where the last changelog entry is mfabian@magellan:/tmp$ rpm -q --changelog OpenOffice_org |head * 金 4月 14 2006 - pmladek@suse.cz - updated ooo-build to version 2.0.2.7: * better fix for crash when selecting email application [#154458] * avoids strange 2.6 specific hacks I tried with the attachment from comment #1 and before testing I removed the agfa-fonts package and the Microsoft webfonts. The Nimbus Type1 fonts were embedded when testing like this: mfabian@magellan:/tmp$ pdffonts test.pdf name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- NimbusSanL-BoldCond Type 1 yes no yes 22 0 CAAAAA+OpenSymbol TrueType yes yes yes 12 0 NimbusSanL-Regu Type 1 yes no yes 17 0 mfabian@magellan:/tmp$ And the created pdf file displayed correctly in xpdf. Therefore I think this bug is fixed. If you still think there are problems, please give an exact procedure how to reproduce them. |