From ce8853af8158368eae51b14c89dc3b79f48ce8ce Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 24 Jun 2008 11:19:03 +0000 Subject: [PATCH] * 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. --- ChangeLog | 8 ++++++++ src/raster/ftraster.c | 22 ++++++++++++---------- src/truetype/ttinterp.c | 10 +--------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbee570b5..9325a60a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-24 Werner Lemberg + + * 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 * src/psaux/psobjs.c (t1_builder_close_contour): Don't add contour diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 684c566d5..305d21c76 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 57797002c..2ab0c0940 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]; - } }