aboutsummaryrefslogtreecommitdiffstats
path: root/src/sandbox/org/apache
diff options
context:
space:
mode:
Diffstat (limited to 'src/sandbox/org/apache')
-rw-r--r--src/sandbox/org/apache/fop/render/svg/SVGPainter.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sandbox/org/apache/fop/render/svg/SVGPainter.java b/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
index d427096be..0ee13c021 100644
--- a/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
+++ b/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
@@ -325,19 +325,23 @@ public class SVGPainter extends AbstractIFPainter implements SVGConstants {
}
/** {@inheritDoc} */
- public void drawText(int x, int y, int[] dx, int[] dy, String text) throws IFException {
+ public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[] dx, String text)
+ throws IFException {
try {
establish(MODE_TEXT);
AttributesImpl atts = new AttributesImpl();
XMLUtil.addAttribute(atts, XMLConstants.XML_SPACE, "preserve");
XMLUtil.addAttribute(atts, "x", Integer.toString(x));
XMLUtil.addAttribute(atts, "y", Integer.toString(y));
+ if (letterSpacing != 0) {
+ XMLUtil.addAttribute(atts, "letter-spacing", Integer.toString(letterSpacing));
+ }
+ if (wordSpacing != 0) {
+ XMLUtil.addAttribute(atts, "word-spacing", Integer.toString(wordSpacing));
+ }
if (dx != null) {
XMLUtil.addAttribute(atts, "dx", IFUtil.toString(dx));
}
- if (dy != null) {
- XMLUtil.addAttribute(atts, "dy", IFUtil.toString(dy));
- }
handler.startElement("text", atts);
char[] chars = text.toCharArray();
handler.characters(chars, 0, chars.length);