pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1734637 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphRenderer.java
Date Fri, 11 Mar 2016 22:06:50 GMT
Author: tilman
Date: Fri Mar 11 22:06:50 2016
New Revision: 1734637

URL: http://svn.apache.org/viewvc?rev=1734637&view=rev
Log:
PDFBOX-3268: closepath instead of lineto at endofcontour

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphRenderer.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphRenderer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphRenderer.java?rev=1734637&r1=1734636&r2=1734637&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphRenderer.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphRenderer.java Fri Mar 11
22:06:50 2016
@@ -122,7 +122,15 @@ class GlyphRenderer
                     Point pnow = contour.get(j);
                     if (pnow.onCurve)
                     {
-                        lineTo(path, pnow);
+                        if (j == clen - 1)
+                        {
+                            // PDFBOX-3268 avoid weird corners at end of path
+                            path.closePath();
+                        }
+                        else
+                        {
+                            lineTo(path, pnow);
+                        }
                     }
                     else if (contour.get(j + 1).onCurve)
                     {



Mime
View raw message