shithub: freetype+ttf2subf

Download patch

ref: 6b832c872d9726fd3f0979b3f95c7fa618fb50f2
parent: eee7d8baa156f8488e1351b84bb2f8ebf20fec82
author: Alexei Podtelezhnikov <[email protected]>
date: Tue Mar 10 19:25:49 EDT 2015

Fix Savannah bug #44412 (part 1).

* src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-10  Alexei Podtelezhnikov <[email protected]>
+
+	Fix Savannah bug #44412 (part 1).
+
+	* src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
+
 2015-03-10  Werner Lemberg  <[email protected]>
 
 	[base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -999,7 +999,9 @@
 
     /* Only intersect borders if between two lineto's and both */
     /* lines are long enough (line_length is zero for curves). */
-    if ( !border->movable || line_length == 0 )
+    /* Also avoid U-turns of nearly 180 degree.                */
+    if ( !border->movable || line_length == 0  ||
+         theta > 0x59C000 || theta < -0x59C000 )
       intersect = FALSE;
     else
     {