[Poppler-bugs] [Bug 93299] Poppler fails to display pdf correctly
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jan 15 06:56:03 PST 2016
https://bugs.freedesktop.org/show_bug.cgi?id=93299
Jason Crain <jason at aquaticape.us> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #120735|0 |1
is obsolete| |
--- Comment #5 from Jason Crain <jason at aquaticape.us> ---
Created attachment 121066
--> https://bugs.freedesktop.org/attachment.cgi?id=121066&action=edit
Fallback to looking up glyph by Unicode code point
Sorry about the crash. That's what I get for testing with a subset of
documents that happened to not have any CID fonts. :/
This version of the patch fixes the crash / invalid cast by checking for and
filtering out CID fonts. I think the CID case is already taken care of by
requesting the language from fontconfig. And I'm not completely sure how the
CID charcode to unicode stuff works, but it looks like some of the maps are
thousands of entries long, which would make this approach infeasable for CID
fonts anyway.
While doing more testing, I also noticed that the previous patch caused some
documents to have less appropriate fonts substituted. An italic, bold, or
light font might be replaced with a more generic font because it had better
unicode coverage, even if the document didn't actually use any of the
characters. To prevent that, this patch adds a dependency on icu to look up
the unicode character class and only add the character if it's alphabetic.
This also doesn't use the character set for a ZapfDingbats or Symbol font,
because some documents used WinAnsiEncoding for these, or if fontconfig was
able to find a font with the exact name as the document requested, such as
MTExtra or ComicSansMS.
Also fixed a problem where because the buildFcPattern function modifies the
font name from it's arguments in place, it may not work right if it's called a
second time with the same arguments and can lose the bold/italic/etc modifiers
from the font.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20160115/f5d0951a/attachment.html>
More information about the Poppler-bugs
mailing list