Commit ce8853af8158368eae51b14c89dc3b79f48ce8ce

Werner Lemberg 2008-06-24T11:19:03

* src/truetype/ttinterp. (Ins_SCANTYPE): Don't check rendering mode. * src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph, Draw_Sweep): No-dropout mode is value 2, not value 0. (Draw_Sweep): Really skip dropout handling for no-dropout mode.

diff --git a/ChangeLog b/ChangeLog
index dbee570..9325a60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-06-24  Werner Lemberg  <wl@gnu.org>
 
+	* src/truetype/ttinterp. (Ins_SCANTYPE): Don't check rendering mode.
+
+	* src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph,
+	Draw_Sweep): No-dropout mode is value 2, not value 0.
+	(Draw_Sweep): Really skip dropout handling for no-dropout mode.
+
+2008-06-24  Werner Lemberg  <wl@gnu.org>
+
 	* src/psaux/psobjs.c (t1_builder_close_contour): Don't add contour
 	if it consists of one point only.  Based on a patch from Savannah
 	bug #23683 (from John Tytgat).
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 684c566..305d21c 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -2893,17 +2893,19 @@ static const char  count_table[256] =
             e1 = FLOOR( x1 );
             e2 = CEILING( x2 );
 
-            if ( ras.dropOutControl != 0                 &&
-                 ( e1 > e2 || e2 == e1 + ras.precision ) )
+            if ( e1 > e2 || e2 == e1 + ras.precision )
             {
-              /* a drop out was detected */
+              if ( ras.dropOutControl != 2 )
+              {
+                /* a drop out was detected */
 
-              P_Left ->X = x1;
-              P_Right->X = x2;
+                P_Left ->X = x1;
+                P_Right->X = x2;
 
-              /* mark profile for drop-out processing */
-              P_Left->countL = 1;
-              dropouts++;
+                /* mark profile for drop-out processing */
+                P_Left->countL = 1;
+                dropouts++;
+              }
 
               goto Skip_To_Next;
             }
@@ -3123,7 +3125,7 @@ static const char  count_table[256] =
       return error;
 
     /* Horizontal Sweep */
-    if ( ras.second_pass && ras.dropOutControl != 0 )
+    if ( ras.second_pass && ras.dropOutControl != 2 )
     {
       ras.Proc_Sweep_Init = Horizontal_Sweep_Init;
       ras.Proc_Sweep_Span = Horizontal_Sweep_Span;
@@ -3208,7 +3210,7 @@ static const char  count_table[256] =
       return error;
 
     /* Horizontal Sweep */
-    if ( ras.second_pass && ras.dropOutControl != 0 )
+    if ( ras.second_pass && ras.dropOutControl != 2 )
     {
       ras.Proc_Sweep_Init = Horizontal_Sweep_Init;
       ras.Proc_Sweep_Span = Horizontal_Gray_Sweep_Span;
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 5779700..2ab0c09 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -5121,16 +5121,8 @@
   static void
   Ins_SCANTYPE( INS_ARG )
   {
-    /* for compatibility with future enhancements, */
-    /* we must ignore new modes                    */
-
-    if ( args[0] >= 0 && args[0] <= 5 )
-    {
-      if ( args[0] == 3 )
-        args[0] = 2;
-
+    if ( args[0] >= 0 )
       CUR.GS.scan_type = (FT_Int)args[0];
-    }
   }