Commit 7ae5609dbe6acce55f48f65380b734a7db03e9ce

Alexei Podtelezhnikov 2021-01-27T16:08:08

* src/base/ftstroke.c (FT_Stroker_EndSubPath): Ignore tiny gaps. Fixes bug #1020.

diff --git a/ChangeLog b/ChangeLog
index 1668f7b..4e3e08b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2021-01-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
+	* src/base/ftstroke.c (FT_Stroker_EndSubPath): Ignore tiny gaps.
+
+	Fixes bug #1020.
+
+2021-01-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
 	[stroker] Minor clean-up.
 
 	* src/base/ftstroke.c (FT_Stroker_{ConicTo,CubicTo}): Reset the last
diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c
index d0ad833..dc64b1d 100644
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -1900,8 +1900,8 @@
     else
     {
       /* close the path if needed */
-      if ( stroker->center.x != stroker->subpath_start.x ||
-           stroker->center.y != stroker->subpath_start.y )
+      if ( !FT_IS_SMALL( stroker->center.x - stroker->subpath_start.x ) ||
+           !FT_IS_SMALL( stroker->center.y - stroker->subpath_start.y ) )
       {
          error = FT_Stroker_LineTo( stroker, &stroker->subpath_start );
          if ( error )