| Summary: | shows wrong characters | ||
|---|---|---|---|
| Product: | poppler | Reporter: | Jason Crain <jason> |
| Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
| Status: | RESOLVED MOVED | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: |
03-DynamickeModelyAChyby-LJ-2014.PDF - shows wrong characters
rendering of page 1 in pdftocairo Patch to allow CID identity font |
||
|
Description
Jason Crain
2017-10-06 17:51:44 UTC
Created attachment 134712 [details]
rendering of page 1 in pdftocairo
Attached is the rendering I get from pdftocairo.
I don't know why people keep using buggy pdf printers when Word has a perfectly good save as pdf feature builtin that preserves all the hyperlinks.
The pdf fails to render with Adobe Reader on Linux. Since it works on other viewers on Linux I had a quick look to see if there is anything we can do.
The problem is the fonts are all non-embedded CID TrueType with Identity encoding. The fonts do have ToUnicode maps which I assume is what the other viewers are using to map character codes to a substitute font.
When loading a substitute CID font, GfxCIDFont::getCodeToGIDMap() is called to map the character codes to the substitute font glyphs.
At line 2252 we bail out
if (getCollection()->cmp("Adobe-Identity") == 0) return NULL;
I commented out this line and the PDF seems to render fine (as it is not in English a can't be 100% certain).
I don't know if this is a fix or a hack. I have not spent any time investigating the implications of commenting out this line.
Adrian, can you attach the patch (want to make sure i'm not trying the wrong change) And once you do that i'll try to run a regtest and see if something breaks Created attachment 134971 [details] [review] Patch to allow CID identity font This regresses the rendering of https://bugs.freedesktop.org/attachment.cgi?id=54089 -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/410. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.