diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-08-12 12:48:28 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-08-12 12:48:28 +0000 |
commit | 7c7db27451c36cc6ace1c3082bd2ddf0a3c1a5cd (patch) | |
tree | 3bc8bbc63adebd9a4acd33dbce5fa10c5ecc9fc7 | |
parent | 3a39c6dca832b0c3626af4a7d39eb80dcb07aabf (diff) | |
download | xmlgraphics-fop-7c7db27451c36cc6ace1c3082bd2ddf0a3c1a5cd.tar.gz xmlgraphics-fop-7c7db27451c36cc6ace1c3082bd2ddf0a3c1a5cd.zip |
Resolved a build problem after the last merge from trunk.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@685134 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/render/PrintRendererConfigurator.java | 10 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/render/PrintRendererConfigurator.java b/src/java/org/apache/fop/render/PrintRendererConfigurator.java index 001a99dca..806331e88 100644 --- a/src/java/org/apache/fop/render/PrintRendererConfigurator.java +++ b/src/java/org/apache/fop/render/PrintRendererConfigurator.java @@ -87,7 +87,9 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator PrintRenderer printRenderer = (PrintRenderer)renderer; FontResolver fontResolver = printRenderer.getFontResolver(); - List embedFontInfoList = buildFontList(cfg, fontResolver); + FontEventListener listener = new FontEventAdapter( + renderer.getUserAgent().getEventBroadcaster()); + List embedFontInfoList = buildFontList(cfg, fontResolver, listener); printRenderer.addFontList(embedFontInfoList); } @@ -95,10 +97,12 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator * Builds the font list from configuration. * @param cfg the configuration object * @param fontResolver a font resolver + * @param listener the font event listener * @return the list of {@code EmbedFontInfo} objects * @throws FOPException if an error occurs while processing the configuration */ - protected List buildFontList(Configuration cfg, FontResolver fontResolver) throws FOPException { + protected List buildFontList(Configuration cfg, FontResolver fontResolver, + FontEventListener listener) throws FOPException { FopFactory factory = userAgent.getFactory(); FontManager fontManager = factory.getFontManager(); if (fontResolver == null) { @@ -109,8 +113,6 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator boolean strict = factory.validateUserConfigStrictly(); FontCache fontCache = fontManager.getFontCache(); - FontEventListener listener = new FontEventAdapter( - renderer.getUserAgent().getEventBroadcaster()); List/*<EmbedFontInfo>*/ embedFontInfoList = buildFontListFromConfiguration(cfg, fontResolver, strict, fontManager, listener); diff --git a/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java b/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java index 2504a4457..50b489717 100644 --- a/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java +++ b/src/java/org/apache/fop/render/pdf/PDFRendererConfigurator.java @@ -30,6 +30,7 @@ import org.apache.fop.apps.FOUserAgent; import org.apache.fop.fonts.CustomFontCollection; import org.apache.fop.fonts.FontCollection; import org.apache.fop.fonts.FontEventAdapter; +import org.apache.fop.fonts.FontEventListener; import org.apache.fop.fonts.FontInfo; import org.apache.fop.fonts.FontManager; import org.apache.fop.fonts.FontResolver; @@ -215,15 +216,16 @@ public class PDFRendererConfigurator extends PrintRendererConfigurator List fontCollections = new java.util.ArrayList(); fontCollections.add(new Base14FontCollection(fontManager.isBase14KerningEnabled())); + FontEventListener listener = new FontEventAdapter(userAgent.getEventBroadcaster()); Configuration cfg = super.getRendererConfig(painter.getMimeType()); if (cfg != null) { FontResolver fontResolver = new DefaultFontResolver(userAgent); - List fontList = buildFontList(cfg, fontResolver); + List fontList = buildFontList(cfg, fontResolver, listener); fontCollections.add(new CustomFontCollection(fontResolver, fontList)); } FontInfo fontInfo = new FontInfo(); - fontInfo.setEventListener(new FontEventAdapter(userAgent.getEventBroadcaster())); + fontInfo.setEventListener(listener); fontManager.setup(fontInfo, (FontCollection[])fontCollections.toArray( new FontCollection[fontCollections.size()])); |