From: Adrian Cumiskey Date: Fri, 20 Mar 2009 16:27:10 +0000 (+0000) Subject: Moved the font cache change check from outside PrintRendererConfigurator to inside... X-Git-Tag: fop-1_0~285 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6dfb589f8b4217771daedbac864ad31cf67e6f24;p=xmlgraphics-fop.git Moved the font cache change check from outside PrintRendererConfigurator to inside the FontInfoConfigurator. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@756583 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fonts/FontInfoConfigurator.java b/src/java/org/apache/fop/fonts/FontInfoConfigurator.java index 07407e9ae..c97901163 100644 --- a/src/java/org/apache/fop/fonts/FontInfoConfigurator.java +++ b/src/java/org/apache/fop/fonts/FontInfoConfigurator.java @@ -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"); diff --git a/src/java/org/apache/fop/render/PrintRendererConfigurator.java b/src/java/org/apache/fop/render/PrintRendererConfigurator.java index 26c34585e..67dda0354 100644 --- a/src/java/org/apache/fop/render/PrintRendererConfigurator.java +++ b/src/java/org/apache/fop/render/PrintRendererConfigurator.java @@ -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/**/ fontInfoList = new java.util.ArrayList/**/(); fontInfoConfigurator.configure(fontInfoList); - - if (fontCache != null && fontCache.hasChanged()) { - fontCache.save(); - } return fontInfoList; }