shithub: freetype+ttf2subf

Download patch

ref: 8fb8841430e34b4e61f6e79bb983479ca831e266
parent: 437fb8ebf8fbbf89c70d87562d21ea49d5ef932b
author: Alexei Podtelezhnikov <[email protected]>
date: Thu Mar 17 16:24:57 EDT 2011

A better fix for Savannah bug #32671.

* src/smooth/ftgrays.c (gray_render_conic): Clean up code and
replace WHILE loop with a more natural DO-WHILE construct.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-17  Alexei Podtelezhnikov  <[email protected]>
+
+	A better fix for Savannah bug #32671.
+
+	* src/smooth/ftgrays.c (gray_render_conic): Clean up code and
+	replace WHILE loop with a more natural DO-WHILE construct.
+
 2011-03-16  Werner Lemberg  <[email protected]>.
 
 	* src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field.
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    A new `perfect' anti-aliasing renderer (body).                       */
 /*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 by */
+/*  Copyright 2000-2003, 2005-2011 by                                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -890,12 +890,6 @@
     if ( dx < dy )
       dx = dy;
 
-    if ( dx <= ONE_PIXEL / 4 )
-    {
-      gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
-      return;
-    }
-
     level = 0;
     while ( dx > ONE_PIXEL / 6 )
     {
@@ -907,7 +901,7 @@
     levels[0] = level;
     top       = 0;
 
-    while ( top >= 0 )
+    do
     {
       level = levels[top];
       if ( level > 1 )
@@ -940,9 +934,8 @@
       gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
       top--;
       arc -= 2;
-    }
 
-    return;
+    } while ( top >= 0 );
   }