[poppler] Branch 'poppler-0.12' - poppler/GlobalParams.cc poppler/GlobalParams.h poppler/GlobalParamsWin.cc

Pino Toscano pino at kemper.freedesktop.org
Thu Sep 17 11:22:01 PDT 2009


 poppler/GlobalParams.cc    |    1 +
 poppler/GlobalParams.h     |    1 +
 poppler/GlobalParamsWin.cc |    1 -
 3 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4b22a958339619cb0f54e9d82e08d9fc6b3a3fbf
Author: Pino Toscano <pino at kde.org>
Date:   Thu Sep 17 20:12:20 2009 +0200

    Windows32/MSVC: initialize the font list once per GlobalParams, instead of once at all
    
    this fixes the font list being empty at the second (and following) GlobalParams creation
    thanks for Christian Ehrlicher for reporting the bug and testing its fix

diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index 1cf7208..3cd9ccb 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -642,6 +642,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir)
   cMapCache = new CMapCache();
 
 #ifdef WIN32
+  baseFontsInitialized = gFalse;
   winFontList = NULL;
 #endif
 
diff --git a/poppler/GlobalParams.h b/poppler/GlobalParams.h
index 27a41cc..10537a4 100644
--- a/poppler/GlobalParams.h
+++ b/poppler/GlobalParams.h
@@ -306,6 +306,7 @@ private:
   GooHash *displayFonts;		// display font info, indexed by font name
 				//   [DisplayFontParam]
 #ifdef WIN32
+  GBool baseFontsInitialized;
   WinFontList *winFontList;	// system TrueType fonts
 #endif
   GBool psExpandSmaller;	// expand smaller pages to fill paper
diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
index 015f0d3..19ea546 100644
--- a/poppler/GlobalParamsWin.cc
+++ b/poppler/GlobalParamsWin.cc
@@ -220,7 +220,6 @@ static void AddFont(GooHash *displayFonts, char *fontName, GooString *fontPath,
 
 void GlobalParams::setupBaseFonts(char * dir)
 {
-    static bool baseFontsInitialized = false;
     if (baseFontsInitialized)
         return;
     baseFontsInitialized = true;


More information about the poppler mailing list