aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2004-10-10 11:26:51 +0000
committerJeremias Maerki <jeremias@apache.org>2004-10-10 11:26:51 +0000
commit530c9e0e74b2bc440047e2d98250a46f71c9a6bc (patch)
tree866c0f05e8b0ae78d118c41784d92c600df9b239 /src/java/org/apache/fop
parentf274e5b625ef8170245d075109c4105e1ab6c465 (diff)
downloadxmlgraphics-fop-530c9e0e74b2bc440047e2d98250a46f71c9a6bc.tar.gz
xmlgraphics-fop-530c9e0e74b2bc440047e2d98250a46f71c9a6bc.zip
Make fonts configurable for PS Renderer and now use PrintRenderer as base class just as the PDF Renderer does.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198022 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/render/ps/PSRenderer.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/java/org/apache/fop/render/ps/PSRenderer.java b/src/java/org/apache/fop/render/ps/PSRenderer.java
index 88d313f06..41bb25f41 100644
--- a/src/java/org/apache/fop/render/ps/PSRenderer.java
+++ b/src/java/org/apache/fop/render/ps/PSRenderer.java
@@ -43,6 +43,7 @@ import org.apache.fop.fonts.FontSetup;
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 @@ import org.w3c.dom.Document;
* @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
* @version $Id: PSRenderer.java,v 1.31 2003/03/11 08:42:24 jeremias Exp $
*/
-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 @@ public class PSRenderer extends AbstractRenderer {
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);
+ }
}
/**
@@ -223,16 +230,6 @@ public class PSRenderer extends AbstractRenderer {
}
/**
- * 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);
- }
-
- /**
* Draws a filled rectangle.
* @param x x-coordinate
* @param y y-coordinate