[poppler] poppler/GlobalParamsWin.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun May 6 15:25:53 UTC 2018


 poppler/GlobalParamsWin.cc |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 030c6123c42813818fbb94717d301d4723671545
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun May 6 17:25:39 2018 +0200

    Fix windows build

diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
index b1e5535c..9e041777 100644
--- a/poppler/GlobalParamsWin.cc
+++ b/poppler/GlobalParamsWin.cc
@@ -422,10 +422,11 @@ void GlobalParams::setupBaseFonts(char * dir)
     GetWindowsFontDir(winFontDir, sizeof(winFontDir));
 
     for (int i = 0; displayFontTab[i].name; ++i) {
-        GooString  *fontName = new GooString(displayFontTab[i].name);
-        if (fontFiles->lookup(fontName))
+        if (fontFiles.count(displayFontTab[i].name) > 0)
             continue;
 
+        GooString  *fontName = new GooString(displayFontTab[i].name);
+
         if (dir) {
             GooString *fontPath = appendToPath(new GooString(dir), displayFontTab[i].t1FileName);
             if (FileExists(fontPath->getCString()) ||
@@ -573,7 +574,7 @@ GooString *GlobalParams::findSystemFontFile(GfxFont *font,
                                                                 substFiles,
                                                                 fontName->getCString()));
     error(errSyntaxError, -1, "Couldn't find a font for '{0:t}', subst is '{1:t}'", fontName, substFontName);
-    const auto fontFile = fontFiles.find(substFontName);
+    const auto fontFile = fontFiles.find(substFontName->toStr());
     if (fontFile != fontFiles.end()) {
       path = new GooString(fontFile->second.c_str());
       if (substituteFontName)


More information about the poppler mailing list