]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Moved the font cache change check from outside PrintRendererConfigurator to inside...
authorAdrian Cumiskey <acumiskey@apache.org>
Fri, 20 Mar 2009 16:27:10 +0000 (16:27 +0000)
committerAdrian Cumiskey <acumiskey@apache.org>
Fri, 20 Mar 2009 16:27:10 +0000 (16:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@756583 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/FontInfoConfigurator.java
src/java/org/apache/fop/render/PrintRendererConfigurator.java

index 07407e9aebb3b67cafd559572ba2e726b2721aca..c979011631861092e8159020e3cc558cb7b5dfa6 100644 (file)
@@ -100,7 +100,12 @@ public class FontInfoConfigurator {
 
             // Update referenced fonts (fonts which are not to be embedded)
             fontManager.updateReferencedFonts(fontInfoList);
-            
+
+            // Update font cache if it has changed
+            if (fontCache != null && fontCache.hasChanged()) {
+                fontCache.save();
+            }
+
             if (log.isDebugEnabled()) {
                 log.debug("Finished font configuration in "
                         + (System.currentTimeMillis() - start) + "ms");
index 26c34585e2f5b6e92f701e22a20fd4dd0c43bdd8..67dda0354dfc3ca9c24e6db4bf66a31daf98f651 100644 (file)
@@ -100,17 +100,12 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator
         }
 
         boolean strict = factory.validateUserConfigStrictly();
-        FontCache fontCache = fontManager.getFontCache();
 
         //Read font configuration
         FontInfoConfigurator fontInfoConfigurator
             = new FontInfoConfigurator(cfg, fontManager, fontResolver, listener, strict);
         List/*<EmbedFontInfo>*/ fontInfoList = new java.util.ArrayList/*<EmbedFontInfo>*/();
         fontInfoConfigurator.configure(fontInfoList);
-
-        if (fontCache != null && fontCache.hasChanged()) {
-            fontCache.save();
-        }
         return fontInfoList;
     }