479 {
480
482
483
485
488
491
492
493 FT_Int known_othersubr_result_cnt = 0;
496
497#define PS_STORAGE_SIZE 3
500
501
503
507
510
511
512 FT_UInt32 instructionLimit = 20000000UL;
513
515
518
520
521
522
523
526
528#ifdef __REACTOS__
530 if (!glyphPath_allocated) return;
531
532#define glyphPath (*glyphPath_allocated)
533#else
535#endif
536
540
541
554
555
557
558
559
560
561
562
566 scaleY,
567
568 &hStemHintArray,
569 &vStemHintArray,
570 &hintMask,
571 hintOriginY,
573 translation );
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
595
596
597
598
599
600
601
602
603
607
608 if ( !opStack )
609 {
610 lastError =
FT_THROW( Out_Of_Memory );
612 }
613
614
615
616
617
619
621
622
625
627 charstringIndex = 0;
628
629
630 while ( 1 )
631 {
633 FT_ASSERT( known_othersubr_result_cnt == 0 ||
634 result_cnt == 0 );
635
637 {
638
639
640
641 if ( charstringIndex )
643 else
645 }
646 else
647 {
649
650
651
655 }
656
658 {
659 if ( !initial_map_ready &&
667 op1 >= 32 ) )
668 {
669
670
671
672 FT_TRACE4((
" <outline command skipped>\n" ));
674 continue;
675 }
676
677 if ( result_cnt > 0 &&
681 op1 >= 32 ) )
682 {
683
684 result_cnt = 0;
685 }
686
687 if ( large_int && !( op1 >= 32 || op1 ==
cf2_escDIV ) )
688 {
689 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
690 " no `div' after large integer\n" ));
691
693 }
694 }
695
696
699
700 instructionLimit--;
701 if ( instructionLimit == 0 )
702 {
703 lastError =
FT_THROW( Invalid_Glyph_Format );
705 }
706
707 switch( op1 )
708 {
712
713 FT_TRACE4((
" unknown op (%d)\n", op1 ));
714 break;
715
718
720 break;
721
722 if (
font->blend.usedBV )
723 {
724
725 lastError =
FT_THROW( Invalid_Glyph_Format );
727 }
728
729 {
731
732
735 }
736 break;
737
739 {
741
742
744
746 break;
747
748
749 if ( !
font->blend.font )
750 {
751 lastError =
FT_THROW( Invalid_Glyph_Format );
753 }
754
755
756 if (
font->cffload->blend_check_vector( &
font->blend,
760 {
761 lastError =
font->cffload->blend_build_vector( &
font->blend,
765 if ( lastError )
767 }
768
769
771 if ( numBlends > stackSize )
772 {
773 lastError =
FT_THROW( Invalid_Glyph_Format );
775 }
776
778
780 }
781 continue;
782
786 : " hstem" ));
787
789 {
790
791
793 {
795 " invalid horizontal hint mask\n" ));
796 break;
797 }
798 }
799
800
802 opStack,
803 &hStemHintArray,
805 &haveWidth,
807 : 0 );
808
811
812 break;
813
817 : " vstem" ));
818
820 {
821
822
824 {
826 " invalid vertical hint mask\n" ));
827 break;
828 }
829 }
830
831
833 opStack,
834 &vStemHintArray,
836 &haveWidth,
838 : 0 );
839
842
843 break;
844
847
848 if (
font->isT1 && !
decoder->flex_state && !haveWidth )
849 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
850 " No width. Use hsbw/sbw as first op\n" ));
851
854 nominalWidthX );
855
856
858
861
863
866
867 break;
868
870 {
873
874
876
878 {
883
885 }
886
888 }
889 continue;
890
893 {
896
898
899
900 FT_TRACE4((
"%s\n", isX ?
" hlineto" :
" vlineto" ));
901
903 {
905
906
907 if ( isX )
909 else
911
912 isX = !isX;
913
915 }
916
918 }
919 continue;
920
923 {
926
927
929 : " rrcurveto" ));
930
932 {
934
935
942
944
945 curX = x3;
946 curY = y3;
948 }
949
951 {
956
958 }
959
961 }
962 continue;
963
966 FT_TRACE4((
" unknown op (%d)\n", op1 ));
967 else
968 {
970
971
973
975 }
976 break;
977
980 {
982
983
985 : " callsubr" ));
986
989 {
990
991 lastError =
FT_THROW( Invalid_Glyph_Format );
993 }
994
995
998 &subrStack,
999 (size_t)charstringIndex + 1 );
1000
1001
1003
1005 {
1008
1009
1012 else
1013 subrNum = -1;
1014 }
1015
1016 switch ( op1 )
1017 {
1019 FT_TRACE4((
" (idx %d, entering level %d)\n",
1020 subrNum +
decoder->globals_bias,
1021 charstringIndex + 1 ));
1022
1024 subrNum,
1025 charstring ) )
1026 {
1027 lastError =
FT_THROW( Invalid_Glyph_Format );
1029 }
1030 break;
1031
1032 default:
1033
1034 FT_TRACE4((
" (idx %d, entering level %d)\n",
1035 subrNum +
decoder->locals_bias,
1036 charstringIndex + 1 ));
1037
1039 subrNum,
1040 charstring ) )
1041 {
1042 lastError =
FT_THROW( Invalid_Glyph_Format );
1044 }
1045 }
1046
1047 charstringIndex += 1;
1048 }
1049 continue;
1050
1052 FT_TRACE4((
" return (leaving level %d)\n", charstringIndex ));
1053
1054 if ( charstringIndex < 1 )
1055 {
1056
1057 lastError =
FT_THROW( Invalid_Glyph_Format );
1059 }
1060
1061
1064 &subrStack,
1066 continue;
1067
1069 {
1071
1072
1073
1074
1075 switch ( op2 )
1076 {
1078 {
1079 static const FT_Bool readFromStack[12] =
1080 {
1087 };
1088
1089
1091
1093 &curX,
1094 &curY,
1095 &glyphPath,
1096 readFromStack,
1098 }
1099 continue;
1100
1102 {
1103 static const FT_Bool readFromStack[12] =
1104 {
1111 };
1112
1113
1115
1117 &curX,
1118 &curY,
1119 &glyphPath,
1120 readFromStack,
1122 }
1123 break;
1124
1126 {
1127 static const FT_Bool readFromStack[12] =
1128 {
1135 };
1136
1137
1139
1141 &curX,
1142 &curY,
1143 &glyphPath,
1144 readFromStack,
1146 }
1147 continue;
1148
1150 {
1151 static const FT_Bool readFromStack[12] =
1152 {
1159 };
1160
1161
1163
1165 &curX,
1166 &curY,
1167 &glyphPath,
1168 readFromStack,
1170 }
1171 continue;
1172
1173
1180 FT_TRACE4((
" unknown op (12, %d)\n", op2 ));
1181 break;
1182
1183 default:
1184 {
1186 FT_TRACE4((
" unknown op (12, %d)\n", op2 ));
1188 {
1189
1190 result_cnt = 0;
1191 }
1192 else
1193 {
1194
1195
1196 switch ( op2 )
1197 {
1198
1200
1202
1203 break;
1204
1207
1208
1209
1210
1211
1212
1213
1214 {
1216 FT_TRACE4((
" unknown op (12, %d)\n", op2 ));
1217 else
1218 {
1220
1222
1223
1225 : " hstem3" ));
1226
1228
1232
1234 opStack, 2,
1238 opStack, 4,
1241
1242
1244 opStack,
1245 isV ? &vStemHintArray : &hStemHintArray,
1247 &haveWidth,
1248 isV ?
decoder->builder.left_bearing->x
1249 :
decoder->builder.left_bearing->y );
1250
1253 }
1254 }
1255 break;
1256
1258 {
1261
1262
1264
1267
1269 }
1270 continue;
1271
1273 {
1276
1277
1279
1282
1284 }
1285 continue;
1286
1288 {
1290
1291
1293
1295
1297 }
1298 continue;
1299
1302 FT_TRACE4((
" unknown op (12, %d)\n", op2 ));
1303 else
1304 {
1306 CF2_Int bchar_index, achar_index;
1308
1309#ifdef FT_CONFIG_OPTION_INCREMENTAL
1311#endif
1314
1317
1321
1322
1324
1325 if ( doingSeac )
1326 {
1328 lastError =
FT_THROW( Invalid_Glyph_Format );
1330 }
1331
1332 if (
decoder->builder.metrics_only )
1333 {
1334 FT_ERROR((
" unexpected seac\n" ));
1335 lastError =
FT_THROW( Invalid_Glyph_Format );
1337 }
1338
1339
1340
1341
1342#ifdef FT_CONFIG_OPTION_INCREMENTAL
1343 if (
decoder->glyph_names == 0 &&
1344 !
face->root.internal->incremental_interface )
1345#else
1346 if (
decoder->glyph_names == 0 )
1347#endif
1348 {
1350 "cf2_interpT2CharString: (Type 1 seac)"
1351 " glyph names table not available in this font\n" ));
1352 lastError =
FT_THROW( Invalid_Glyph_Format );
1354 }
1355
1356
1357 adx +=
decoder->builder.left_bearing->x;
1358
1359#ifdef FT_CONFIG_OPTION_INCREMENTAL
1360 if (
face->root.internal->incremental_interface )
1361 {
1362
1363 bchar_index = bchar;
1364 achar_index = achar;
1365 }
1366 else
1367#endif
1368 {
1373 }
1374
1375 if ( bchar_index < 0 || achar_index < 0 )
1376 {
1378 "cf2_interpT2CharString: (Type 1 seac)"
1379 " invalid seac character code arguments\n" ));
1380 lastError =
FT_THROW( Invalid_Glyph_Format );
1382 }
1383
1384
1385
1386
1387 if (
decoder->builder.no_recurse )
1388 {
1392
1393
1394
1397 {
1400 }
1401
1402 subg = loader->current.subglyphs;
1403
1404
1405 subg->index = bchar_index;
1408 subg->arg1 = 0;
1409 subg->arg2 = 0;
1410 subg++;
1411
1412
1413 subg->index = achar_index;
1417
1418
1420 glyph->
subglyphs = loader->base.subglyphs;
1421 glyph->
format = FT_GLYPH_FORMAT_COMPOSITE;
1422
1423 loader->current.num_subglyphs = 2;
1424
1426 }
1427
1428
1429
1430
1431
1433
1436 &component );
1438 {
1441 }
1443 &component,
1445 translation,
1447 0,
1448 0,
1449 &dummyWidth );
1451
1452
1453
1454
1455 left_bearing = *
decoder->builder.left_bearing;
1457
1458 decoder->builder.left_bearing->x = 0;
1459 decoder->builder.left_bearing->y = 0;
1460
1461
1462
1463
1466 &component );
1468 {
1471 }
1473 &component,
1475 translation,
1477 adx - asb,
1478 ady,
1479 &dummyWidth );
1481
1482
1483
1484
1485 *
decoder->builder.left_bearing = left_bearing;
1487
1489 }
1490 break;
1491
1494 FT_TRACE4((
" unknown op (12, %d)\n", op2 ));
1495 else
1496 {
1499
1500
1502
1504
1507
1510
1515
1517
1518
1519
1520
1521
1524
1525 if ( initial_map_ready )
1526 {
1529 }
1530 }
1531 break;
1532
1534 {
1536
1537
1539
1541
1544 else
1546 }
1547 continue;
1548
1550 {
1553
1554
1556
1559
1562 summand2 ) );
1563 }
1564 continue;
1565
1567 {
1570
1571
1573
1576
1579 }
1580 continue;
1581
1583 {
1586
1587
1589
1590 if (
font->isT1 && large_int )
1591 {
1594
1596 }
1597 else
1598 {
1601 }
1602
1605
1606 }
1607 continue;
1608
1610 {
1612
1613
1615
1617
1620 else
1622 }
1623 continue;
1624
1626 {
1629
1630
1632
1635
1637 }
1638 continue;
1639
1642 FT_TRACE4((
" unknown op (12, %d)\n", op2 ));
1643 else
1644 {
1649
1650
1652
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1670
1672
1673 known_othersubr_result_cnt = 0;
1674 result_cnt = 0;
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694 switch ( subr_no )
1695 {
1696 case 0:
1698 goto Unexpected_OtherSubr;
1699
1700 if ( initial_map_ready &&
1702 decoder->num_flex_vectors != 7 ) )
1703 {
1704 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
1705 " unexpected flex end\n" ));
1706 lastError =
FT_THROW( Invalid_Glyph_Format );
1708 }
1709
1710
1711
1714 known_othersubr_result_cnt = 2;
1715 break;
1716
1717 case 1:
1719 goto Unexpected_OtherSubr;
1720
1721 if ( !initial_map_ready )
1722 break;
1723
1726
1728 decoder->num_flex_vectors = 0;
1729 break;
1730
1731 case 2:
1732 {
1735
1736
1738 goto Unexpected_OtherSubr;
1739
1740 if ( !initial_map_ready )
1741 break;
1742
1744 {
1745 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
1746 " missing flex start\n" ));
1747 lastError =
FT_THROW( Invalid_Glyph_Format );
1749 }
1750
1751
1752
1753
1754
1756 if (
idx > 0 &&
idx < 7 )
1757 {
1758
1759
1760
1761
1762
1764 1 ) )
1765 {
1766 lastError =
FT_THROW( Invalid_Glyph_Format );
1768 }
1769
1770
1772
1773 flexStore[idx2 - 2] = curX;
1774 flexStore[idx2 - 1] = curY;
1775
1776 if (
idx == 3 ||
idx == 6 )
1778 flexStore[0],
1779 flexStore[1],
1780 flexStore[2],
1781 flexStore[3],
1782 flexStore[4],
1783 flexStore[5] );
1784 }
1785 }
1786 break;
1787
1788 case 3:
1790 goto Unexpected_OtherSubr;
1791
1792 if ( initial_map_ready )
1793 {
1794
1795
1798
1802 }
1803
1804 known_othersubr_result_cnt = 1;
1805 break;
1806
1807 case 12:
1808 case 13:
1809
1811 break;
1812
1813 case 14:
1814 case 15:
1815 case 16:
1816 case 17:
1817 case 18:
1818 {
1823
1824
1825 if ( !blend )
1826 {
1828 "cf2_interpT2CharString:"
1829 " unexpected multiple masters operator\n" ));
1830 lastError =
FT_THROW( Invalid_Glyph_Format );
1832 }
1833
1834 num_points = (
FT_UInt)subr_no - 13 +
1835 ( subr_no == 18 );
1838 {
1840 "cf2_interpT2CharString:"
1841 " incorrect number of multiple masters arguments\n" ));
1842 lastError =
FT_THROW( Invalid_Glyph_Format );
1844 }
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862 delta = opIdx + num_points;
1864 for ( nn = 0; nn < num_points; nn++ )
1865 {
1868
1869
1874 delta++ ),
1876
1878 }
1881
1882 known_othersubr_result_cnt = (
FT_Int)num_points;
1883 break;
1884 }
1885
1886 case 19:
1887
1888
1889
1890
1891 {
1894
1895
1897 goto Unexpected_OtherSubr;
1898
1900
1904 goto Unexpected_OtherSubr;
1905
1910 }
1911 break;
1912
1913 case 20:
1914
1915
1916 {
1919
1920
1922 goto Unexpected_OtherSubr;
1923
1926
1929 summand2 ) );
1930 known_othersubr_result_cnt = 1;
1931 }
1932 break;
1933
1934 case 21:
1935
1936
1937 {
1940
1941
1943 goto Unexpected_OtherSubr;
1944
1947
1950 subtrahend ) );
1951 known_othersubr_result_cnt = 1;
1952 }
1953 break;
1954
1955 case 22:
1956
1957
1958 {
1961
1962
1964 goto Unexpected_OtherSubr;
1965
1968
1971 known_othersubr_result_cnt = 1;
1972 }
1973 break;
1974
1975 case 23:
1976
1977
1978 {
1981
1982
1984 goto Unexpected_OtherSubr;
1985
1988
1990 goto Unexpected_OtherSubr;
1991
1995 known_othersubr_result_cnt = 1;
1996 }
1997 break;
1998
1999 case 24:
2000
2001
2002 {
2005
2006
2008 goto Unexpected_OtherSubr;
2009
2011
2014 goto Unexpected_OtherSubr;
2015
2018 }
2019 break;
2020
2021 case 25:
2022
2023
2024
2025 {
2028
2029
2031 goto Unexpected_OtherSubr;
2032
2034
2037 goto Unexpected_OtherSubr;
2038
2041 known_othersubr_result_cnt = 1;
2042 }
2043 break;
2044
2045#if 0
2046 case 26:
2047
2048
2049
2050
2051
2054 break;
2055#endif
2056
2057 case 27:
2058
2059
2060
2061 {
2066
2067
2069 goto Unexpected_OtherSubr;
2070
2075
2078 known_othersubr_result_cnt = 1;
2079 }
2080 break;
2081
2082 case 28:
2083
2084
2085
2086 {
2088
2089
2091 goto Unexpected_OtherSubr;
2092
2093
2094
2096 ( (
decoder->current_subfont->random & 0xFFFF ) + 1 );
2097
2098 decoder->current_subfont->random =
2100
2102 known_othersubr_result_cnt = 1;
2103 }
2104 break;
2105
2106 default:
2107 if (
arg_cnt >= 0 && subr_no >= 0 )
2108 {
2110
2111
2113 "cf2_interpT2CharString (Type 1 mode):"
2114 " unknown othersubr [%d %d], wish me luck\n",
2116
2117
2118
2119
2123
2127
2128 break;
2129 }
2130
2131
2132 Unexpected_OtherSubr:
2133 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
2134 " invalid othersubr [%d %d]\n",
2136 lastError =
FT_THROW( Invalid_Glyph_Format );
2138 }
2139 }
2140 continue;
2141
2144 FT_TRACE4((
" unknown op (12, %d)\n", op2 ));
2145 else
2146 {
2148
2149 if ( known_othersubr_result_cnt > 0 )
2150 {
2151 known_othersubr_result_cnt--;
2152
2153 continue;
2154 }
2155
2156 if ( result_cnt == 0 )
2157 {
2158 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
2159 " no more operands for othersubr\n" ));
2160 lastError =
FT_THROW( Invalid_Glyph_Format );
2162 }
2163
2164 result_cnt--;
2166 }
2167 continue;
2168
2171
2173 continue;
2174
2176 {
2179
2180
2182
2185
2188 }
2189 continue;
2190
2192 {
2194
2195
2197
2199
2202 }
2203 continue;
2204
2206 {
2211
2212
2214
2219
2222 }
2223 continue;
2224
2226 {
2228
2229
2231
2232
2233
2235 ( (
decoder->current_subfont->random & 0xFFFF ) + 1 );
2236
2237 decoder->current_subfont->random =
2239
2241 }
2242 continue;
2243
2245 {
2248
2249
2251
2254
2257 }
2258 continue;
2259
2261 {
2263
2264
2266
2269 {
2270
2271
2274
2275
2276
2277 for (;;)
2278 {
2280 if ( new_root ==
root )
2281 break;
2283 }
2285 }
2286 else
2288
2290 }
2291 continue;
2292
2294 {
2296
2297
2299
2301
2304 }
2305 continue;
2306
2308 {
2311
2312
2314
2317
2320 }
2321 continue;
2322
2324 {
2327
2328
2330
2333
2335 {
2336
2337
2339
2340
2344 gr_idx = 0;
2345 else
2347
2350 gr_idx ) );
2351 }
2352 }
2353 continue;
2354
2356 {
2359
2360
2362
2365
2367 }
2368 continue;
2369
2372 FT_TRACE4((
" unknown op (12, %d)\n", op2 ));
2373 else
2374 {
2376
2377 if ( !initial_map_ready )
2378 break;
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393#if 0
2394
2395 if (
decoder->flex_state != 1 )
2396 {
2397 FT_ERROR((
"cf2_interpT2CharString:"
2398 " unexpected `setcurrentpoint'\n" ));
2399 goto Syntax_Error;
2400 }
2401 else
2402 ...
2403#endif
2404
2407
2409 }
2410 break;
2411
2412 }
2413 }
2414 }
2415 }
2416 }
2417
2418 break;
2419
2422 FT_TRACE4((
" unknown op (%d)\n", op1 ));
2423 else
2424 {
2427
2428
2430
2432
2435
2437
2439 lsb_x );
2440
2442
2443
2444
2445
2448
2449 if ( initial_map_ready )
2451 }
2452 break;
2453
2456
2457 if (
font->isT1 && !initial_map_ready )
2458 {
2459 FT_TRACE5((
"cf2_interpT2CharString (Type 1 mode): "
2460 "Build initial hintmap, rewinding...\n" ));
2461
2462
2464
2465 initial_map_ready =
TRUE;
2466
2467
2470
2474
2475
2476
2477
2478
2479 while ( charstringIndex > 0 )
2480 {
2481 FT_TRACE4((
" return (leaving level %d)\n", charstringIndex ));
2482
2483
2486 &subrStack,
2488 }
2489 charstring->ptr = charstring->start;
2490
2491 break;
2492 }
2493
2496 {
2497 if ( !haveWidth )
2499 nominalWidthX );
2500 }
2501
2502
2504
2507
2508
2510
2511
2512
2514 {
2515
2516
2517
2523
2524
2525 if ( doingSeac )
2526 {
2527 lastError =
FT_THROW( Invalid_Glyph_Format );
2529 }
2530
2533
2536
2539 {
2542 }
2544 &component,
2546 translation,
2548 curX,
2549 curY,
2550 &dummyWidth );
2552
2555 {
2558 }
2560 &component,
2562 translation,
2564 0,
2565 0,
2566 &dummyWidth );
2568 }
2570
2573
2574
2576
2577
2580 {
2581 FT_TRACE4((
"cf2_interpT2CharString: invalid hint mask\n" ));
2582 break;
2583 }
2584
2585
2586
2588 opStack,
2589 &vStemHintArray,
2591 &haveWidth,
2592 0 );
2593
2596
2598 {
2599
2601 charstring,
2604 }
2605 else
2606 {
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620#ifdef __REACTOS__
2623 if (!counterHintMap_allocated)
2624 {
2625 lastError = FT_Err_Out_Of_Memory;
2627 }
2628
2629#define counterHintMap (*counterHintMap_allocated)
2630#else
2633#endif
2634
2635
2640 scaleY );
2642
2644 charstring,
2648 &hStemHintArray,
2649 &vStemHintArray,
2650 &counterMask,
2651 0,
2653#ifdef __REACTOS__
2654 free(counterHintMap_allocated);
2655#undef counterHintMap
2656#endif
2657 }
2658 break;
2659
2662
2663 if (
font->isT1 && !
decoder->flex_state && !haveWidth )
2664 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
2665 " No width. Use hsbw/sbw as first op\n" ));
2666
2669 nominalWidthX );
2670
2671
2673
2676
2679
2682
2683 break;
2684
2687
2688 if (
font->isT1 && !
decoder->flex_state && !haveWidth )
2689 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
2690 " No width. Use hsbw/sbw as first op\n" ));
2691
2694 nominalWidthX );
2695
2696
2698
2701
2703
2706
2707 break;
2708
2710 {
2713
2714
2716
2718 {
2723
2726 }
2727
2729 {
2731
2732
2739
2741
2742 curX = x3;
2743 curY = y3;
2745 }
2746
2748 }
2749 continue;
2750
2752 {
2755
2756
2757
2758
2759
2760 count = count1 & ~2U;
2762
2764
2766 {
2768
2769
2771 {
2773
2775 }
2776 else
2778
2784
2786
2787 curX = x3;
2788 curY = y3;
2790 }
2791
2793 }
2794 continue;
2795
2797 {
2800
2801
2802
2803
2804
2805 count = count1 & ~2U;
2807
2809
2811 {
2813
2814
2816 {
2818
2820 }
2821 else
2823
2829
2831
2832 curX = x3;
2833 curY = y3;
2835 }
2836
2838 }
2839 continue;
2840
2843 {
2846
2848
2849
2850
2851
2852
2853
2854 count = count1 & ~2U;
2856
2857 FT_TRACE4((
"%s\n", alternate ?
" hvcurveto" :
" vhcurveto" ));
2858
2860 {
2862
2863
2864 if ( alternate )
2865 {
2871
2873 {
2875
2877 }
2878 else
2880
2882 }
2883 else
2884 {
2890
2892 {
2894
2896 }
2897 else
2899
2901 }
2902
2904
2905 curX = x3;
2906 curY = y3;
2908 }
2909
2911 }
2912 continue;
2913
2915 {
2917
2920
2921
2923 byte2 );
2924
2926
2928 }
2929 continue;
2930
2931 default:
2932
2933 {
2934 if ( op1 <= 246 )
2935 {
2937
2938
2940
2942
2943
2945 }
2946
2947 else if ( op1 <= 250 )
2948 {
2950
2951
2957
2959
2960
2962 }
2963
2964 else if ( op1 <= 254 )
2965 {
2967
2968
2974
2976
2977
2979 }
2980
2981 else
2982 {
2984
2989
2990
2992 ( byte2 << 16 ) |
2993 ( byte3 << 8 ) |
2994 byte4 );
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3012 {
3013 if (
v > 32000 ||
v < -32000 )
3014 {
3015 if ( large_int )
3016 FT_ERROR((
"cf2_interpT2CharString (Type 1 mode):"
3017 " no `div' after large integer\n" ));
3018 else
3020 }
3021
3023
3025 }
3026 else
3027 {
3029
3031 }
3032 }
3033 }
3034 continue;
3035
3036 }
3037
3039
3040 }
3041
3042
3044 " charstring ends without ENDCHAR\n" ));
3045
3047
3049
3052
3053
3059
3061
3062#ifdef __REACTOS__
3063 free(glyphPath_allocated);
3064#undef glyphPath
3065#endif
3066
3067 return;
3068 }
static struct _test_info results[8]
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
FT_DivFix(FT_Long a, FT_Long b)
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS
struct FT_GlyphSlotRec_ * FT_GlyphSlot
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES
#define FT_TRACE5(varformat)
cannot open resource broken file module version is too low unimplemented feature broken offset within table missing module invalid glyph index unsupported glyph image format invalid outline too many hints invalid object handle invalid module handle invalid size handle invalid charmap handle invalid stream handle too many extensions unlisted object invalid stream seek invalid stream read invalid frame operation invalid frame read raster corrupted negative height while rastering invalid opcode stack overflow bad argument invalid reference found ENDF opcode in execution stream invalid code range too many function definitions SFNT font table missing name table missing horizontal PostScript(post) table missing" ) FT_ERRORDEF_( Invalid_Horiz_Metrics
FT_GlyphLoader_Prepare(FT_GlyphLoader loader)
FT_GlyphLoader_CheckSubGlyphs(FT_GlyphLoader loader, FT_UInt n_subs)
size_t * ft_hash_num_lookup(FT_Int num, FT_Hash hash)
FT_BEGIN_HEADER typedef signed long FT_Pos
#define T1_MAX_SUBRS_CALLS
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLdouble GLdouble GLdouble r
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLenum GLuint GLint GLenum face
GLenum GLuint GLenum GLsizei const GLchar * buf
GLboolean GLenum GLenum GLvoid * values
GLfloat GLfloat GLfloat v2
int jpeg_marker_parser_method routine
static char memory[1024 *256]
cf2_arrstack_getPointer(const CF2_ArrStack arrstack, size_t idx)
cf2_arrstack_setCount(CF2_ArrStack arrstack, size_t numElements)
cf2_arrstack_finalize(CF2_ArrStack arrstack)
cf2_arrstack_init(CF2_ArrStack arrstack, FT_Memory memory, FT_Error *error, size_t sizeItem)
cf2_arrstack_getBuffer(const CF2_ArrStack arrstack)
cf2_arrstack_clear(CF2_ArrStack arrstack)
cf2_arrstack_size(const CF2_ArrStack arrstack)
FT_BEGIN_HEADER struct CF2_ArrStackRec_ CF2_ArrStackRec
cf2_setError(FT_Error *error, FT_Error value)
#define CF2_OPERAND_STACK_SIZE
cf2_freeSeacComponent(PS_Decoder *decoder, CF2_Buffer buf)
cf2_freeT1SeacComponent(PS_Decoder *decoder, CF2_Buffer buf)
cf2_initLocalRegionBuffer(PS_Decoder *decoder, CF2_Int subrNum, CF2_Buffer buf)
cf2_initGlobalRegionBuffer(PS_Decoder *decoder, CF2_Int subrNum, CF2_Buffer buf)
cf2_getT1SeacComponent(PS_Decoder *decoder, FT_UInt glyph_index, CF2_Buffer buf)
cf2_getMaxstack(PS_Decoder *decoder)
cf2_getDefaultWidthX(PS_Decoder *decoder)
cf2_getSeacComponent(PS_Decoder *decoder, CF2_Int code, CF2_Buffer buf)
cf2_glyphpath_moveTo(CF2_GlyphPath glyphpath, CF2_Fixed x, CF2_Fixed y)
cf2_glyphpath_finalize(CF2_GlyphPath glyphpath)
cf2_hintmap_build(CF2_HintMap hintmap, CF2_ArrStack hStemHintArray, CF2_ArrStack vStemHintArray, CF2_HintMask hintMask, CF2_Fixed hintOrigin, FT_Bool initialMap)
cf2_glyphpath_closeOpenPath(CF2_GlyphPath glyphpath)
cf2_glyphpath_lineTo(CF2_GlyphPath glyphpath, CF2_Fixed x, CF2_Fixed y)
cf2_hintmap_init(CF2_HintMap hintmap, CF2_Font font, CF2_HintMap initialMap, CF2_ArrStack hintMoves, CF2_Fixed scale)
cf2_glyphpath_init(CF2_GlyphPath glyphpath, CF2_Font font, CF2_OutlineCallbacks callbacks, CF2_Fixed scaleY, CF2_ArrStack hStemHintArray, CF2_ArrStack vStemHintArray, CF2_HintMask hintMask, CF2_Fixed hintOriginY, const CF2_Blues blues, const FT_Vector *fractionalTranslation)
static void cf2_doFlex(CF2_Stack opStack, CF2_Fixed *curX, CF2_Fixed *curY, CF2_GlyphPath glyphPath, const FT_Bool *readFromStack, FT_Bool doConditionalLastRead)
static void cf2_doStems(const CF2_Font font, CF2_Stack opStack, CF2_ArrStack stemHintArray, CF2_Fixed *width, FT_Bool *haveWidth, CF2_Fixed hintOffset)
static void cf2_doBlend(const CFF_Blend blend, CF2_Stack opStack, CF2_UInt numBlends)
static void cf2_hintmask_read(CF2_HintMask hintmask, CF2_Buffer charstring, size_t bitCount)
cf2_hintmask_isValid(const CF2_HintMask hintmask)
cf2_hintmask_init(CF2_HintMask hintmask, FT_Error *error)
cf2_interpT2CharString(CF2_Font font, CF2_Buffer buf, CF2_OutlineCallbacks callbacks, const FT_Vector *translation, FT_Bool doingSeac, CF2_Fixed curX, CF2_Fixed curY, CF2_Fixed *width)
ps_builder_check_points(PS_Builder *builder, FT_Int count)
cf2_buf_isEnd(CF2_Buffer buf)
FT_BEGIN_HEADER struct CF2_BufferRec_ CF2_BufferRec
FT_BEGIN_HEADER struct CF2_BufferRec_ * CF2_Buffer
cf2_stack_pushInt(CF2_Stack stack, CF2_Int val)
cf2_stack_popFixed(CF2_Stack stack)
cf2_stack_popInt(CF2_Stack stack)
cf2_stack_free(CF2_Stack stack)
cf2_stack_roll(CF2_Stack stack, CF2_Int count, CF2_Int shift)
cf2_stack_init(FT_Memory memory, FT_Error *e, FT_UInt stackSize)
cf2_stack_pushFixed(CF2_Stack stack, CF2_Fixed val)
CF2_ArrStackRec hintMoves
CF2_HintMapRec initialHintMap
FT_Slot_Internal internal
t1_lookup_glyph_by_stdcharcode_ps(PS_Decoder *decoder, FT_Int charcode)
struct T1_FaceRec_ * T1_Face
static unsigned arg_cnt(const DISPPARAMS *dp)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2