aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/render
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-06-26 12:21:45 +0000
committerKeiron Liddle <keiron@apache.org>2001-06-26 12:21:45 +0000
commit274457796635ff2e75387080afc3d16c70f32aaf (patch)
tree7b9b69175e3ea18d6665e38f5aefdd1d786d7d89 /src/org/apache/fop/render
parente2f5099ed6725379d33be6bfb0ca517c621cea84 (diff)
downloadxmlgraphics-fop-274457796635ff2e75387080afc3d16c70f32aaf.tar.gz
xmlgraphics-fop-274457796635ff2e75387080afc3d16c70f32aaf.zip
added initial impl of text painter that uses pdf fonts
rather than stroking git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194317 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/render')
-rw-r--r--src/org/apache/fop/render/pdf/PDFRenderer.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java
index e9d7e4c83..fbb1faebd 100644
--- a/src/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/org/apache/fop/render/pdf/PDFRenderer.java
@@ -371,7 +371,7 @@ public class PDFRenderer extends PrintRenderer {
UserAgent userAgent = new MUserAgent(new AffineTransform());
GVTBuilder builder = new GVTBuilder();
- GraphicsNodeRenderContext rc = getRenderContext();
+ GraphicsNodeRenderContext rc = getRenderContext(fs);
BridgeContext ctx = new BridgeContext(userAgent, rc);
GraphicsNode root;
PDFGraphics2D graphics =
@@ -392,7 +392,7 @@ public class PDFRenderer extends PrintRenderer {
currentStream.add("Q\n");
}
- public GraphicsNodeRenderContext getRenderContext() {
+ public GraphicsNodeRenderContext getRenderContext(FontState fs) {
GraphicsNodeRenderContext nodeRenderContext = null;
if (nodeRenderContext == null) {
RenderingHints hints = new RenderingHints(null);
@@ -406,9 +406,13 @@ public class PDFRenderer extends PrintRenderer {
new FontRenderContext(new AffineTransform(), true,
true);
- TextPainter textPainter = new StrokingTextPainter();
- //TextPainter textPainter = new PDFTextPainter();
-
+ TextPainter textPainter = null;
+ Boolean bl = org.apache.fop.configuration.Configuration.getBooleanValue("strokeSVGText");
+ if(bl == null || bl.booleanValue()) {
+ textPainter = new StrokingTextPainter();
+ } else {
+ textPainter = new PDFTextPainter(fs);
+ }
GraphicsNodeRableFactory gnrFactory =
new ConcreteGraphicsNodeRableFactory();