From d42301ccf1f480c77952f8db5c64670ff7411b7a Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 16 Oct 2007 15:12:45 +0000 Subject: [PATCH] Bugfix: If auto-detection is enabled, auto-detection didn't get done starting with the second rendering run in the same JVM. Static variables are dangerous! git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@585167 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/render/PrintRendererConfigurator.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/java/org/apache/fop/render/PrintRendererConfigurator.java b/src/java/org/apache/fop/render/PrintRendererConfigurator.java index 0b352c3a1..8591a4e7e 100644 --- a/src/java/org/apache/fop/render/PrintRendererConfigurator.java +++ b/src/java/org/apache/fop/render/PrintRendererConfigurator.java @@ -53,9 +53,6 @@ import org.apache.fop.util.LogUtil; public class PrintRendererConfigurator extends AbstractRendererConfigurator implements RendererConfigurator { - /** have we already autodetected system fonts? */ - private static boolean autodetectedFonts = false; - /** logger instance */ protected static Log log = LogFactory.getLog(PrintRendererConfigurator.class); @@ -126,7 +123,7 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator // native o/s search (autodetect) configuration boolean autodetectFonts = (fonts.getChild("auto-detect", false) != null); - if (!autodetectedFonts && autodetectFonts) { + if (autodetectFonts) { // search in font base if it is defined and // is a directory but don't recurse FontFileFinder fontFileFinder = new FontFileFinder(); @@ -158,7 +155,6 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator } catch (IOException e) { LogUtil.handleException(log, e, strict); } - autodetectedFonts = true; } // directory (multiple font) configuration -- 2.39.5