Created attachment 8039 [details] printout.pdf Running pdf2ps printout.pdf gs printout.ps shows letters replaced by "''. Same result with gs -sDEVICE=ps2write -sOutputFile=printout.ps printout.pdf printout.pdf is attached. I am using Ghostscript 9.04 on Ubuntu Oneiric, 64-bit. See also https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/879977 This is similar to bug 692624 perhaps even the same problem.
Also this problem only occurs with "ps2write" as output device, not with "pswrite", "pdfwrite", or "png16m", like bug 692624.
Created attachment 8093 [details] Output from printout.pdf converted by ps2write. > Running > > pdf2ps printout.pdf > gs printout.ps > > shows letters replaced by "''. Till can you be specific about which letters ? I've attached the output I get from the current HEAD. When this PostScript file is run through the current GS HEAD to the display device I can't see any problems. However, I don't speak Italian at all, so I could well be missing the issue. There are 3 or so places where the ' character appears, but these seem to be present in the original PDF as well.
(In reply to comment #2) > Till can you be specific about which letters ? I've attached the output I get > from the current HEAD. When this PostScript file is run through the current GS > HEAD to the display device I can't see any problems. Hmm, it may be that this has been fixed.... I just retried #692624 where I did previously see a problem, and that issue seems to have disappeared. I'll see if I can use Git bisect to find the revision where this happened.
(In reply to comment #3) > (In reply to comment #2) > > > Till can you be specific about which letters ? I've attached the output I get > > from the current HEAD. When this PostScript file is run through the current GS > > HEAD to the display device I can't see any problems. > > Hmm, it may be that this has been fixed.... > > I just retried #692624 where I did previously see a problem, and that issue > seems to have disappeared. False alarm. For some reason the current HEAD output PDF instead of PostScript, I must have mis-typed the command line. I now do see the issue.
Just to report some progress. The problem 'seems' to be that we are writing a broken (or at least very odd) CMAP subtable into the subset TrueType font we embed in the PostScript file. This seems to depend purely on the size of the font, that is the number of glyphs present. I'm debugging my way through the TTF writing code to try and determine why.
The problem is that we were not assigning a name entry for the second (and subsequent) parts of a composite glyph, but we were assigning a glyph entry. The mismatch between the two tables caused the CMAP subtable to be written incorrectly. I have a potential fix which I am currently testing.
*** Bug 692624 has been marked as a duplicate of this bug. ***
I believe this is fixed with revision: 08dc12934adaa27978ec264dbf9c691a18d8c429 Testing showed 2 progressions in our test suite, and one regression which I will need to look at further. However the progressions seem important enough to incorporate now.