Author: ssteiner
Date: Fri Jan  6 14:30:40 2017
New Revision: 1777615

URL: http://svn.apache.org/viewvc?rev=1777615&view=rev
Log:
FOP-2544: Incorrect pdf rendering from FO with embedded svg via java embedding

Modified:
    
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/svg/NativeTextPainter.java

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/svg/NativeTextPainter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/svg/NativeTextPainter.java?rev=1777615&r1=1777614&r2=1777615&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/svg/NativeTextPainter.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/svg/NativeTextPainter.java
 Fri Jan  6 14:30:40 2017
@@ -63,6 +63,7 @@ public abstract class NativeTextPainter
 
     /** the logger for this class */
     protected static final Log log = 
LogFactory.getLog(NativeTextPainter.class);
+    private static final boolean DEBUG = false;
 
     /** the font collection */
     protected final FontInfo fontInfo;
@@ -115,7 +116,7 @@ public abstract class NativeTextPainter
             textRun.getLayout().draw(g2d);
             return;
         } else {
-            GeneralPath debugShapes = log.isDebugEnabled() ? new GeneralPath() 
: null;
+            GeneralPath debugShapes = new GeneralPath();
             preparePainting(g2d);
             saveGraphicsState();
             setInitialTransform(g2d.getTransform());
@@ -124,7 +125,7 @@ public abstract class NativeTextPainter
             writeGlyphs((FOPGVTGlyphVector) gv, debugShapes);
             endTextObject();
             restoreGraphicsState();
-            if (debugShapes != null) {
+            if (DEBUG) {
                 g2d.setStroke(new BasicStroke(0));
                 g2d.setColor(Color.LIGHT_GRAY);
                 g2d.draw(debugShapes);
@@ -147,7 +148,7 @@ public abstract class NativeTextPainter
             if (log.isTraceEnabled()) {
                 log.trace("pos " + glyphPos + ", transform " + glyphTransform);
             }
-            if (debugShapes != null) {
+            if (DEBUG) {
                 Shape sh = gv.getGlyphLogicalBounds(index);
                 if (sh == null) {
                     sh = new Ellipse2D.Double(glyphPos.getX(), 
glyphPos.getY(), 2, 2);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to