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

New commits:
commit a729d005a7204791fa8415de5aa0834136073ce8
Author: Pino Toscano <p...@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;
_______________________________________________
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to