From 8d5778feeb3c6cd932ecd7abeba7d1e670d2af66 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Tue, 19 Jul 2016 22:58:39 +0930 Subject: [PATCH] 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 --- poppler/CairoFontEngine.cc | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.1.4