Re: Problem with accents on freebsd but not on windows
Ian Lord <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi William, Thanks a lot for your answer. From what I thought when I sent the email, the font that is causing the problem is embedded in the document. I used pdffonts on the document and I have a different output (fonts names) than you... $ /usr/local/libexec/xpdf/pdffonts /tmp/bad.pdf name type emb sub uni object ID ------------------------------------ ----------------- --- --- --- --------- NEPNIA+Frutiger-Cn Type 1C yes yes yes 150 0 NEPNIB+Frutiger-BoldCn Type 1C yes yes yes 149 0 NEPNJC+Frutiger-BlackCn Type 1C yes yes yes 151 0 NEPNGP+Wingdings CID TrueType yes yes no 147 0 NEPNJD+Wingdings TrueType yes yes no 148 0 Courier-Bold Type 1 no no no 10 0 ZapfDingbats Type 1 no no no 397 0 Times-Roman Type 1 no no no 71 0 So the fonts name don't match the ones you sent me in your output. The Frutiger fonts are all embedded from what I can see. And these are the ones that have the "accents" issue in the Gs output image. I also looked at the output of the gs and I don't see errors about font loadming problem: $ gs -dNOPAUSE -sDEVICE=nullpage bad.pdf -c quit GPL Ghostscript 9.15 (2014-09-22) Copyright (C) 2014 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 6. Page 1 Loading NimbusMonL-Bold font from /usr/local/share/ghostscript/fonts/n022004l.pfb... 5009220 3607281 4613232 3208395 3 done. Loading Dingbats font from /usr/local/share/ghostscript/fonts/d050000l.pfb... 5069396 3697596 4633424 3245024 3 done. Page 2 Page 3 Page 4 Page 5 Page 6 Loading NimbusRomNo9L-Regu font from /usr/local/share/ghostscript/fonts/n021003l.pfb... 7428388 6038391 5259376 3299253 3 done. On freebsd, I installed the port gsfonts from /usr/ports/print/gsfonts/ so perhaps this is why I don't see the missing font error message that you have... So from my understanding, fonts are embedded in the documents (I don't even have this font on windows from what I can tell), when gs run on FreeBSD, it doesn't complain about a missing font but causes issue rendering them. On windows, no problem... Does it make sense to you from what you see in these output logs ? Thanks a lot for your help Regards ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ian Lord MSD Informatique 143 Rue des Fauvettes St-Colomban (Québec) J5K 0E2 Tél: (514) 776-6734 #201 Sans Frais: 1(877) 776-6734 #201 http://www.msdi.ca/ From: William Bader [mailto:[email protected]] Sent: 17 avril 2015 14:17 To: Ian Lord; [email protected] Subject: RE: [gs-devel] Problem with accents on freebsd but not on windows >We have pdf documents where fonts are embedded into them that do not render correctly (Some accents are missing) when using GS On freebsd. >If we take the same pdf and use GS on windows instead, all accents are fine. The document uses some fonts that are not embedded, so the results depend on the local fonts available on the system where you run gs. See the "Loading" comments from gs and the list of non-embedded fonts from pdffonts (a utility in the poppler package). On Fedora 20, I see the accented characters with gs9.16 built from source but not with gs9.14 provided by Fedora. On Fedora 20, "sudo yum provides '*/NimbusMon*'" does not find anything, so maybe FreeBSD and Fedora intentionally do not provide fonts. You should probably remake the PDF to embed all fonts if you want to ensure that it looks the same everywhere. $ gs -dNOPAUSE -sDEVICE=nullpage bad.pdf -c quit GPL Ghostscript 9.16 (2015-03-30) Copyright (C) 2015 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 6. Page 1 Loading NimbusMon-Bol font from %rom%Resource/Font/NimbusMon-Bol... 7116316 5570018 4569384 3147374 3 done. Loading Dingbats font from %rom%Resource/Font/Dingbats... 7213092 5676068 4609768 3192762 3 done. Page 2 Page 3 Page 4 Page 5 Page 6 Loading NimbusRom-Reg font from %rom%Resource/Font/NimbusRom-Reg... 9506764 7919390 9330800 7896573 3 done. $ /usr/bin/gs -dNOPAUSE -sDEVICE=nullpage bad.pdf -c quit GPL Ghostscript 9.14 (2014-03-26) Copyright (C) 2014 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 6. Page 1 Can't find (or can't open) font file /usr/share/ghostscript/9.14/Resource/Font/NimbusMonL-Bold. Can't find (or can't open) font file NimbusMonL-Bold. Can't find (or can't open) font file /usr/share/ghostscript/9.14/Resource/Font/NimbusMonL-Bold. Can't find (or can't open) font file NimbusMonL-Bold. Querying operating system for font files... Loading NimbusMonL-Bold font from /usr/share/fonts/default/Type1/n022004l.pfb... 4308956 2519126 5601312 2685609 3 done. Loading Dingbats font from /usr/share/fonts/default/Type1/d050000l.pfb... 4308588 2589843 5601312 2621265 3 done. Page 2 Page 3 Page 4 Page 5 Page 6 Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 4536004 2758545 4208616 2524121 3 done. $ pdffonts bad.pdf name type encoding emb sub uni object ID ------------------------------------ ----------------- ---------------- --- --- --- --------- NEPNIA+Frutiger-Cn Type 1C Custom yes yes yes 150 0 NEPNIB+Frutiger-BoldCn Type 1C Custom yes yes yes 149 0 NEPNJC+Frutiger-BlackCn Type 1C Custom yes yes yes 151 0 NEPNGP+Wingdings CID TrueType Identity-H yes yes no 147 0 NEPNJD+Wingdings TrueType WinAnsi yes yes no 148 0 Courier-Bold Type 1 Custom no no no 10 0 ZapfDingbats Type 1 ZapfDingbats no no no 397 0 Times-Roman Type 1 Custom no no no 71 0 ________________________________ From: [email protected]<mailto:[email protected]> To: [email protected]<mailto:[email protected]> Date: Fri, 17 Apr 2015 16:27:14 +0000 Subject: [gs-devel] Problem with accents on freebsd but not on windows Hi, I'm writing here hoping someone will be able to help me with a problem we have using gs to convert pdf documents to png. We have pdf documents where fonts are embedded into them that do not render correctly (Some accents are missing) when using GS On freebsd. If we take the same pdf and use GS on windows instead, all accents are fine. Strangely, other documents have accents fine on FreeBSD so it seems somewhat related to the specific font used in the document. But the same font works on windows... Total mystery to me :( If we open the document in Adobe Reader on windows, everything is fine. If we convert the document to png using Xpdf on FreeBSD, instead of Gs on freeBSD, accents are fine We tried playing with the fontmap, but from what I understood, if the font is embedded the fontmap is of no use ? I enclosed a copy of the problematic file (see bad.pdf) and the example of the accent problem that we have only on freebsd (see capture.jpg) I highlighted in yellow the missing accents from page 1. Also, I circled in red other accents that are working which makes me suspect the problem comes from the font itself, but just on freebsd not windows build... Any help would be greatly appreciated. Regards ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ian Lord MSD Informatique 143 Rue des Fauvettes St-Colomban (Québec) J5K 0E2 Tél: (514) 776-6734 #201 Sans Frais: 1(877) 776-6734 #201 http://www.msdi.ca/ _______________________________________________ gs-devel mailing list [email protected]<mailto:[email protected]> http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel _______________________________________________ gs-devel mailing list [email protected] http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel