From 6f9ca1ab175781c0e6dafc0d65de4c715f7f94ff Mon Sep 17 00:00:00 2001 From: Adrian Cumiskey Date: Fri, 9 May 2008 16:13:47 +0000 Subject: [PATCH] Moved the instantiation of the FontManager to the constructor along with all the other aggregated objects. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@654869 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/apps/FopFactory.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/java/org/apache/fop/apps/FopFactory.java b/src/java/org/apache/fop/apps/FopFactory.java index ae4d25949..2d4029da8 100644 --- a/src/java/org/apache/fop/apps/FopFactory.java +++ b/src/java/org/apache/fop/apps/FopFactory.java @@ -144,6 +144,14 @@ public class FopFactory implements ImageContext { this.config = new FopFactoryConfigurator(this); this.elementMappingRegistry = new ElementMappingRegistry(this); this.foURIResolver = new FOURIResolver(validateUserConfigStrictly()); + this.fontManager = new FontManager() { + + /** {@inheritDoc} */ + public void setFontBaseURL(String fontBase) throws MalformedURLException { + super.setFontBaseURL(getFOURIResolver().checkBaseURL(fontBase)); + } + + }; this.colorSpaceCache = new ColorSpaceCache(foURIResolver); this.imageManager = new ImageManager(this); this.rendererFactory = new RendererFactory(); @@ -696,16 +704,6 @@ public class FopFactory implements ImageContext { * @return the font manager */ public FontManager getFontManager() { - if (fontManager == null) { - this.fontManager = new FontManager() { - - /** {@inheritDoc} */ - public void setFontBaseURL(String fontBase) throws MalformedURLException { - super.setFontBaseURL(getFOURIResolver().checkBaseURL(fontBase)); - } - - }; - } return this.fontManager; } -- 2.39.5