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 je...@apache.org on 2004/10/10 13:26:51 UTC
cvs commit: xml-fop/src/java/org/apache/fop/render/ps PSRenderer.java
jeremias 2004/10/10 04:26:51
Modified: src/java/org/apache/fop/render/ps PSRenderer.java
Log:
Make fonts configurable for PS Renderer and now use PrintRenderer as base class just as the PDF Renderer does.
Revision Changes Path
1.33 +10 -13 xml-fop/src/java/org/apache/fop/render/ps/PSRenderer.java
Index: PSRenderer.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps/PSRenderer.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- PSRenderer.java 22 Sep 2004 13:12:38 -0000 1.32
+++ PSRenderer.java 10 Oct 2004 11:26:51 -0000 1.33
@@ -43,6 +43,7 @@
import org.apache.fop.fonts.Typeface;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.render.AbstractRenderer;
+import org.apache.fop.render.PrintRenderer;
import org.apache.fop.render.RendererContext;
import org.apache.fop.image.FopImage;
@@ -70,7 +71,7 @@
* @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
* @version $Id$
*/
-public class PSRenderer extends AbstractRenderer {
+public class PSRenderer extends PrintRenderer {
/** The MIME type for PostScript */
public static final String MIME_TYPE = "application/postscript";
@@ -91,14 +92,20 @@
private float currGreen;
private float currBlue;
- private FontInfo fontInfo;
-
/**
* @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
*/
public void configure(Configuration cfg) throws ConfigurationException {
super.configure(cfg);
this.autoRotateLandscape = cfg.getChild("auto-rotate-landscape").getValueAsBoolean(false);
+
+ //Font configuration
+ List cfgFonts = FontSetup.buildFontListFromConfiguration(cfg);
+ if (this.fontList == null) {
+ this.fontList = cfgFonts;
+ } else {
+ this.fontList.addAll(cfgFonts);
+ }
}
/**
@@ -220,16 +227,6 @@
} catch (IOException ioe) {
handleIOTrouble(ioe);
}
- }
-
- /**
- * Set up the font info
- *
- * @param inFontInfo the font info object to set up
- */
- public void setupFontInfo(FontInfo inFontInfo) {
- this.fontInfo = inFontInfo;
- FontSetup.setup(fontInfo, null);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org