[poppler] poppler/CairoFontEngine.cc
Adrian Johnson
ajohnson at kemper.freedesktop.org
Tue Jul 19 22:04:30 UTC 2016
poppler/CairoFontEngine.cc | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 8d5778feeb3c6cd932ecd7abeba7d1e670d2af66
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Tue Jul 19 22:58:39 2016 +0930
cairo: try finding glyphs in substitute fonts by unicode value
if the glyph name can not be found in the substitute font, try
converting the name to unicode value in see of the font cmap has a
mapping for the character.
Bug 96994
diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
index e13607f..6676f89 100644
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -467,6 +467,11 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
if ((name = enc[i])) {
codeToGID[i] = FT_Get_Name_Index(face, (char*)name);
if (codeToGID[i] == 0) {
+ Unicode u;
+ u = globalParams->mapNameToUnicodeText (name);
+ codeToGID[i] = FT_Get_Char_Index (face, u);
+ }
+ if (codeToGID[i] == 0) {
name = GfxFont::getAlternateName(name);
if (name) {
codeToGID[i] = FT_Get_Name_Index(face, (char*)name);
More information about the poppler
mailing list