Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: third_party/freetype/src/cff/cf2intrp.c

Issue 815103002: Update freetype to 2.5.4. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Adjust GYP and GN Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/freetype/src/cff/cf2intrp.h ('k') | third_party/freetype/src/cff/cf2read.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /***************************************************************************/ 1 /***************************************************************************/
2 /* */ 2 /* */
3 /* cf2intrp.c */ 3 /* cf2intrp.c */
4 /* */ 4 /* */
5 /* Adobe's CFF Interpreter (body). */ 5 /* Adobe's CFF Interpreter (body). */
6 /* */ 6 /* */
7 /* Copyright 2007-2013 Adobe Systems Incorporated. */ 7 /* Copyright 2007-2014 Adobe Systems Incorporated. */
8 /* */ 8 /* */
9 /* This software, and all works of authorship, whether in source or */ 9 /* This software, and all works of authorship, whether in source or */
10 /* object code form as indicated by the copyright notice(s) included */ 10 /* object code form as indicated by the copyright notice(s) included */
11 /* herein (collectively, the "Work") is made available, and may only be */ 11 /* herein (collectively, the "Work") is made available, and may only be */
12 /* used, modified, and distributed under the FreeType Project License, */ 12 /* used, modified, and distributed under the FreeType Project License, */
13 /* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ 13 /* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
14 /* FreeType Project License, each contributor to the Work hereby grants */ 14 /* FreeType Project License, each contributor to the Work hereby grants */
15 /* to any individual or legal entity exercising permissions granted by */ 15 /* to any individual or legal entity exercising permissions granted by */
16 /* the FreeType Project License and this section (hereafter, "You" or */ 16 /* the FreeType Project License and this section (hereafter, "You" or */
17 /* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ 17 /* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
(...skipping 12 matching lines...) Expand all
30 /* */ 30 /* */
31 /* By using, modifying, or distributing the Work you indicate that you */ 31 /* By using, modifying, or distributing the Work you indicate that you */
32 /* have read and understood the terms and conditions of the */ 32 /* have read and understood the terms and conditions of the */
33 /* FreeType Project License as well as those provided in this section, */ 33 /* FreeType Project License as well as those provided in this section, */
34 /* and you accept them fully. */ 34 /* and you accept them fully. */
35 /* */ 35 /* */
36 /***************************************************************************/ 36 /***************************************************************************/
37 37
38 38
39 #include "cf2ft.h" 39 #include "cf2ft.h"
40 #include "../../include/freetype/internal/ftdebug.h" 40 #include FT_INTERNAL_DEBUG_H
41 41
42 #include "cf2glue.h" 42 #include "cf2glue.h"
43 #include "cf2font.h" 43 #include "cf2font.h"
44 #include "cf2stack.h" 44 #include "cf2stack.h"
45 #include "cf2hints.h" 45 #include "cf2hints.h"
46 46
47 #include "cf2error.h" 47 #include "cf2error.h"
48 48
49 49
50 /*************************************************************************/ 50 /*************************************************************************/
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 /* TODO: placeholders for hint structures */ 458 /* TODO: placeholders for hint structures */
459 459
460 /* objects used for hinting */ 460 /* objects used for hinting */
461 CF2_ArrStackRec hStemHintArray; 461 CF2_ArrStackRec hStemHintArray;
462 CF2_ArrStackRec vStemHintArray; 462 CF2_ArrStackRec vStemHintArray;
463 463
464 CF2_HintMaskRec hintMask; 464 CF2_HintMaskRec hintMask;
465 CF2_GlyphPathRec glyphPath; 465 CF2_GlyphPathRec glyphPath;
466 466
467
467 /* initialize the remaining objects */ 468 /* initialize the remaining objects */
468 cf2_arrstack_init( &subrStack, 469 cf2_arrstack_init( &subrStack,
469 memory, 470 memory,
470 error, 471 error,
471 sizeof ( CF2_BufferRec ) ); 472 sizeof ( CF2_BufferRec ) );
472 cf2_arrstack_init( &hStemHintArray, 473 cf2_arrstack_init( &hStemHintArray,
473 memory, 474 memory,
474 error, 475 error,
475 sizeof ( CF2_StemHintRec ) ); 476 sizeof ( CF2_StemHintRec ) );
476 cf2_arrstack_init( &vStemHintArray, 477 cf2_arrstack_init( &vStemHintArray,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 /* we may get here if we have a prior error */ 586 /* we may get here if we have a prior error */
586 FT_TRACE4(( " unknown op (%d)\n", op1 )); 587 FT_TRACE4(( " unknown op (%d)\n", op1 ));
587 break; 588 break;
588 589
589 case cf2_cmdHSTEMHM: 590 case cf2_cmdHSTEMHM:
590 case cf2_cmdHSTEM: 591 case cf2_cmdHSTEM:
591 FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" )); 592 FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" ));
592 593
593 /* never add hints after the mask is computed */ 594 /* never add hints after the mask is computed */
594 if ( cf2_hintmask_isValid( &hintMask ) ) 595 if ( cf2_hintmask_isValid( &hintMask ) )
596 {
595 FT_TRACE4(( "cf2_interpT2CharString:" 597 FT_TRACE4(( "cf2_interpT2CharString:"
596 " invalid horizontal hint mask\n" )); 598 " invalid horizontal hint mask\n" ));
599 break;
600 }
597 601
598 cf2_doStems( font, 602 cf2_doStems( font,
599 opStack, 603 opStack,
600 &hStemHintArray, 604 &hStemHintArray,
601 width, 605 width,
602 &haveWidth, 606 &haveWidth,
603 0 ); 607 0 );
604 608
605 if ( font->decoder->width_only ) 609 if ( font->decoder->width_only )
606 goto exit; 610 goto exit;
607 611
608 break; 612 break;
609 613
610 case cf2_cmdVSTEMHM: 614 case cf2_cmdVSTEMHM:
611 case cf2_cmdVSTEM: 615 case cf2_cmdVSTEM:
612 FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? " vstemhm\n" : " vstem\n" )); 616 FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? " vstemhm\n" : " vstem\n" ));
613 617
614 /* never add hints after the mask is computed */ 618 /* never add hints after the mask is computed */
615 if ( cf2_hintmask_isValid( &hintMask ) ) 619 if ( cf2_hintmask_isValid( &hintMask ) )
620 {
616 FT_TRACE4(( "cf2_interpT2CharString:" 621 FT_TRACE4(( "cf2_interpT2CharString:"
617 " invalid vertical hint mask\n" )); 622 " invalid vertical hint mask\n" ));
623 break;
624 }
618 625
619 cf2_doStems( font, 626 cf2_doStems( font,
620 opStack, 627 opStack,
621 &vStemHintArray, 628 &vStemHintArray,
622 width, 629 width,
623 &haveWidth, 630 &haveWidth,
624 0 ); 631 0 );
625 632
626 if ( font->decoder->width_only ) 633 if ( font->decoder->width_only )
627 goto exit; 634 goto exit;
628 635
629 break; 636 break;
630 637
631 case cf2_cmdVMOVETO: 638 case cf2_cmdVMOVETO:
632 FT_TRACE4(( " vmoveto\n" )); 639 FT_TRACE4(( " vmoveto\n" ));
633 640
634 if ( cf2_stack_count( opStack ) > 1 && !haveWidth ) 641 if ( cf2_stack_count( opStack ) > 1 && !haveWidth )
635 *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX; 642 *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
636 643
637 /* width is defined or default after this */ 644 /* width is defined or default after this */
638 haveWidth = TRUE; 645 haveWidth = TRUE;
639 646
640 if ( font->decoder->width_only ) 647 if ( font->decoder->width_only )
641 goto exit; 648 goto exit;
642 649
643 curY += cf2_stack_popFixed( opStack ); 650 curY += cf2_stack_popFixed( opStack );
644 651
645 cf2_glyphpath_moveTo( &glyphPath, curX, curY ); 652 cf2_glyphpath_moveTo( &glyphPath, curX, curY );
646 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphP ath.callbacks->error) goto exit;
647 653
648 break; 654 break;
649 655
650 case cf2_cmdRLINETO: 656 case cf2_cmdRLINETO:
651 { 657 {
652 CF2_UInt index; 658 CF2_UInt index;
653 CF2_UInt count = cf2_stack_count( opStack ); 659 CF2_UInt count = cf2_stack_count( opStack );
654 660
655 661
656 FT_TRACE4(( " rlineto\n" )); 662 FT_TRACE4(( " rlineto\n" ));
657 663
658 for ( index = 0; index < count; index += 2 ) 664 for ( index = 0; index < count; index += 2 )
659 { 665 {
660 curX += cf2_stack_getReal( opStack, index + 0 ); 666 curX += cf2_stack_getReal( opStack, index + 0 );
661 curY += cf2_stack_getReal( opStack, index + 1 ); 667 curY += cf2_stack_getReal( opStack, index + 1 );
662 668
663 cf2_glyphpath_lineTo( &glyphPath, curX, curY ); 669 cf2_glyphpath_lineTo( &glyphPath, curX, curY );
664 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
665 } 670 }
666 671
667 cf2_stack_clear( opStack ); 672 cf2_stack_clear( opStack );
668 } 673 }
669 continue; /* no need to clear stack again */ 674 continue; /* no need to clear stack again */
670 675
671 case cf2_cmdHLINETO: 676 case cf2_cmdHLINETO:
672 case cf2_cmdVLINETO: 677 case cf2_cmdVLINETO:
673 { 678 {
674 CF2_UInt index; 679 CF2_UInt index;
(...skipping 10 matching lines...) Expand all
685 690
686 691
687 if ( isX ) 692 if ( isX )
688 curX += v; 693 curX += v;
689 else 694 else
690 curY += v; 695 curY += v;
691 696
692 isX = !isX; 697 isX = !isX;
693 698
694 cf2_glyphpath_lineTo( &glyphPath, curX, curY ); 699 cf2_glyphpath_lineTo( &glyphPath, curX, curY );
695 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
696 } 700 }
697 701
698 cf2_stack_clear( opStack ); 702 cf2_stack_clear( opStack );
699 } 703 }
700 continue; 704 continue;
701 705
702 case cf2_cmdRCURVELINE: 706 case cf2_cmdRCURVELINE:
703 case cf2_cmdRRCURVETO: 707 case cf2_cmdRRCURVETO:
704 { 708 {
705 CF2_UInt count = cf2_stack_count( opStack ); 709 CF2_UInt count = cf2_stack_count( opStack );
706 CF2_UInt index = 0; 710 CF2_UInt index = 0;
707 711
708 712
709 FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n" 713 FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n"
710 : " rrcurveto\n" )); 714 : " rrcurveto\n" ));
711 715
712 while ( index + 6 <= count ) 716 while ( index + 6 <= count )
713 { 717 {
714 CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; 718 CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
715 CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY; 719 CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;
716 CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1; 720 CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;
717 CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1; 721 CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;
718 CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2; 722 CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
719 CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2; 723 CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;
720 724
721 725
722 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); 726 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
723 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
724 727
725 curX = x3; 728 curX = x3;
726 curY = y3; 729 curY = y3;
727 index += 6; 730 index += 6;
728 } 731 }
729 732
730 if ( op1 == cf2_cmdRCURVELINE ) 733 if ( op1 == cf2_cmdRCURVELINE )
731 { 734 {
732 curX += cf2_stack_getReal( opStack, index + 0 ); 735 curX += cf2_stack_getReal( opStack, index + 0 );
733 curY += cf2_stack_getReal( opStack, index + 1 ); 736 curY += cf2_stack_getReal( opStack, index + 1 );
734 737
735 cf2_glyphpath_lineTo( &glyphPath, curX, curY ); 738 cf2_glyphpath_lineTo( &glyphPath, curX, curY );
736 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
737 } 739 }
738 740
739 cf2_stack_clear( opStack ); 741 cf2_stack_clear( opStack );
740 } 742 }
741 continue; /* no need to clear stack again */ 743 continue; /* no need to clear stack again */
742 744
743 case cf2_cmdCALLGSUBR: 745 case cf2_cmdCALLGSUBR:
744 case cf2_cmdCALLSUBR: 746 case cf2_cmdCALLSUBR:
745 { 747 {
746 CF2_UInt subrIndex; 748 CF2_UInt subrIndex;
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 cf2_freeSeacComponent( decoder, &component ); 1140 cf2_freeSeacComponent( decoder, &component );
1139 } 1141 }
1140 goto exit; 1142 goto exit;
1141 1143
1142 case cf2_cmdCNTRMASK: 1144 case cf2_cmdCNTRMASK:
1143 case cf2_cmdHINTMASK: 1145 case cf2_cmdHINTMASK:
1144 /* the final \n in the tracing message gets added in */ 1146 /* the final \n in the tracing message gets added in */
1145 /* `cf2_hintmask_read' (which also traces the mask bytes) */ 1147 /* `cf2_hintmask_read' (which also traces the mask bytes) */
1146 FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" )); 1148 FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" ));
1147 1149
1150 /* never add hints after the mask is computed */
1151 if ( cf2_stack_count( opStack ) > 1 &&
1152 cf2_hintmask_isValid( &hintMask ) )
1153 {
1154 FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" ));
1155 break;
1156 }
1157
1148 /* if there are arguments on the stack, there this is an */ 1158 /* if there are arguments on the stack, there this is an */
1149 /* implied cf2_cmdVSTEMHM */ 1159 /* implied cf2_cmdVSTEMHM */
1150 if ( cf2_stack_count( opStack ) != 0 )
1151 {
1152 /* never add hints after the mask is computed */
1153 if ( cf2_hintmask_isValid( &hintMask ) )
1154 FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" ));
1155 }
1156
1157 cf2_doStems( font, 1160 cf2_doStems( font,
1158 opStack, 1161 opStack,
1159 &vStemHintArray, 1162 &vStemHintArray,
1160 width, 1163 width,
1161 &haveWidth, 1164 &haveWidth,
1162 0 ); 1165 0 );
1163 1166
1164 if ( font->decoder->width_only ) 1167 if ( font->decoder->width_only )
1165 goto exit; 1168 goto exit;
1166 1169
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 /* width is defined or default after this */ 1223 /* width is defined or default after this */
1221 haveWidth = TRUE; 1224 haveWidth = TRUE;
1222 1225
1223 if ( font->decoder->width_only ) 1226 if ( font->decoder->width_only )
1224 goto exit; 1227 goto exit;
1225 1228
1226 curY += cf2_stack_popFixed( opStack ); 1229 curY += cf2_stack_popFixed( opStack );
1227 curX += cf2_stack_popFixed( opStack ); 1230 curX += cf2_stack_popFixed( opStack );
1228 1231
1229 cf2_glyphpath_moveTo( &glyphPath, curX, curY ); 1232 cf2_glyphpath_moveTo( &glyphPath, curX, curY );
1230 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphP ath.callbacks->error) goto exit;
1231 1233
1232 break; 1234 break;
1233 1235
1234 case cf2_cmdHMOVETO: 1236 case cf2_cmdHMOVETO:
1235 FT_TRACE4(( " hmoveto\n" )); 1237 FT_TRACE4(( " hmoveto\n" ));
1236 1238
1237 if ( cf2_stack_count( opStack ) > 1 && !haveWidth ) 1239 if ( cf2_stack_count( opStack ) > 1 && !haveWidth )
1238 *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX; 1240 *width = cf2_stack_getReal( opStack, 0 ) + nominalWidthX;
1239 1241
1240 /* width is defined or default after this */ 1242 /* width is defined or default after this */
1241 haveWidth = TRUE; 1243 haveWidth = TRUE;
1242 1244
1243 if ( font->decoder->width_only ) 1245 if ( font->decoder->width_only )
1244 goto exit; 1246 goto exit;
1245 1247
1246 curX += cf2_stack_popFixed( opStack ); 1248 curX += cf2_stack_popFixed( opStack );
1247 1249
1248 cf2_glyphpath_moveTo( &glyphPath, curX, curY ); 1250 cf2_glyphpath_moveTo( &glyphPath, curX, curY );
1249 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphP ath.callbacks->error) goto exit;
1250 1251
1251 break; 1252 break;
1252 1253
1253 case cf2_cmdRLINECURVE: 1254 case cf2_cmdRLINECURVE:
1254 { 1255 {
1255 CF2_UInt count = cf2_stack_count( opStack ); 1256 CF2_UInt count = cf2_stack_count( opStack );
1256 CF2_UInt index = 0; 1257 CF2_UInt index = 0;
1257 1258
1258 1259
1259 FT_TRACE4(( " rlinecurve\n" )); 1260 FT_TRACE4(( " rlinecurve\n" ));
1260 1261
1261 while ( index + 6 < count ) 1262 while ( index + 6 < count )
1262 { 1263 {
1263 curX += cf2_stack_getReal( opStack, index + 0 ); 1264 curX += cf2_stack_getReal( opStack, index + 0 );
1264 curY += cf2_stack_getReal( opStack, index + 1 ); 1265 curY += cf2_stack_getReal( opStack, index + 1 );
1265 1266
1266 cf2_glyphpath_lineTo( &glyphPath, curX, curY ); 1267 cf2_glyphpath_lineTo( &glyphPath, curX, curY );
1267 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
1268 index += 2; 1268 index += 2;
1269 } 1269 }
1270 1270
1271 while ( index < count ) 1271 while ( index < count )
1272 { 1272 {
1273 CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; 1273 CF2_Fixed x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
1274 CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY; 1274 CF2_Fixed y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;
1275 CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1; 1275 CF2_Fixed x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;
1276 CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1; 1276 CF2_Fixed y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;
1277 CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2; 1277 CF2_Fixed x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
1278 CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2; 1278 CF2_Fixed y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;
1279 1279
1280 1280
1281 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); 1281 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
1282 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
1283 1282
1284 curX = x3; 1283 curX = x3;
1285 curY = y3; 1284 curY = y3;
1286 index += 6; 1285 index += 6;
1287 } 1286 }
1288 1287
1289 cf2_stack_clear( opStack ); 1288 cf2_stack_clear( opStack );
1290 } 1289 }
1291 continue; /* no need to clear stack again */ 1290 continue; /* no need to clear stack again */
1292 1291
(...skipping 19 matching lines...) Expand all
1312 else 1311 else
1313 x1 = curX; 1312 x1 = curX;
1314 1313
1315 y1 = cf2_stack_getReal( opStack, index + 0 ) + curY; 1314 y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;
1316 x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; 1315 x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
1317 y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; 1316 y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
1318 x3 = x2; 1317 x3 = x2;
1319 y3 = cf2_stack_getReal( opStack, index + 3 ) + y2; 1318 y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
1320 1319
1321 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); 1320 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
1322 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
1323 1321
1324 curX = x3; 1322 curX = x3;
1325 curY = y3; 1323 curY = y3;
1326 index += 4; 1324 index += 4;
1327 } 1325 }
1328 1326
1329 cf2_stack_clear( opStack ); 1327 cf2_stack_clear( opStack );
1330 } 1328 }
1331 continue; /* no need to clear stack again */ 1329 continue; /* no need to clear stack again */
1332 1330
(...skipping 19 matching lines...) Expand all
1352 else 1350 else
1353 y1 = curY; 1351 y1 = curY;
1354 1352
1355 x1 = cf2_stack_getReal( opStack, index + 0 ) + curX; 1353 x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
1356 x2 = cf2_stack_getReal( opStack, index + 1 ) + x1; 1354 x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
1357 y2 = cf2_stack_getReal( opStack, index + 2 ) + y1; 1355 y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
1358 x3 = cf2_stack_getReal( opStack, index + 3 ) + x2; 1356 x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;
1359 y3 = y2; 1357 y3 = y2;
1360 1358
1361 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); 1359 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
1362 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
1363 1360
1364 curX = x3; 1361 curX = x3;
1365 curY = y3; 1362 curY = y3;
1366 index += 4; 1363 index += 4;
1367 } 1364 }
1368 1365
1369 cf2_stack_clear( opStack ); 1366 cf2_stack_clear( opStack );
1370 } 1367 }
1371 continue; /* no need to clear stack again */ 1368 continue; /* no need to clear stack again */
1372 1369
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 1416
1420 ++index; 1417 ++index;
1421 } 1418 }
1422 else 1419 else
1423 y3 = y2; 1420 y3 = y2;
1424 1421
1425 alternate = TRUE; 1422 alternate = TRUE;
1426 } 1423 }
1427 1424
1428 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 ); 1425 cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
1429 if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
1430 1426
1431 curX = x3; 1427 curX = x3;
1432 curY = y3; 1428 curY = y3;
1433 index += 4; 1429 index += 4;
1434 } 1430 }
1435 1431
1436 cf2_stack_clear( opStack ); 1432 cf2_stack_clear( opStack );
1437 } 1433 }
1438 continue; /* no need to clear stack again */ 1434 continue; /* no need to clear stack again */
1439 1435
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 cf2_arrstack_finalize( &subrStack ); 1536 cf2_arrstack_finalize( &subrStack );
1541 cf2_stack_free( opStack ); 1537 cf2_stack_free( opStack );
1542 1538
1543 FT_TRACE4(( "\n" )); 1539 FT_TRACE4(( "\n" ));
1544 1540
1545 return; 1541 return;
1546 } 1542 }
1547 1543
1548 1544
1549 /* END */ 1545 /* END */
OLDNEW
« no previous file with comments | « third_party/freetype/src/cff/cf2intrp.h ('k') | third_party/freetype/src/cff/cf2read.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698