You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ma...@apache.org on 2005/11/18 17:39:56 UTC
svn commit: r345517 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
Author: manuel
Date: Fri Nov 18 08:39:51 2005
New Revision: 345517
URL: http://svn.apache.org/viewcvs?rev=345517&view=rev
Log:
Added user config font registration to XML Renderer
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=345517&r1=345516&r2=345517&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java Fri Nov 18 08:39:51 2005
@@ -30,6 +30,8 @@
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.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.
@@ -108,6 +111,22 @@
*/
public XMLRenderer() {
context = new RendererContext(this, XML_MIME_TYPE);
+ }
+
+ /**
+ * 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);
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org