aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render
diff options
context:
space:
mode:
authorChris Bowditch <cbowditch@apache.org>2009-07-10 10:32:23 +0000
committerChris Bowditch <cbowditch@apache.org>2009-07-10 10:32:23 +0000
commit37f5573e66f1e4ef0d7604d888e4d67f2b04aa7c (patch)
tree10c1fbea3a396c6dabf5ce55c97526bfe4a20a03 /src/java/org/apache/fop/render
parent384e523b10e66b05ec7b608ee421eaf6ecffeee3 (diff)
downloadxmlgraphics-fop-37f5573e66f1e4ef0d7604d888e4d67f2b04aa7c.tar.gz
xmlgraphics-fop-37f5573e66f1e4ef0d7604d888e4d67f2b04aa7c.zip
Bugfix: support justified text in AFP Renderer (already working in AFP Painter)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@792873 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render')
-rw-r--r--src/java/org/apache/fop/render/afp/AFPRenderer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/afp/AFPRenderer.java b/src/java/org/apache/fop/render/afp/AFPRenderer.java
index 5024fa7b6..b9eb345b7 100644
--- a/src/java/org/apache/fop/render/afp/AFPRenderer.java
+++ b/src/java/org/apache/fop/render/afp/AFPRenderer.java
@@ -75,6 +75,7 @@ import org.apache.fop.area.inline.TextArea;
import org.apache.fop.datatypes.URISpecification;
import org.apache.fop.events.ResourceEventProducer;
import org.apache.fop.fo.extensions.ExtensionAttachment;
+import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.FontCollection;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fonts.FontManager;
@@ -563,6 +564,8 @@ public class AFPRenderer extends AbstractPathOrientedRenderer implements AFPCust
AFPFont font = (AFPFont)fontMetricMap.get(internalFontName);
AFPPageFonts pageFonts = paintingState.getPageFonts();
AFPFontAttributes fontAttributes = pageFonts.registerFont(internalFontName, font, fontSize);
+ Font fnt = getFontFromArea(text);
+
// create text data info
AFPTextDataInfo textDataInfo = new AFPTextDataInfo();
@@ -603,7 +606,7 @@ public class AFPRenderer extends AbstractPathOrientedRenderer implements AFPCust
textDataInfo.setString(textString);
try {
- dataStream.createText(textDataInfo);
+ dataStream.createText(textDataInfo, textLetterSpaceAdjust, textWordSpaceAdjust, fnt, charSet);
} catch (UnsupportedEncodingException e) {
AFPEventProducer eventProducer
= AFPEventProducer.Provider.get(userAgent.getEventBroadcaster());