aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/intermediate
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-12-22 14:11:52 +0000
committerJeremias Maerki <jeremias@apache.org>2008-12-22 14:11:52 +0000
commit8ef2099f5d82ff553b2c34420eb269d1e9d07b22 (patch)
treec92e300da257596719bca296811b2809adb635b9 /src/java/org/apache/fop/render/intermediate
parente8383ed28560a67758a45f0b421021b210d6ca1f (diff)
downloadxmlgraphics-fop-8ef2099f5d82ff553b2c34420eb269d1e9d07b22.tar.gz
xmlgraphics-fop-8ef2099f5d82ff553b2c34420eb269d1e9d07b22.zip
Need to use xml:space="preserve" on text elements in IF and SVG output to avoid problems with editing those files in XML editors and rendering SVG text starting or ending with whitespace.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@728699 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/intermediate')
-rw-r--r--src/java/org/apache/fop/render/intermediate/IFSerializer.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/intermediate/IFSerializer.java b/src/java/org/apache/fop/render/intermediate/IFSerializer.java
index c54fe6407..d6df81472 100644
--- a/src/java/org/apache/fop/render/intermediate/IFSerializer.java
+++ b/src/java/org/apache/fop/render/intermediate/IFSerializer.java
@@ -511,6 +511,7 @@ public class IFSerializer extends AbstractXMLWritingIFDocumentHandler
public void drawText(int x, int y, int[] dx, int[] dy, String text) throws IFException {
try {
AttributesImpl atts = new AttributesImpl();
+ XMLUtil.addAttribute(atts, XMLConstants.XML_SPACE, "preserve");
addAttribute(atts, "x", Integer.toString(x));
addAttribute(atts, "y", Integer.toString(y));
if (dx != null) {