From b0bf9a220bf360da276c2d3602dc18002f5339d3 Mon Sep 17 00:00:00 2001 From: Karen Lease Date: Wed, 2 May 2001 21:05:03 +0000 Subject: [PATCH] Fix disappearing text when using text-anchor != start git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194233 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/render/pdf/SVGRenderer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/apache/fop/render/pdf/SVGRenderer.java b/src/org/apache/fop/render/pdf/SVGRenderer.java index 6b28555f5..f56d4a553 100644 --- a/src/org/apache/fop/render/pdf/SVGRenderer.java +++ b/src/org/apache/fop/render/pdf/SVGRenderer.java @@ -2391,11 +2391,12 @@ public class SVGRenderer { // PDF stream... StringWriter oldStream = currentStream; currentStream = new StringWriter (); - + FontState saveFS = fs; _renderText (te, 0f, true); float width = currentX - te.x; currentStream = oldStream; + fs = saveFS; if (te.anchor.getEnum() == TextAnchor.END) { xoffset = -width; @@ -2717,7 +2718,7 @@ public class SVGRenderer { // currentFontName = fs.getFontName(); // currentFontSize = fs.getFontSize(); currentStream.write("/" + fs.getFontName() + " " + - (fs.getFontSize() / 1000) + " Tf\n"); + (fs.getFontSize() / 1000f) + " Tf\n"); } } return changed; -- 2.39.5