]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix disappearing text when using text-anchor != start
authorKaren Lease <klease@apache.org>
Wed, 2 May 2001 21:05:03 +0000 (21:05 +0000)
committerKaren Lease <klease@apache.org>
Wed, 2 May 2001 21:05:03 +0000 (21:05 +0000)
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

index 6b28555f52c343fe560e93755f4a79955b2cf82c..f56d4a55338bf5ba34659a414c9b5e7f0d2be0c2 100644 (file)
@@ -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;