Bug 690483 - wrong encoding when using customer TTF-fonts
Summary: wrong encoding when using customer TTF-fonts
Status: NOTIFIED DUPLICATE of bug 688515
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.64
Hardware: PC Windows XP
: P2 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-15 00:48 UTC by artifex
Modified: 2011-09-18 21:47 UTC (History)
0 users

See Also:
Customer: 870
Word Size: ---


Attachments
cidfmap (1.04 KB, text/plain)
2009-05-15 00:50 UTC, artifex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description artifex 2009-05-15 00:48:19 UTC
The PDF-file rotisfonts.pdf is using the fonts RotisSerif and RotisSansSerif. To
succeed in viewing or converting the PDF, I got the TrueType-fonts Rb.ttf and
Rg.ttf from my customer and I inserted two definitions for this fonts in cidfmap
( see attachement ). The PDF-file can now be rendered, but the texts in the
rectangles on the right side of the page have a wrong encoding. When viewing the
PDF-file with the AcrobatReader, you can see the correct text.
Is there an error in the Ghostscript or are my changes in cidfmap not correct.
Comment 1 artifex 2009-05-15 00:48:57 UTC
Created attachment 5019 [details]
rotisfonts.pdf
Comment 2 artifex 2009-05-15 00:50:33 UTC
Created attachment 5020 [details]
cidfmap
Comment 3 artifex 2009-05-15 00:54:56 UTC
Created attachment 5021 [details]
Rb.ttf
Comment 4 artifex 2009-05-15 00:55:42 UTC
Created attachment 5022 [details]
Rg.ttf
Comment 5 Alex Cherepanov 2009-05-21 11:38:47 UTC
PDF interpreter can already load embedded TTF fonts and does it well.
When we have the right font we need to use it directly, like an embedded
font and drop Decoding resources and all associated cruft.

I've tested this approach and it works fine for the sample file.
We just need to figure out what TTF or OTF fonts are available.
Comment 6 Ray Johnston 2009-06-16 09:32:29 UTC
If the location of the .ttf fonts is identified with -sFONTPATH, and _IF_ the
names in the ttf fonts MATCH the name given in the PDF, then GS will automatically
load the TTF fonts.

If the names don't match, then an alias may need to be added to the Fontmap.
Comment 7 artifex 2009-06-22 01:37:53 UTC
The Ghostscipt finds the TTF-fonts, but the enconding is not correct!
When I use the attached file cidfmap, the Ghostscript is showing the messages:

"Loading a TT font from Rg.ttf to emulate a CID font RotisSerif ... Done"
"Loading a TT font from Rb.ttf to emulate a CID font RotisSansSerif ... Done"

But the text, which is produced ist not correct. You can see this in the
rectangle in the upper right corner of the picture. There should be text "siehe
BBN 11-0009".
Comment 8 Ken Sharp 2009-07-01 01:53:31 UTC

*** This bug has been marked as a duplicate of 688515 ***
Comment 9 Marcos H. Woehrmann 2011-09-18 21:47:07 UTC
Changing customer bugs that have been resolved more than a year ago to closed.