diff options
author | Manuel Mall <manuel@apache.org> | 2005-11-18 16:39:51 +0000 |
---|---|---|
committer | Manuel Mall <manuel@apache.org> | 2005-11-18 16:39:51 +0000 |
commit | 078f16be91cadb05097fcefee141928162e94efe (patch) | |
tree | c4e155a7a45cb5e4a8b74831e42365ae241a448e | |
parent | 39f237527297ad08c500546699beb4a1c85a2569 (diff) | |
download | xmlgraphics-fop-078f16be91cadb05097fcefee141928162e94efe.tar.gz xmlgraphics-fop-078f16be91cadb05097fcefee141928162e94efe.zip |
Added user config font registration to XML Renderer
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@345517 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/render/xml/XMLRenderer.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/xml/XMLRenderer.java b/src/java/org/apache/fop/render/xml/XMLRenderer.java index e02b07f2f..3de2faf3b 100644 --- a/src/java/org/apache/fop/render/xml/XMLRenderer.java +++ b/src/java/org/apache/fop/render/xml/XMLRenderer.java @@ -30,6 +30,8 @@ import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; +import org.apache.avalon.framework.configuration.Configuration; +import org.apache.avalon.framework.configuration.ConfigurationException; import org.w3c.dom.Document; import org.xml.sax.Attributes; @@ -69,6 +71,7 @@ import org.apache.fop.area.inline.Viewport; import org.apache.fop.area.inline.TextArea; import org.apache.fop.area.inline.SpaceArea; import org.apache.fop.area.inline.WordArea; +import org.apache.fop.fonts.FontSetup; /** * Renderer that renders areas to XML for debugging purposes. @@ -111,6 +114,22 @@ public class XMLRenderer extends PrintRenderer { } /** + * Configure the PDF renderer. + * Get the configuration to be used for pdf stream filters, + * fonts etc. + * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration) + */ + public void configure(Configuration cfg) throws ConfigurationException { + //Font configuration + List cfgFonts = FontSetup.buildFontListFromConfiguration(cfg); + if (this.fontList == null) { + this.fontList = cfgFonts; + } else { + this.fontList.addAll(cfgFonts); + } + } + + /** * @see org.apache.fop.render.Renderer#setUserAgent(FOUserAgent) */ public void setUserAgent(FOUserAgent agent) { |