diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2014-02-03 19:29:24 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2014-02-03 19:29:24 +0000 |
commit | b7337223e89e48953aba14d78307316955940ca5 (patch) | |
tree | 8b5aa7e0ce2157a6393b7ccde6695724cb2b122d /src/java/org/apache/fop/svg/PDFTranscoder.java | |
parent | cdc09052891898a46b70b3298c389e96ffff87ac (diff) | |
parent | b77ca4486fd70efa1a9cfc8e4dcf84bcd155fc17 (diff) | |
download | xmlgraphics-fop-b7337223e89e48953aba14d78307316955940ca5.tar.gz xmlgraphics-fop-b7337223e89e48953aba14d78307316955940ca5.zip |
Merged branch Temp_FopFontsForSVGback into trunk
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1564017 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/svg/PDFTranscoder.java')
-rw-r--r-- | src/java/org/apache/fop/svg/PDFTranscoder.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/svg/PDFTranscoder.java b/src/java/org/apache/fop/svg/PDFTranscoder.java index 9f0345657..1a3f154cb 100644 --- a/src/java/org/apache/fop/svg/PDFTranscoder.java +++ b/src/java/org/apache/fop/svg/PDFTranscoder.java @@ -31,7 +31,6 @@ import org.apache.avalon.framework.configuration.Configuration; import org.apache.batik.bridge.BridgeContext; import org.apache.batik.bridge.UnitProcessor; -import org.apache.batik.bridge.UserAgent; import org.apache.batik.ext.awt.RenderingHintsKeyExt; import org.apache.batik.transcoder.TranscoderException; import org.apache.batik.transcoder.TranscoderOutput; @@ -39,6 +38,7 @@ import org.apache.batik.transcoder.image.ImageTranscoder; import org.apache.fop.Version; import org.apache.fop.fonts.FontInfo; +import org.apache.fop.svg.font.FOPFontFamilyResolverImpl; /** * <p>This class enables to transcode an input to a PDF document.</p> @@ -88,7 +88,7 @@ public class PDFTranscoder extends AbstractFOPTranscoder { /** * {@inheritDoc} */ - protected UserAgent createUserAgent() { + protected FOPTranscoderUserAgent createUserAgent() { return new AbstractFOPTranscoder.FOPTranscoderUserAgent() { // The PDF stuff wants everything at 72dpi public float getPixelUnitToMillimeter() { @@ -131,6 +131,8 @@ public class PDFTranscoder extends AbstractFOPTranscoder { } else { graphics.setupDefaultFontInfo(); } + ((FOPTranscoderUserAgent) userAgent).setFontFamilyResolver( + new FOPFontFamilyResolverImpl(graphics.getFontInfo())); } catch (Exception e) { throw new TranscoderException( "Error while setting up PDFDocumentGraphics2D", e); |