From 41dbcbf6285901c9e1fcc7605cf996341af2ac3e Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 9 Mar 2000 11:46:25 +0000 Subject: [PATCH] reformatting, changing the FT_Outline structure: - "flags" have been renamed to "tags" - "outline_flags" have been renamed to "flags" Look for more re-formatting today.. --- demos/src/ftgrays.c | 62 ++++++++++++++++++++++++++--------------- demos/src/fttimer.c | 10 +++---- demos/src/ftview.c | 2 +- include/ftimage.h | 52 +++++++++++++++++----------------- src/base/ftbbox.c | 2 +- src/base/ftobjs.c | 30 ++++++++++---------- src/base/ftobjs.h | 4 +-- src/base/ftoutln.c | 10 +++---- src/base/ftraster.c | 4 +-- src/truetype/ttgload.c | 32 ++++++++++----------- src/truetype/ttinterp.c | 36 ++++++++++++------------ src/type1/t1gload.c | 36 ++++++++++++------------ src/type1z/t1gload.c | 14 +++++----- 13 files changed, 156 insertions(+), 138 deletions(-) diff --git a/demos/src/ftgrays.c b/demos/src/ftgrays.c index 08b3066b9..05a3c7899 100644 --- a/demos/src/ftgrays.c +++ b/demos/src/ftgrays.c @@ -79,7 +79,7 @@ #endif -#define PIXEL_BITS 6 +#define PIXEL_BITS 7 #define ONE_PIXEL (1L << PIXEL_BITS) #define PIXEL_MASK (-1L << PIXEL_BITS) #define TRUNC(x) ((x) >> PIXEL_BITS) @@ -88,6 +88,8 @@ #define CEILING(x) (((x)+ONE_PIXEL-1) & -ONE_PIXEL) #define ROUND(x) (((x)+ONE_PIXEL/2) & -ONE_PIXEL) +#define UPSCALE(x) (PIXEL_BITS >= 6 ? (x) << (PIXEL_BITS-6) : (x) >> (6-PIXEL_BITS)) + /****************************************************************************/ /* */ /* INITIALIZE THE CELLS TABLE */ @@ -137,10 +139,10 @@ void compute_cbox( RAS_ARG_ FT_Outline* outline ) } /* truncate the bounding box to integer pixels */ - ras.min_ex = TRUNC( ras.min_ex ); - ras.min_ey = TRUNC( ras.min_ey ); - ras.max_ex = TRUNC( CEILING( ras.max_ex ) ); - ras.max_ey = TRUNC( CEILING( ras.max_ey ) ); + ras.min_ex = ras.min_ex >> 6; + ras.min_ey = ras.min_ey >> 6; + ras.max_ex = ( ras.max_ex+63 ) >> 6; + ras.max_ey = ( ras.max_ey+63 ) >> 6; } @@ -484,7 +486,7 @@ int render_conic( RAS_ARG_ FT_Vector* control, FT_Vector* to ) } if (level <= 1) - return render_line( RAS_VAR_ to->x, to->y ); + return render_line( RAS_VAR_ UPSCALE(to->x), UPSCALE(to->y) ); arc = ras.bez_stack; arc[0] = *to; @@ -492,6 +494,11 @@ int render_conic( RAS_ARG_ FT_Vector* control, FT_Vector* to ) arc[2].x = ras.x; arc[2].y = ras.y; + arc[0].x = UPSCALE(arc[0].x); + arc[0].y = UPSCALE(arc[0].y); + arc[1].x = UPSCALE(arc[1].x); + arc[1].y = UPSCALE(arc[1].y); + levels = ras.lev_stack; top = 0; levels[0] = level; @@ -573,7 +580,7 @@ int render_cubic( RAS_ARG_ FT_Vector* control1, } if (level <= 1) - return render_line( RAS_VAR_ to->x, to->y ); + return render_line( RAS_VAR_ UPSCALE(to->x), UPSCALE(to->y) ); arc = ras.bez_stack; arc[0] = *to; @@ -582,6 +589,13 @@ int render_cubic( RAS_ARG_ FT_Vector* control1, arc[3].x = ras.x; arc[3].y = ras.y; + arc[0].x = UPSCALE(arc[0].x); + arc[0].y = UPSCALE(arc[0].y); + arc[1].x = UPSCALE(arc[1].x); + arc[1].y = UPSCALE(arc[1].y); + arc[2].x = UPSCALE(arc[2].x); + arc[2].y = UPSCALE(arc[2].y); + levels = ras.lev_stack; top = 0; levels[0] = level; @@ -801,7 +815,7 @@ int check_sort( PCell cells, int count ) v_start = v_control = v_first; point = outline->points + first; - tags = outline->flags + first; + tags = outline->tags + first; tag = FT_CURVE_TAG( tags[0] ); /* A contour cannot start with a cubic control point! */ @@ -812,7 +826,7 @@ int check_sort( PCell cells, int count ) if ( tag == FT_Curve_Tag_Conic ) { /* first point is conic control. Yes, this happens. */ - if ( FT_CURVE_TAG( outline->flags[last] ) == FT_Curve_Tag_On ) + if ( FT_CURVE_TAG( outline->tags[last] ) == FT_Curve_Tag_On ) { /* start at last point if it is on the curve */ v_start = v_last; @@ -947,7 +961,7 @@ int check_sort( PCell cells, int count ) FT_Vector v_start; FT_Vector* point; - char* flags; + char* tags; int n; /* index of contour in outline */ int first; /* index of first point in contour */ @@ -973,7 +987,7 @@ int check_sort( PCell cells, int count ) v_start = v_control = v_first; - tag = FT_CURVE_TAG( outline->flags[first] ); + tag = FT_CURVE_TAG( outline->tags[first] ); index = first; /* A contour cannot start with a cubic control point! */ @@ -987,7 +1001,7 @@ int check_sort( PCell cells, int count ) if ( tag == FT_Curve_Tag_Conic ) { /* first point is conic control. Yes, this happens. */ - if ( FT_CURVE_TAG( outline->flags[last] ) == FT_Curve_Tag_On ) + if ( FT_CURVE_TAG( outline->tags[last] ) == FT_Curve_Tag_On ) { /* start at last point if it is on the curve */ v_start = v_last; @@ -1015,7 +1029,7 @@ int check_sort( PCell cells, int count ) return error; point = outline->points + first; - flags = outline->flags + first; + tags = outline->tags + first; /* now process each contour point individually */ @@ -1023,9 +1037,9 @@ int check_sort( PCell cells, int count ) { index++; point++; - flags++; + tags++; - tag = FT_CURVE_TAG( flags[0] ); + tag = FT_CURVE_TAG( tags[0] ); switch ( phase ) { @@ -1113,7 +1127,7 @@ int check_sort( PCell cells, int count ) /* end of contour, close curve cleanly */ error = 0; - tag = FT_CURVE_TAG( outline->flags[first] ); + tag = FT_CURVE_TAG( outline->tags[first] ); switch ( phase ) { @@ -1154,13 +1168,17 @@ int check_sort( PCell cells, int count ) int Move_To( FT_Vector* to, FT_Raster raster ) { + TPos x, y; + /* record current cell, if any */ record_cell( (PRaster)raster ); /* start to a new position */ - start_cell( (PRaster)raster, TRUNC(to->x), TRUNC(to->y) ); - ((PRaster)raster)->x = to->x; - ((PRaster)raster)->y = to->y; + x = UPSCALE(to->x); + y = UPSCALE(to->y); + start_cell( (PRaster)raster, TRUNC(x), TRUNC(y) ); + ((PRaster)raster)->x = x; + ((PRaster)raster)->y = y; return 0; } @@ -1169,7 +1187,7 @@ int check_sort( PCell cells, int count ) int Line_To( FT_Vector* to, FT_Raster raster ) { - return render_line( (PRaster)raster, to->x, to->y ); + return render_line( (PRaster)raster, UPSCALE(to->x), UPSCALE(to->y) ); } @@ -1262,7 +1280,7 @@ int check_sort( PCell cells, int count ) /* */ coverage = area >> (PIXEL_BITS*2+1-8); /* use range 0..256 */ - if ( ras.outline.outline_flags & ft_outline_even_odd_fill ) + if ( ras.outline.flags & ft_outline_even_odd_fill ) { if (coverage < 0) coverage = -coverage; @@ -1285,7 +1303,7 @@ int check_sort( PCell cells, int count ) coverage = 255; } - if (area) + if (coverage) { /* see if we can add this span to the current list */ count = ras.num_gray_spans; diff --git a/demos/src/fttimer.c b/demos/src/fttimer.c index ff9a5a9e2..79ddbacb9 100644 --- a/demos/src/fttimer.c +++ b/demos/src/fttimer.c @@ -158,11 +158,11 @@ if ( error ) return error; - glyph->outline.outline_flags |= ft_outline_single_pass | + glyph->outline.flags |= ft_outline_single_pass | ft_outline_ignore_dropouts; if (force_low) - glyph->outline.outline_flags &= ~ft_outline_high_precision; + glyph->outline.flags &= ~ft_outline_high_precision; /* debugging */ #if 0 @@ -183,9 +183,9 @@ &outlines[cur_glyph] ); /* copy the glyph outline into it */ - glyph->outline.outline_flags |= ft_outline_single_pass; + glyph->outline.flags |= ft_outline_single_pass; if (force_low) - glyph->outline.outline_flags &= ~ft_outline_high_precision; + glyph->outline.flags &= ~ft_outline_high_precision; FT_Copy_Outline( &glyph->outline, &outlines[cur_glyph] ); @@ -218,7 +218,7 @@ FT_Error ConvertRaster( int index ) { - outlines[index].outline_flags |= ~ft_outline_single_pass; + outlines[index].flags |= ~ft_outline_single_pass; if (use_grays) return grays_raster_render( &raster, &outlines[index], &Bit ); else diff --git a/demos/src/ftview.c b/demos/src/ftview.c index 1a7aed6a9..893627047 100644 --- a/demos/src/ftview.c +++ b/demos/src/ftview.c @@ -189,7 +189,7 @@ memset( bit_buffer, 0, size ); if (low_prec) - glyph->outline.outline_flags &= ~ft_outline_high_precision; + glyph->outline.flags &= ~ft_outline_high_precision; if (use_grays & gray_render) error = grays_raster_render( &raster, &glyph->outline, &bit2 ); diff --git a/include/ftimage.h b/include/ftimage.h index 1d5121511..527071ec0 100644 --- a/include/ftimage.h +++ b/include/ftimage.h @@ -224,36 +224,36 @@ /* in FreeType 1.x. */ /* */ /* */ - /* n_contours :: The number of contours in the outline. */ + /* n_contours :: The number of contours in the outline. */ /* */ - /* n_points :: The number of points in the outline. */ + /* n_points :: The number of points in the outline. */ /* */ - /* points :: A pointer to an array of `n_points' FT_Vector */ - /* elements, giving the outline's point */ - /* coordinates. */ + /* points :: A pointer to an array of `n_points' FT_Vector */ + /* elements, giving the outline's point */ + /* coordinates. */ /* */ - /* flags :: A pointer to an array of `n_points' chars, */ - /* giving each outline point's type. If bit 0 is */ - /* set, the point is `off' the curve, i.e., a */ - /* Bezier control point, while it is `on' when */ - /* unset. */ + /* tags :: A pointer to an array of `n_points' chars, */ + /* giving each outline point's type. If bit 0 is */ + /* unset, the point is 'off' the curve, i.e. a */ + /* Bezier control point, while it is `on' when */ + /* unset. */ /* */ - /* Bit 1 is meaningful for `off' points only. If */ - /* set, it indicates a third-order Bezier arc */ - /* control point; and a second-order control point */ - /* if unset. */ + /* Bit 1 is meaningful for `off' points only. If */ + /* set, it indicates a third-order Bezier arc */ + /* control point; and a second-order control point */ + /* if unset. */ /* */ - /* contours :: An array of `n_contours' shorts, giving the end */ - /* point of each contour within the outline. For */ - /* example, the first contour is defined by the */ - /* points `0' to `contours[0]', the second one is */ - /* defined by the points `contours[0]+1' to */ - /* `contours[1]', etc. */ + /* contours :: An array of `n_contours' shorts, giving the end */ + /* point of each contour within the outline. For */ + /* example, the first contour is defined by the */ + /* points `0' to `contours[0]', the second one is */ + /* defined by the points `contours[0]+1' to */ + /* `contours[1]', etc. */ /* */ - /* outline_flags :: a set of bit flags used to characterize the */ - /* outline and give hints to the scan-converter */ - /* and hinter on how to convert/grid-fit it.. */ - /* see FT_Outline_Flags.. */ + /* flags :: a set of bit flags used to characterize the */ + /* outline and give hints to the scan-converter */ + /* and hinter on how to convert/grid-fit it.. */ + /* see FT_Outline_Flags.. */ /* */ typedef struct FT_Outline_ { @@ -261,10 +261,10 @@ short n_points; /* number of points in the glyph */ FT_Vector* points; /* the outline's points */ - char* flags; /* the points flags */ + char* tags; /* the points flags */ short* contours; /* the contour end points */ - int outline_flags; /* outline masks */ + int flags; /* outline masks */ } FT_Outline; diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index b3ec08734..2406359ad 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -398,7 +398,7 @@ if ( y < cbox.yMin ) cbox.yMin = y; if ( y > cbox.yMax ) cbox.yMax = y; - if ( FT_CURVE_TAG( outline->flags[n] ) == FT_Curve_Tag_On ) + if ( FT_CURVE_TAG( outline->tags[n] ) == FT_Curve_Tag_On ) { /* update bbox for `on' points only */ if ( x < bbox.xMin ) bbox.xMin = x; diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 9b06afc2e..d9e45fff6 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2053,7 +2053,7 @@ FT_Vector v_start; FT_Vector* point; - char* flags; + char* tags; int n; /* index of contour in outline */ int first; /* index of first point in contour */ @@ -2079,7 +2079,7 @@ v_start = v_control = v_first; - tag = FT_CURVE_TAG( outline->flags[first] ); + tag = FT_CURVE_TAG( outline->tags[first] ); index = first; /* A contour cannot start with a cubic control point! */ @@ -2093,7 +2093,7 @@ if ( tag == FT_Curve_Tag_Conic ) { /* first point is conic control. Yes, this happens. */ - if ( FT_CURVE_TAG( outline->flags[last] ) == FT_Curve_Tag_On ) + if ( FT_CURVE_TAG( outline->tags[last] ) == FT_Curve_Tag_On ) { /* start at last point if it is on the curve */ v_start = v_last; @@ -2121,7 +2121,7 @@ return error; point = outline->points + first; - flags = outline->flags + first; + tags = outline->tags + first; /* now process each contour point individually */ @@ -2129,9 +2129,9 @@ { index++; point++; - flags++; + tags++; - tag = FT_CURVE_TAG( flags[0] ); + tag = FT_CURVE_TAG( tags[0] ); switch ( phase ) { @@ -2219,7 +2219,7 @@ /* end of contour, close curve cleanly */ error = 0; - tag = FT_CURVE_TAG( outline->flags[first] ); + tag = FT_CURVE_TAG( outline->tags[first] ); switch ( phase ) { @@ -2310,18 +2310,18 @@ memory = library->memory; if ( ALLOC_ARRAY( outline->points, numPoints * 2L, FT_Pos ) || - ALLOC_ARRAY( outline->flags, numPoints, FT_Byte ) || + ALLOC_ARRAY( outline->tags, numPoints, FT_Byte ) || ALLOC_ARRAY( outline->contours, numContours, FT_UShort ) ) goto Fail; outline->n_points = (FT_UShort)numPoints; outline->n_contours = (FT_Short)numContours; - outline->outline_flags |= ft_outline_owner; + outline->flags |= ft_outline_owner; return FT_Err_Ok; Fail: - outline->outline_flags |= ft_outline_owner; + outline->flags |= ft_outline_owner; FT_Done_Outline( library, outline ); return error; @@ -2366,10 +2366,10 @@ if ( outline ) { - if ( outline->outline_flags & ft_outline_owner ) + if ( outline->flags & ft_outline_owner ) { FREE( outline->points ); - FREE( outline->flags ); + FREE( outline->tags ); FREE( outline->contours ); } *outline = null_outline; @@ -2509,7 +2509,7 @@ FT_Memory memory = zone->memory; FREE( zone->contours ); - FREE( zone->flags ); + FREE( zone->tags ); FREE( zone->cur ); FREE( zone->org ); @@ -2554,7 +2554,7 @@ if ( ALLOC_ARRAY( zone->org, maxPoints*2, FT_F26Dot6 ) || ALLOC_ARRAY( zone->cur, maxPoints*2, FT_F26Dot6 ) || - ALLOC_ARRAY( zone->flags, maxPoints, FT_Byte ) || + ALLOC_ARRAY( zone->tags, maxPoints, FT_Byte ) || ALLOC_ARRAY( zone->contours, maxContours, FT_UShort ) ) { FT_Done_GlyphZone(zone); @@ -2599,7 +2599,7 @@ /* reallocate the points arrays */ if ( REALLOC_ARRAY( zone->org, zone->max_points*2, newPoints*2, FT_F26Dot6 ) || REALLOC_ARRAY( zone->cur, zone->max_points*2, newPoints*2, FT_F26Dot6 ) || - REALLOC_ARRAY( zone->flags, zone->max_points*2, newPoints, FT_Byte ) ) + REALLOC_ARRAY( zone->tags, zone->max_points*2, newPoints, FT_Byte ) ) goto Exit; zone->max_points = newPoints; diff --git a/src/base/ftobjs.h b/src/base/ftobjs.h index 629aba423..f877963f7 100644 --- a/src/base/ftobjs.h +++ b/src/base/ftobjs.h @@ -336,7 +336,7 @@ * n_contours :: current number of contours in zone * org :: original glyph coordinates (font units/scaled) * cur :: current glyph coordinates (scaled/hinted) - * flags :: point control flags + * tags :: point control tags * contours :: contour end points * ***********************************************************************/ @@ -352,7 +352,7 @@ FT_Vector* org; /* original point coordinates */ FT_Vector* cur; /* current point coordinates */ - FT_Byte* flags; /* current touch flags */ + FT_Byte* tags; /* current touch flags */ FT_UShort* contours; /* contour end points */ } FT_GlyphZone; diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index 222cf7b55..3dbeeb1b5 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -60,18 +60,18 @@ MEM_Copy( target->points, source->points, source->n_points * 2 * sizeof ( FT_Pos ) ); - MEM_Copy( target->flags, source->flags, + MEM_Copy( target->tags, source->tags, source->n_points * sizeof ( FT_Byte ) ); MEM_Copy( target->contours, source->contours, source->n_contours * sizeof ( FT_Short ) ); /* copy all flags, except the "ft_outline_owner" one */ - is_owner = target->outline_flags & ft_outline_owner; - target->outline_flags = source->outline_flags; + is_owner = target->flags & ft_outline_owner; + target->flags = source->flags; - target->outline_flags &= ~ft_outline_owner; - target->outline_flags |= is_owner; + target->flags &= ~ft_outline_owner; + target->flags |= is_owner; return FT_Err_Ok; } diff --git a/src/base/ftraster.c b/src/base/ftraster.c index 2a9c36c3b..a81684009 100644 --- a/src/base/ftraster.c +++ b/src/base/ftraster.c @@ -4130,8 +4130,8 @@ Scan_DropOuts : #else ras.dropout_mode = 2; #endif - ras.second_pass = (outline->outline_flags & ft_outline_single_pass) == 0; - SET_High_Precision( outline->outline_flags & ft_outline_high_precision ); + ras.second_pass = (outline->flags & ft_outline_single_pass) == 0; + SET_High_Precision( outline->flags & ft_outline_high_precision ); switch ( target_map->pixel_mode ) { diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 34888b460..c9ebf09e0 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -164,7 +164,7 @@ target->org = source->org + np; target->cur = source->cur + np; - target->flags = source->flags + np; + target->tags = source->tags + np; target->contours = source->contours + nc; @@ -271,10 +271,10 @@ stream->cursor += n_ins; /*********************************************************************/ - /* reading the point flags */ + /* reading the point tags */ { - TT_Byte* flag = load->zone.flags; + TT_Byte* flag = load->zone.tags; TT_Byte* limit = flag + n_points; TT_Byte c, count; @@ -295,7 +295,7 @@ { TT_Vector* vec = zone->org; TT_Vector* limit = vec + n_points; - TT_Byte* flag = zone->flags; + TT_Byte* flag = zone->tags; TT_Pos x = 0; for ( ; vec < limit; vec++, flag++ ) @@ -321,7 +321,7 @@ { TT_Vector* vec = zone->org; TT_Vector* limit = vec + n_points; - TT_Byte* flag = zone->flags; + TT_Byte* flag = zone->tags; TT_Pos x = 0; for ( ; vec < limit; vec++, flag++ ) @@ -363,12 +363,12 @@ pp2->x = pp1->x + load->advance; pp2->y = 0; - /* clear the touch flags */ + /* clear the touch tags */ for ( n = 0; n < n_points; n++ ) - zone->flags[n] &= FT_Curve_Tag_On; + zone->tags[n] &= FT_Curve_Tag_On; - zone->flags[n_points ] = 0; - zone->flags[n_points + 1] = 0; + zone->tags[n_points ] = 0; + zone->tags[n_points + 1] = 0; } /* Note that we return two more points that are not */ /* part of the glyph outline. */ @@ -870,8 +870,8 @@ pp1[0] = loader->pp1; pp1[1] = loader->pp2; - pts->flags[num_points + 1] = 0; - pts->flags[num_points + 2] = 0; + pts->tags[num_points + 1] = 0; + pts->tags[num_points + 2] = 0; /* if hinting, round the phantom points */ if ( IS_HINTED(loader->load_flags) ) @@ -883,7 +883,7 @@ { TT_UInt k; for ( k = 0; k < n_points; k++ ) - pts->flags[k] &= FT_Curve_Tag_On; + pts->tags[k] &= FT_Curve_Tag_On; } cur_to_org( n_points, pts ); @@ -959,7 +959,7 @@ for ( u = 0; u < num_points + 2; u++ ) { glyph->outline.points[u] = loader->base.cur[u]; - glyph->outline.flags [u] = loader->base.flags[u]; + glyph->outline.tags [u] = loader->base.tags[u]; } for ( u = 0; u < num_contours; u++ ) @@ -970,7 +970,7 @@ glyph->outline.n_contours = num_contours; /* glyph->outline.second_pass = TRUE; */ - glyph->outline.outline_flags &= ~ft_outline_single_pass; + glyph->outline.flags &= ~ft_outline_single_pass; /* translate array so that (0,0) is the glyph's origin */ translate_array( (TT_UShort)(num_points + 2), @@ -1263,10 +1263,10 @@ #endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ /* clear all outline flags, except the "owner" one */ - glyph->outline.outline_flags &= ft_outline_owner; + glyph->outline.flags &= ft_outline_owner; if (size && size->root.metrics.y_ppem < 24 ) - glyph->outline.outline_flags |= ft_outline_high_precision; + glyph->outline.flags |= ft_outline_high_precision; /************************************************************************/ /* let's initialise the rest of our loader now */ diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index b0009e197..3800b666a 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -1383,7 +1383,7 @@ v * 0x10000L, CUR.F_dot_P ); #endif - zone->flags[point] |= FT_Curve_Tag_Touch_X; + zone->tags[point] |= FT_Curve_Tag_Touch_X; } v = CUR.GS.freeVector.y; @@ -1398,7 +1398,7 @@ v * 0x10000L, CUR.F_dot_P ); #endif - zone->flags[point] |= FT_Curve_Tag_Touch_Y; + zone->tags[point] |= FT_Curve_Tag_Touch_Y; } } @@ -1420,7 +1420,7 @@ UNUSED_EXEC; zone->cur[point].x += distance; - zone->flags[point] |= FT_Curve_Tag_Touch_X; + zone->tags[point] |= FT_Curve_Tag_Touch_X; } @@ -1432,7 +1432,7 @@ UNUSED_EXEC; zone->cur[point].y += distance; - zone->flags[point] |= FT_Curve_Tag_Touch_Y; + zone->tags[point] |= FT_Curve_Tag_Touch_Y; } @@ -4791,7 +4791,7 @@ } } else - CUR.pts.flags[point] ^= FT_Curve_Tag_On; + CUR.pts.tags[point] ^= FT_Curve_Tag_On; CUR.GS.loop--; } @@ -4825,7 +4825,7 @@ } for ( I = L; I <= K; I++ ) - CUR.pts.flags[I] |= FT_Curve_Tag_On; + CUR.pts.tags[I] |= FT_Curve_Tag_On; } @@ -4853,7 +4853,7 @@ } for ( I = L; I <= K; I++ ) - CUR.pts.flags[I] &= ~FT_Curve_Tag_On; + CUR.pts.tags[I] &= ~FT_Curve_Tag_On; } @@ -4916,14 +4916,14 @@ { CUR.zp2.cur[point].x += dx; if ( touch ) - CUR.zp2.flags[point] |= FT_Curve_Tag_Touch_X; + CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_X; } if ( CUR.GS.freeVector.y != 0 ) { CUR.zp2.cur[point].y += dy; if ( touch ) - CUR.zp2.flags[point] |= FT_Curve_Tag_Touch_Y; + CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_Y; } } @@ -5597,7 +5597,7 @@ dx = CUR.zp0.cur[b0].x - CUR.zp1.cur[a0].x; dy = CUR.zp0.cur[b0].y - CUR.zp1.cur[a0].y; - CUR.zp2.flags[point] |= FT_Curve_Tag_Touch_Both; + CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_Both; discriminant = TT_MULDIV( dax, -dby, 0x40 ) + TT_MULDIV( day, dbx, 0x40 ); @@ -5780,7 +5780,7 @@ if ( CUR.GS.freeVector.y != 0 ) mask &= ~FT_Curve_Tag_Touch_Y; - CUR.zp0.flags[point] &= mask; + CUR.zp0.tags[point] &= mask; } @@ -5933,7 +5933,7 @@ end_point = CUR.pts.contours[contour]; first_point = point; - while ( point <= end_point && (CUR.pts.flags[point] & mask) == 0 ) + while ( point <= end_point && (CUR.pts.tags[point] & mask) == 0 ) point++; if ( point <= end_point ) @@ -5945,7 +5945,7 @@ while ( point <= end_point ) { - if ( (CUR.pts.flags[point] & mask) != 0 ) + if ( (CUR.pts.tags[point] & mask) != 0 ) { if ( point > 0 ) Interp( cur_touched + 1, @@ -7632,7 +7632,7 @@ MEM_Alloc( save.org, sizeof ( TT_Vector ) * save.n_points ); MEM_Alloc( save.cur, sizeof ( TT_Vector ) * save.n_points ); - MEM_Alloc( save.flags, sizeof ( TT_Byte ) * save.n_points ); + MEM_Alloc( save.tags, sizeof ( TT_Byte ) * save.n_points ); exc->instruction_trap = 1; @@ -7795,7 +7795,7 @@ MEM_Copy( save.org, pts.org, pts.n_points * sizeof ( TT_Vector ) ); MEM_Copy( save.cur, pts.cur, pts.n_points * sizeof ( TT_Vector ) ); - MEM_Copy( save.flags, pts.flags, pts.n_points ); + MEM_Copy( save.tags, pts.tags, pts.n_points ); /* a return indicate the last command */ if (ch == '\r') @@ -7849,14 +7849,14 @@ if ( save.org[A].y != pts.org[A].y ) diff |= 2; if ( save.cur[A].x != pts.cur[A].x ) diff |= 4; if ( save.cur[A].y != pts.cur[A].y ) diff |= 8; - if ( save.flags[A] != pts.flags[A] ) diff |= 16; + if ( save.tags[A] != pts.tags[A] ) diff |= 16; if ( diff ) { FT_TRACE0(( "%02hx ", A )); if ( diff & 16 ) temp = "(%01hx)"; else temp = " %01hx "; - FT_TRACE0(( temp, save.flags[A] & 7 )); + FT_TRACE0(( temp, save.tags[A] & 7 )); if ( diff & 1 ) temp = "(%08lx)"; else temp = " %08lx "; FT_TRACE0(( temp, save.org[A].x )); @@ -7875,7 +7875,7 @@ FT_TRACE0(( "%02hx ", A )); if ( diff & 16 ) temp = "[%01hx]"; else temp = " %01hx "; - FT_TRACE0(( temp, pts.flags[A] & 7 )); + FT_TRACE0(( temp, pts.tags[A] & 7 )); if ( diff & 1 ) temp = "[%08lx]"; else temp = " %08lx "; FT_TRACE0(( temp, pts.org[A].x )); diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c index a125563e1..b2b6bb573 100644 --- a/src/type1/t1gload.c +++ b/src/type1/t1gload.c @@ -255,7 +255,7 @@ cur->n_points = 0; cur->n_contours = 0; cur->points = base->points + base->n_points; - cur->flags = base->flags + base->n_points; + cur->tags = base->tags + base->n_points; cur->contours = base->contours + base->n_contours; error = T1_Parse_CharStrings( decoder, @@ -282,7 +282,7 @@ cur->n_points = 0; cur->n_contours = 0; cur->points = base->points + base->n_points; - cur->flags = base->flags + base->n_points; + cur->tags = base->tags + base->n_points; cur->contours = base->contours + base->n_contours; error = T1_Parse_CharStrings( decoder, @@ -920,12 +920,12 @@ if ( REALLOC_ARRAY( builder->base.points, current, builder->max_points, T1_Vector ) || - REALLOC_ARRAY( builder->base.flags, + REALLOC_ARRAY( builder->base.tags, current, builder->max_points, T1_Byte ) ) return error; builder->current.points = builder->base.points + increment; - builder->current.flags = builder->base.flags + increment; + builder->current.tags = builder->base.tags + increment; } return T1_Err_Ok; @@ -1137,18 +1137,18 @@ if ( num_points > 0 ) { T1_Vector* source_point; - char* source_flags; + char* source_tags; T1_Vector* point; - char* flags; + char* tags; error = T1_Add_Points( builder, num_points ); if (error) return error; point = cur->points + cur->n_points; - flags = cur->flags + cur->n_points; + tags = cur->tags + cur->n_points; source_point = point - 2; - source_flags = flags - 2; + source_tags = tags - 2; cur->n_points += num_points; @@ -1156,7 +1156,7 @@ do { *point++ = *source_point--; - *flags++ = *source_flags--; + *tags++ = *source_tags--; num_points--; } while (num_points > 0); @@ -1252,7 +1252,7 @@ vec.y = builder->last.y + dy; cur->points[cur->n_points] = vec; - cur->flags [cur->n_points] = FT_Curve_Tag_On; + cur->tags [cur->n_points] = FT_Curve_Tag_On; builder->last = vec; } @@ -1301,7 +1301,7 @@ vec.x = builder->last.x + dx; vec.y = builder->last.y + dy; cur->points[cur->n_points] = vec; - cur->flags [cur->n_points] = FT_Curve_Tag_On; + cur->tags [cur->n_points] = FT_Curve_Tag_On; builder->last = vec; } @@ -1326,7 +1326,7 @@ FT_Outline* cur = &builder->current; T1_Vector vec; T1_Vector* points; - char* flags; + char* tags; /* grow buffer if necessary */ error = T1_Add_Points ( builder, 3 ); @@ -1336,19 +1336,19 @@ { /* save point */ points = cur->points + cur->n_points; - flags = cur->flags + cur->n_points; + tags = cur->tags + cur->n_points; vec.x = builder->last.x + dx1; vec.y = builder->last.y + dy1; - points[0] = vec; flags[0] = FT_Curve_Tag_Cubic; + points[0] = vec; tags[0] = FT_Curve_Tag_Cubic; vec.x += dx2; vec.y += dy2; - points[1] = vec; flags[1] = FT_Curve_Tag_Cubic; + points[1] = vec; tags[1] = FT_Curve_Tag_Cubic; vec.x += dx3; vec.y += dy3; - points[2] = vec; flags[2] = FT_Curve_Tag_On; + points[2] = vec; tags[2] = FT_Curve_Tag_On; builder->last = vec; } @@ -1537,10 +1537,10 @@ glyph->root.format = ft_glyph_format_outline; - glyph->root.outline.outline_flags &= ft_outline_owner; + glyph->root.outline.flags &= ft_outline_owner; if ( size->root.metrics.y_ppem < 24 ) - glyph->root.outline.outline_flags |= ft_outline_high_precision; + glyph->root.outline.flags |= ft_outline_high_precision; /* glyph->root.outline.second_pass = TRUE; diff --git a/src/type1z/t1gload.c b/src/type1z/t1gload.c index ea94980e2..79ee22373 100644 --- a/src/type1z/t1gload.c +++ b/src/type1z/t1gload.c @@ -238,7 +238,7 @@ if ( REALLOC_ARRAY( base->points, current, builder->max_points, T1_Vector ) || - REALLOC_ARRAY( base->flags, current, + REALLOC_ARRAY( base->tags, current, builder->max_points, T1_Byte ) ) { builder->error = error; @@ -246,7 +246,7 @@ } outline->points = base->points + increment; - outline->flags = base->flags + increment; + outline->tags = base->tags + increment; } return T1_Err_Ok; } @@ -264,7 +264,7 @@ if (builder->load_points) { FT_Vector* point = outline->points + outline->n_points; - FT_Byte* control = (FT_Byte*)outline->flags + outline->n_points; + FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; point->x = x; point->y = y; @@ -462,7 +462,7 @@ cur->n_points = 0; cur->n_contours = 0; cur->points = base->points + base->n_points; - cur->flags = base->flags + base->n_points; + cur->tags = base->tags + base->n_points; cur->contours = base->contours + base->n_contours; error = T1_Parse_CharStrings( decoder, @@ -489,7 +489,7 @@ cur->n_points = 0; cur->n_contours = 0; cur->points = base->points + base->n_points; - cur->flags = base->flags + base->n_points; + cur->tags = base->tags + base->n_points; cur->contours = base->contours + base->n_contours; error = T1_Parse_CharStrings( decoder, @@ -1275,9 +1275,9 @@ glyph->root.format = ft_glyph_format_outline; - glyph->root.outline.outline_flags &= ft_outline_owner; + glyph->root.outline.flags &= ft_outline_owner; if ( size->root.metrics.y_ppem < 24 ) - glyph->root.outline.outline_flags |= ft_outline_high_precision; + glyph->root.outline.flags |= ft_outline_high_precision; /* glyph->root.outline.second_pass = TRUE; glyph->root.outline.high_precision = ( size->root.metrics.y_ppem < 24 );