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..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005
diff --git a/demos/src/ftgrays.c b/demos/src/ftgrays.c
index 08b3066..05a3c78 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 ff9a5a9..79ddbac 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 1a7aed6..8936270 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 1d51215..527071e 100644
--- a/include/ftimage.h
+++ b/include/ftimage.h
@@ -224,36 +224,36 @@
/* in FreeType 1.x. */
/* */
/* <Fields> */
- /* 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 b3ec087..2406359 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 9b06afc..d9e45ff 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 629aba4..f877963 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 222cf7b..3dbeeb1 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 2a9c36c..a816840 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 34888b4..c9ebf09 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 b0009e1..3800b66 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 a125563..b2b6bb5 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 ea94980..79ee223 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 );