shithub: freetype+ttf2subf

Download patch

ref: 67b912d2fa17caa921f513cae180c7aae28b1bc6
parent: 770b5d0647b6102a60db06840e40f860da5810b8
author: Alexei Podtelezhnikov <[email protected]>
date: Fri Apr 3 18:38:11 EDT 2015

* src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-03  Alexei Podtelezhnikov <[email protected]>
+
+	* src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
+
 2015-04-02  Alexei Podtelezhnikov <[email protected]>
 
 	* src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -792,9 +792,7 @@
 
           FT_Pos  out_x, out_y;
 
-          FT_Bool  is_first;
 
-
           /* since the first point of a contour could be part of a */
           /* series of near points, go backwards to find the first */
           /* non-near point and adjust `first'                     */
@@ -844,17 +842,13 @@
           out_x = 0;
           out_y = 0;
 
-          is_first = 1;
-
-          for ( point = first;
-                point != first || is_first;
-                point = point->next )
+          next = first;
+          do
           {
             AF_Direction  out_dir;
 
 
-            is_first = 0;
-
+            point = next;
             next = point->next;
 
             out_x += next->fx - point->fx;
@@ -886,7 +880,8 @@
 
             out_x = 0;
             out_y = 0;
-          }
+
+          } while ( next != first );
         }
 
         /*