[poppler] Branch 'poppler-0.18' - poppler/GfxFont.cc poppler/GlobalParams.cc

Adrian Johnson ajohnson at kemper.freedesktop.org
Fri Jan 6 15:27:27 PST 2012


 poppler/GfxFont.cc      |    2 +-
 poppler/GlobalParams.cc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 12e91b1e25fd6c913c63c4e683dde33b583d6fc5
Author: Yi Yang <ahyangyi at gmail.com>
Date:   Sat Jan 7 09:44:42 2012 +1030

    Include .otf fonts when finding substitute fonts
    
    Bug 44412
    (cherry picked from commit 9979b1b3e36dc8085d8c684692fece463fa474b1)

diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
index 114c797..01325a8 100644
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -449,7 +449,7 @@ CharCodeToUnicode *GfxFont::readToUnicodeCMap(Dict *fontDict, int nBits,
 
 void GfxFont::findExtFontFile() {
   static char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL };
-  static char *ttExts[] = { ".ttf", ".ttc", NULL };
+  static char *ttExts[] = { ".ttf", ".ttc", ".otf", NULL };
 
   if (name) {
     if (type == fontType1) {
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index 2e11bb0..1e0ddc0 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -1247,7 +1247,7 @@ DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
         ext = strrchr((char*)s,'.');
         if (!ext)
           continue;
-        if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4))
+        if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4) || !strncasecmp(ext, ".otf", 4))
         {
           dfp = new DisplayFontParam(fontName->copy(), displayFontTT);  
           dfp->tt.fileName = new GooString((char*)s);


More information about the poppler mailing list