diff options
author | Jeremias Maerki <jeremias@apache.org> | 2009-03-24 08:08:54 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2009-03-24 08:08:54 +0000 |
commit | c71b4374b1b89486e7103116eaace7c0adf9a84d (patch) | |
tree | 72aff0d427887852c950c14dd3e9b60d684e6d6c /src/java | |
parent | 837cacd29624ddf4f1a58fc7069121ee8652c8f7 (diff) | |
download | xmlgraphics-fop-c71b4374b1b89486e7103116eaace7c0adf9a84d.tar.gz xmlgraphics-fop-c71b4374b1b89486e7103116eaace7c0adf9a84d.zip |
Amendment to revision 755894:
The mimicking fix didn't work for all output formats.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@757681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/fop/render/PrintRendererConfigurator.java | 7 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/intermediate/IFUtil.java | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/render/PrintRendererConfigurator.java b/src/java/org/apache/fop/render/PrintRendererConfigurator.java index 67dda0354..66618b093 100644 --- a/src/java/org/apache/fop/render/PrintRendererConfigurator.java +++ b/src/java/org/apache/fop/render/PrintRendererConfigurator.java @@ -29,7 +29,6 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.FopFactory; import org.apache.fop.fonts.CustomFontCollection; -import org.apache.fop.fonts.FontCache; import org.apache.fop.fonts.FontCollection; import org.apache.fop.fonts.FontEventAdapter; import org.apache.fop.fonts.FontEventListener; @@ -40,8 +39,6 @@ import org.apache.fop.fonts.FontResolver; import org.apache.fop.fonts.base14.Base14FontCollection; import org.apache.fop.render.intermediate.IFDocumentHandler; import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator; -import org.apache.fop.render.intermediate.IFUtil; -import org.apache.fop.util.LogUtil; /** * Base Print renderer configurator (mostly handles font configuration) @@ -108,7 +105,7 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator fontInfoConfigurator.configure(fontInfoList); return fontInfoList; } - + // ---=== IFDocumentHandler configuration ===--- /** {@inheritDoc} */ @@ -123,7 +120,7 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator List fontCollections = new java.util.ArrayList(); fontCollections.add(new Base14FontCollection(fontManager.isBase14KerningEnabled())); - Configuration cfg = super.getRendererConfig(IFUtil.getEffectiveMIMEType(documentHandler)); + Configuration cfg = super.getRendererConfig(documentHandler.getMimeType()); if (cfg != null) { FontResolver fontResolver = new DefaultFontResolver(userAgent); FontEventListener listener = new FontEventAdapter( diff --git a/src/java/org/apache/fop/render/intermediate/IFUtil.java b/src/java/org/apache/fop/render/intermediate/IFUtil.java index 58399f3ac..437648bcc 100644 --- a/src/java/org/apache/fop/render/intermediate/IFUtil.java +++ b/src/java/org/apache/fop/render/intermediate/IFUtil.java @@ -153,6 +153,13 @@ public class IFUtil { if (fontInfo == null) { fontInfo = new FontInfo(); } + if (documentHandler instanceof IFSerializer) { + IFSerializer serializer = (IFSerializer)documentHandler; + if (serializer.getMimickedDocumentHandler() != null) { + //Use the mimicked document handler's configurator to set up fonts + documentHandler = serializer.getMimickedDocumentHandler(); + } + } IFDocumentHandlerConfigurator configurator = documentHandler.getConfigurator(); if (configurator != null) { configurator.setupFontInfo(documentHandler, fontInfo); |