* massive re-formatting changes to many, many source files. I don't want to list them all here. The operations performed were all logical transformations of the sources: - trying to convert all enums and constants to CAPITALIZED_STYLE, with #define definitions like #define my_old_constants MY_NEW_CONSTANT - big, big update of the documentation comments * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c, include/freetype/ftimage.h: adding support for LCD-optimized rendering though the new constants/enums: FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V this is still work in progress, don't expect everything to work correctly though most of the features have been implemented. * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering targets: FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering FT_LOAD_TARGET_MONO :: monochrome bitmaps FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering note that FT_LOAD_TARGET_NORMAL is 0, which means that the default behaviour of the font engine is _unchanged_.
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 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073
diff --git a/ChangeLog b/ChangeLog
index 6d6b025..90bf2ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2002-08-27 David Turner <david@freetype.org>
+
+ * massive re-formatting changes to many, many source files. I don't
+ want to list them all here. The operations performed were all logical
+ transformations of the sources:
+
+ - trying to convert all enums and constants to CAPITALIZED_STYLE, with
+ #define definitions like
+
+ #define my_old_constants MY_NEW_CONSTANT
+
+ - big, big update of the documentation comments
+
+ * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
+ include/freetype/ftimage.h: adding support for LCD-optimized rendering
+ though the new constants/enums:
+
+ FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
+ FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
+
+ this is still work in progress, don't expect everything to work correctly
+ though most of the features have been implemented.
+
+ * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
+ targets:
+
+ FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
+ FT_LOAD_TARGET_MONO :: monochrome bitmaps
+ FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
+ FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
+
+ note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
+ behaviour of the font engine is _unchanged_.
+
+
2002-08-27 Werner Lemberg <wl@gnu.org>
* docs/VERSION.DLL: New file.
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index aa1acd1..4853932 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -407,12 +407,14 @@ FT_BEGIN_HEADER
/* */
/* to get a simple enumeration without assigning special numbers. */
/* */
+
#ifndef FT_ENC_TAG
-#define FT_ENC_TAG( value, _x1, _x2, _x3, _x4 ) \
- value = ( ( (unsigned long)_x1 << 24 ) | \
- ( (unsigned long)_x2 << 16 ) | \
- ( (unsigned long)_x3 << 8 ) | \
- (unsigned long)_x4 )
+#define FT_ENC_TAG(value,a,b,c,d) \
+ value = ( ( (FT_UInt32)(a) << 24 ) | \
+ ( (FT_UInt32)(b) << 16 ) | \
+ ( (FT_UInt32)(c) << 8 ) | \
+ (FT_UInt32)(d) )
+
#endif /* FT_ENC_TAG */
@@ -429,30 +431,156 @@ FT_BEGIN_HEADER
/* Because of 32-bit charcodes defined in Unicode (i.e., surrogates), */
/* all character codes must be expressed as FT_Longs. */
/* */
+ /* The values of this type correspond to specific character */
+ /* repertories (i.e. charsets), and not to text encoding methods */
+ /* (like UTF-8, UTF-16, GB2312_EUC, etc...) */
+ /* */
/* Other encodings might be defined in the future. */
/* */
+ /* <Values> */
+ /* FT_ENCODING_NONE :: */
+ /* the encoding value 0 is reserved. */
+ /* */
+ /* FT_ENCODING_UNICODE :: */
+ /* corresponds to the Unicode character set. This value covers */
+ /* all versions of the Unicode repertoire, including ASCII and */
+ /* Latin-1. Most fonts include a Unicode charmap, but not all */
+ /* of them. */
+ /* */
+ /* FT_ENCODING_MS_SYMBOL :: */
+ /* corresponds to the Microsoft Symbol encoding, used to encode */
+ /* mathematical symbols in the 32..255 character code range. For */
+ /* more information, see http://www.ceviz.net/symbol.htm */
+ /* */
+ /* FT_ENCODING_MS_SJIS :: */
+ /* corresponds to Microsoft's Japanese SJIS encoding. More info */
+ /* at http://langsupport.japanreference.com/encoding.shtml. */
+ /* see note on multi-byte encodings below. */
+ /* */
+ /* FT_ENCODING_MS_GB2312 :: */
+ /* corresponds to the encoding system for Simplified Chinese, as */
+ /* used in China. Only found in some TrueType fonts */
+ /* */
+ /* */
+ /* FT_ENCODING_MS_BIG5 :: */
+ /* corresponds to the encoding system for Simplified Chinese, as */
+ /* used in Taiwan and Hong Kong. Only found in some TrueType fonts */
+ /* */
+ /* FT_ENCODING_MS_WANSUNG :: */
+ /* corresponds to the Korean encoding system known as Wansung. */
+ /* This is a Microsoft encoding that is only found in some TrueType */
+ /* fonts. For more information, see */
+ /* http://www.microsoft.com/typography/unicode/949.txt */
+ /* */
+ /* FT_ENCODING_MS_JOHAB :: */
+ /* The Korean standard character set (KS C-5601-1992), which */
+ /* corresponds to Windows code page 1361. This character set */
+ /* includes all possible Hangeul character combinations. */
+ /* only found on some rare TrueType fonts. */
+ /* */
+ /* FT_ENCODING_ADOBE_LATIN_1 :: */
+ /* corresponds to a Latin-1 encoding as defined in a Type 1 */
+ /* Postscript font. It is limited to no more than 256 character */
+ /* codes. */
+ /* */
+ /* FT_ENCODING_ADOBE_STANDARD :: */
+ /* corresponds to the Adobe Standard encoding, as found in Type 1, */
+ /* CFF and OpenType/CFF fonts. It is limited to no more than 256 */
+ /* character codes. */
+ /* */
+ /* FT_ENCODING_ADOBE_EXPERT :: */
+ /* corresponds to the Adobe Expert encoding, as found in Type 1, */
+ /* CFF and OpenType/CFF fonts. It is limited to no more than 256 */
+ /* character codes */
+ /* */
+ /* FT_ENCODING_ADOBE_CUSTOM :: */
+ /* corresponds to a custom encoding, as found in Type 1, CFF and */
+ /* OpenType/CFF fonts. It is limited to no more than 256 character */
+ /* codes */
+ /* */
+ /* FT_ENCODING_APPLE_ROMAN :: */
+ /* corresponds to the 8-bit Apple roman encoding. Many TrueType and */
+ /* OpenType fonts contain a charmap for this encoding, since it */
+ /* older versions of Mac OS are able to use it. */
+ /* */
+ /* FT_ENCODING_OLD_LATIN_2 :: */
+ /* this value is deprecated and was never used nor reported by */
+ /* FreeType. Don't use or test for it. */
+ /* */
+ /* <Note> */
+ /* By default, FreeType automatically synthetizes a Unicode charmap */
+ /* for Postscript fonts, using their glyph names dictionaries. */
+ /* However, it will also report the encodings defined explicitely */
+ /* in the font file, for the cases when they're needed, with the */
+ /* Adobe values as well */
+ /* */
+
typedef enum FT_Encoding_
{
- FT_ENC_TAG( ft_encoding_none, 0, 0, 0, 0 ),
+ FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
+
+ FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
+ FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
+
+ FT_ENC_TAG( FT_ENCODING_MS_SJIS, 's', 'j', 'i', 's' ),
+ FT_ENC_TAG( FT_ENCODING_MS_GB2312, 'g', 'b', ' ', ' ' ),
+ FT_ENC_TAG( FT_ENCODING_MS_BIG5, 'b', 'i', 'g', '5' ),
+ FT_ENC_TAG( FT_ENCODING_MS_WANSUNG, 'w', 'a', 'n', 's' ),
+ FT_ENC_TAG( FT_ENCODING_MS_JOHAB, 'j', 'o', 'h', 'a' ),
- FT_ENC_TAG( ft_encoding_symbol, 's', 'y', 'm', 'b' ),
- FT_ENC_TAG( ft_encoding_unicode, 'u', 'n', 'i', 'c' ),
- FT_ENC_TAG( ft_encoding_latin_1, 'l', 'a', 't', '1' ),
- FT_ENC_TAG( ft_encoding_latin_2, 'l', 'a', 't', '2' ),
- FT_ENC_TAG( ft_encoding_sjis, 's', 'j', 'i', 's' ),
- FT_ENC_TAG( ft_encoding_gb2312, 'g', 'b', ' ', ' ' ),
- FT_ENC_TAG( ft_encoding_big5, 'b', 'i', 'g', '5' ),
- FT_ENC_TAG( ft_encoding_wansung, 'w', 'a', 'n', 's' ),
- FT_ENC_TAG( ft_encoding_johab, 'j', 'o', 'h', 'a' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ),
- FT_ENC_TAG( ft_encoding_adobe_standard, 'A', 'D', 'O', 'B' ),
- FT_ENC_TAG( ft_encoding_adobe_expert, 'A', 'D', 'B', 'E' ),
- FT_ENC_TAG( ft_encoding_adobe_custom, 'A', 'D', 'B', 'C' ),
+ FT_ENC_TAG( FT_ENCODING_LATIN_2, 'l', 'a', 't', '2' ),
- FT_ENC_TAG( ft_encoding_apple_roman, 'a', 'r', 'm', 'n' )
+ FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
} FT_Encoding;
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* ft_encoding_xxx */
+ /* */
+ /* <Description> */
+ /* These constants are deprecated, use the corresponding @FT_Encoding */
+ /* values instead. */
+ /* */
+ /* <Values> */
+ /* ft_encoding_none :: see @FT_ENCODING_NONE */
+ /* ft_encoding_unicode :: see @FT_ENCODING_UNICODE */
+ /* ft_encoding_latin_2 :: see @FT_ENCODING_LATIN_2 */
+ /* ft_encoding_symbol :: see @FT_ENCODING_MS_SYMBOL */
+ /* ft_encoding_sjis :: see @FT_ENCODING_MS_SJIS */
+ /* ft_encoding_gb2312 :: see @FT_ENCODING_MS_GB2312 */
+ /* ft_encoding_big5 :: see @FT_ENCODING_MS_BIG5 */
+ /* ft_encoding_wansung :: see @FT_ENCODING_MS_WANSUNG */
+ /* ft_encoding_johab :: see @FT_ENCODING_MS_JOHAB */
+ /* */
+ /* ft_encoding_adobe_standard :: see @FT_ENCODING_ADOBE_STANDARD */
+ /* ft_encoding_adobe_expert :: see @FT_ENCODING_ADOBE_EXPERT */
+ /* ft_encoding_adobe_custom :: see @FT_ENCODING_ADOBE_CUSTOM */
+ /* ft_encoding_latin_1 :: see @FT_ENCODING_ADOBE_LATIN_1 */
+ /* */
+ /* ft_encoding_apple_roman :: see @FT_ENCODING_APPLE_ROMAN */
+ /* */
+#define ft_encoding_none FT_ENCODING_NONE
+#define ft_encoding_unicode FT_ENCODING_UNICODE
+#define ft_encoding_symbol FT_ENCODING_SYMBOL
+#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
+#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
+#define ft_encoding_sjis FT_ENCODING_MS_SJIS
+#define ft_encoding_gb2312 FT_ENCODING_MS_GB2312
+#define ft_encoding_big5 FT_ENCODING_MS_BIG5
+#define ft_encoding_wansung FT_ENCODING_MS_WANSUNG
+#define ft_encoding_johab FT_ENCODING_MS_JOHAB
+
+#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
+#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
+#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
+#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
/*************************************************************************/
/* */
@@ -536,11 +664,11 @@ FT_BEGIN_HEADER
/* */
/* face_flags :: A set of bit flags that give important */
/* information about the face; see the */
- /* FT_FACE_FLAG_XXX constants for details. */
+ /* @FT_FACE_FLAG_XXX constants for details. */
/* */
/* style_flags :: A set of bit flags indicating the style of */
/* the face (i.e., italic, bold, underline, */
- /* etc). */
+ /* etc). See the @FT_STYLE_FLAG_XXX constants */
/* */
/* num_glyphs :: The total number of glyphs in the face. */
/* */
@@ -725,156 +853,78 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* <Constant> */
- /* FT_FACE_FLAG_SCALABLE */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face provides */
- /* vectorial outlines (i.e., TrueType or Type1). This doesn't */
- /* prevent embedding of bitmap strikes though, i.e., a given face can */
- /* have both this bit set, and a `num_fixed_sizes' property > 0. */
- /* */
-#define FT_FACE_FLAG_SCALABLE 1
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_FIXED_SIZES */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* `fixed sizes', i.e., bitmap strikes for some given pixel sizes. */
- /* See the `num_fixed_sizes' and `available_sizes' face properties */
- /* for more information. */
- /* */
-#define FT_FACE_FLAG_FIXED_SIZES 2
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_FIXED_WIDTH */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* fixed-width characters (like Courier, Lucida, MonoType, etc.). */
- /* */
-#define FT_FACE_FLAG_FIXED_WIDTH 4
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_SFNT */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face uses the */
- /* `sfnt' storage fomat. For now, this means TrueType or OpenType. */
- /* */
-#define FT_FACE_FLAG_SFNT 8
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_HORIZONTAL */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* horizontal glyph metrics. This should be set for all common */
- /* formats, but who knows. */
- /* */
-#define FT_FACE_FLAG_HORIZONTAL 0x10
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_VERTICAL */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* vertical glyph metrics. If not set, the glyph loader will */
- /* synthetize vertical metrics itself to help display vertical text */
- /* correctly. */
- /* */
-#define FT_FACE_FLAG_VERTICAL 0x20
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_KERNING */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face contains */
- /* kerning information. When set, this information can be retrieved */
- /* through the function @FT_Get_Kerning. Note that if unset, this */
- /* function will always return the kerning vector (0,0). */
- /* */
-#define FT_FACE_FLAG_KERNING 0x40
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_FAST_GLYPHS */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that the glyphs in a given */
- /* font can be retrieved very quickly, and that a glyph cache is thus */
- /* not necessary for any of its child size objects. */
- /* */
- /* This flag should really be set for fixed-size formats like FNT, */
- /* where each glyph bitmap is available directly in binary form */
- /* without any kind of compression. */
- /* */
- /* <Note> */
- /* This bit flag is deprecated, because even if the bitmaps are */
- /* available directly in the font file, the glyph sub-system is very */
- /* likely to be faster anyway. */
- /* */
-#define FT_FACE_FLAG_FAST_GLYPHS 0x80
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_MULTIPLE_MASTERS */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that the font contains */
- /* multiple masters and is capable of interpolating between them. */
- /* See the multiple-masters specific API for more details. */
- /* */
-#define FT_FACE_FLAG_MULTIPLE_MASTERS 0x100
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_GLYPH_NAMES */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that the font contains */
- /* glyph names that can be retrieved through @FT_Get_Glyph_Name. */
- /* */
-#define FT_FACE_FLAG_GLYPH_NAMES 0x200
-
-
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_FACE_FLAG_EXTERNAL_STREAM */
- /* */
- /* <Description> */
- /* This bit field is used internally by FreeType to indicate that */
- /* a face's stream was provided by the client application and should */
- /* not be destroyed by @FT_Done_Face. */
- /* */
-#define FT_FACE_FLAG_EXTERNAL_STREAM 0x4000
-
+ /* <Enum> */
+ /* FT_FACE_FLAG_XXX */
+ /* */
+ /* <Description> */
+ /* A list of bit flags used in the 'face_flags' field of the */
+ /* @FT_FaceRec structure. They inform client applications of */
+ /* properties of the corresponding face. */
+ /* */
+ /* <Values> */
+ /* FT_FACE_FLAG_SCALABLE :: */
+ /* indicates that the face provides vectorial outlines. This doesn't */
+ /* prevent embedded bitmaps. I.e. a face can have both this bit and */
+ /* @FT_FACE_FLAG_FIXED_SIZES set */
+ /* */
+ /* FT_FACE_FLAG_FIXED_SIZES :: */
+ /* indicates that the face contains 'fixed sizes', i.e. bitmap */
+ /* strikes for some given pixel sizes. See the 'num_fixed_sizes' */
+ /* and 'available_sizes' fields of @FT_FaceRec */
+ /* */
+ /* FT_FACE_FLAG_FIXED_WIDTH :: */
+ /* indicates that the face contains fixed-width characters (like */
+ /* Courier, Lucido, MonoType, etc..) */
+ /* */
+ /* FT_FACE_FLAG_SFNT :: */
+ /* indicates that the face uses the 'sfnt' storage scheme. For */
+ /* now, this means TrueType and OpenType */
+ /* */
+ /* FT_FACE_FLAG_HORIZONTAL :: */
+ /* indicates that the face contains horizontal glyph metrics. */
+ /* This should be set for all common formats */
+ /* */
+ /* FT_FACE_FLAG_VERTICAL :: */
+ /* indicates that the face contains vertical glyph metrics. This */
+ /* is only available in some formats, not all of them */
+ /* */
+ /* FT_FACE_FLAG_KERNING :: */
+ /* indicates that the face contains kerning information. When set, */
+ /* the kerning idstance can be retrieved through the function */
+ /* FT_Get_Kerning. Note that if unset, this function will always */
+ /* return the vector (0,0) */
+ /* */
+ /* FT_FACE_FLAG_FAST_GLYPHS :: */
+ /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT */
+ /* */
+ /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */
+ /* indicates that the font contains multiple masters and is capable */
+ /* of interpolating between them. See the multiple-masters specific */
+ /* API for details */
+ /* */
+ /* FT_FACE_FLAG_GLYPH_NAMES :: */
+ /* indicates that the font contains glyph names that can be */
+ /* retrieved through @FT_Get_Glyph_Names. Note that some TrueType */
+ /* fonts contain broken glyph name tables. Use the function */
+ /* use @FT_Has_PS_Glyph_Name when needed. */
+ /* */
+ /* FT_FACE_FLAG_EXTERNAL_STREAM :: */
+ /* used internally by FreeType to indicate that a face's stream */
+ /* was provided by the client application and should not be */
+ /* destroyed when @FT_Done_Face is called. Don't read or test */
+ /* this flag. */
+ /* */
+#define FT_FACE_FLAG_SCALABLE (1L << 0)
+#define FT_FACE_FLAG_FIXED_SIZES (1L << 1)
+#define FT_FACE_FLAG_FIXED_WIDTH (1L << 2)
+#define FT_FACE_FLAG_SFNT (1L << 3)
+#define FT_FACE_FLAG_HORIZONTAL (1L << 4)
+#define FT_FACE_FLAG_VERTICAL (1L << 5)
+#define FT_FACE_FLAG_KERNING (1L << 6)
+#define FT_FACE_FLAG_FAST_GLYPHS (1L << 7)
+#define FT_FACE_FLAG_MULTIPLE_MASTERS (1L << 8)
+#define FT_FACE_FLAG_GLYPH_NAMES (1L << 9)
+#define FT_FACE_FLAG_EXTERNAL_STREAM (1L << 10)
/* */
@@ -1025,28 +1075,26 @@ FT_BEGIN_HEADER
( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
- /*************************************************************************/
- /* */
- /* <Constant> */
- /* FT_STYLE_FLAG_ITALIC */
- /* */
- /* <Description> */
- /* A bit-field constant, used to indicate that a given face is */
- /* italicized. */
- /* */
-#define FT_STYLE_FLAG_ITALIC 1
/*************************************************************************/
/* */
/* <Constant> */
- /* FT_STYLE_FLAG_BOLD */
+ /* FT_STYLE_FLAG_XXX */
/* */
/* <Description> */
- /* A bit-field constant, used to indicate that a given face is */
- /* emboldened. */
+ /* A list of bit-flags used to indicate the style of a given face. */
+ /* These are used in the 'style_flags' field of @FT_FaceRec */
/* */
-#define FT_STYLE_FLAG_BOLD 2
+ /* <Values> */
+ /* FT_STYLE_FLAG_ITALIC :: */
+ /* indicates that a given face is italicized */
+ /* */
+ /* FT_STYLE_FLAG_BOLD :: */
+ /* indicates that a given face is bold */
+ /* */
+#define FT_STYLE_FLAG_ITALIC (1 << 0)
+#define FT_STYLE_FLAG_BOLD (1 << 1)
/*************************************************************************/
@@ -1250,14 +1298,14 @@ FT_BEGIN_HEADER
/* */
/* format :: This field indicates the format of the image */
/* contained in the glyph slot. Typically */
- /* ft_glyph_format_bitmap, */
- /* ft_glyph_format_outline, and */
- /* ft_glyph_format_composite, but others are */
+ /* FT_GLYPH_FORMAT_BITMAP, */
+ /* FT_GLYPH_FORMAT_OUTLINE, and */
+ /* FT_GLYPH_FORMAT_COMPOSITE, but others are */
/* possible. */
/* */
/* bitmap :: This field is used as a bitmap descriptor */
/* when the slot format is */
- /* ft_glyph_format_bitmap. Note that the */
+ /* FT_GLYPH_FORMAT_BITMAP. Note that the */
/* address and content of the bitmap buffer can */
/* change between calls of @FT_Load_Glyph and a */
/* few other functions. */
@@ -1265,7 +1313,7 @@ FT_BEGIN_HEADER
/* bitmap_left :: This is the bitmap's left bearing expressed */
/* in integer pixels. Of course, this is only */
/* valid if the format is */
- /* ft_glyph_format_bitmap. */
+ /* FT_GLYPH_FORMAT_BITMAP. */
/* */
/* bitmap_top :: This is the bitmap's top bearing expressed in */
/* integer pixels. Remember that this is the */
@@ -1316,7 +1364,7 @@ FT_BEGIN_HEADER
/* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
/* to specify the position of the bitmap relative to the current pen */
/* position (e.g. coordinates [0,0] on the baseline). Of course, */
- /* `slot->format' is also changed to `ft_glyph_format_bitmap' . */
+ /* `slot->format' is also changed to `FT_GLYPH_FORMAT_BITMAP' . */
/* */
typedef struct FT_GlyphSlotRec_
{
@@ -1445,31 +1493,36 @@ FT_BEGIN_HEADER
/* `flags' field of the @FT_Open_Args structure. */
/* */
/* <Fields> */
- /* ft_open_memory :: This is a memory-based stream. */
+ /* FT_OPEN_MEMORY :: This is a memory-based stream. */
/* */
- /* ft_open_stream :: Copy the stream from the `stream' field. */
+ /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */
/* */
- /* ft_open_pathname :: Create a new input stream from a C */
+ /* FT_OPEN_PATHNAME :: Create a new input stream from a C */
/* path name. */
/* */
- /* ft_open_driver :: Use the `driver' field. */
+ /* FT_OPEN_DRIVER :: Use the `driver' field. */
/* */
- /* ft_open_params :: Use the `num_params' & `params' field. */
+ /* FT_OPEN_PARAMS :: Use the `num_params' & `params' field. */
/* */
/* <Note> */
- /* The `ft_open_memory', `ft_open_stream', and `ft_open_pathname' */
+ /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */
/* flags are mutually exclusive. */
/* */
typedef enum
{
- ft_open_memory = 1,
- ft_open_stream = 2,
- ft_open_pathname = 4,
- ft_open_driver = 8,
- ft_open_params = 16
+ FT_OPEN_MEMORY = 1,
+ FT_OPEN_STREAM = 2,
+ FT_OPEN_PATHNAME = 4,
+ FT_OPEN_DRIVER = 8,
+ FT_OPEN_PARAMS = 16
} FT_Open_Flags;
+#define FT_OPEN_MEMORY FT_OPEN_MEMORY
+#define FT_OPEN_STREAM FT_OPEN_STREAM
+#define FT_OPEN_PATHNAME FT_OPEN_PATHNAME
+#define FT_OPEN_DRIVER FT_OPEN_DRIVER
+#define FT_OPEN_PARAMS FT_OPEN_PARAMS
/*************************************************************************/
/* */
@@ -1532,19 +1585,19 @@ FT_BEGIN_HEADER
/* The stream type is determined by the contents of `flags' which */
/* are tested in the following order by @FT_Open_Face: */
/* */
- /* If the `ft_open_memory' bit is set, assume that this is a */
+ /* If the `FT_OPEN_MEMORY' bit is set, assume that this is a */
/* memory file of `memory_size' bytes,located at `memory_address'. */
/* */
- /* Otherwise, if the `ft_open_stream' bit is set, assume that a */
+ /* Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a */
/* custom input stream `stream' is used. */
/* */
- /* Otherwise, if the `ft_open_pathname' bit is set, assume that this */
+ /* Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this */
/* is a normal file and use `pathname' to open it. */
/* */
- /* If the `ft_open_driver' bit is set, @FT_Open_Face will only try to */
+ /* If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face will only try to */
/* open the file with the driver whose handler is in `driver'. */
/* */
- /* If the `ft_open_params' bit is set, the parameters given by */
+ /* If the `FT_OPEN_PARAMS' bit is set, the parameters given by */
/* `num_params' and `params' will be used. They are ignored */
/* otherwise. */
/* */
@@ -2103,7 +2156,7 @@ FT_BEGIN_HEADER
/* the glyph loader should not load composite glyph recursively. */
/* Rather, when a composite glyph is encountered, it should set */
/* the values of `num_subglyphs' and `subglyphs', as well as set */
- /* `face->glyph.format' to ft_glyph_format_composite. */
+ /* `face->glyph.format' to FT_GLYPH_FORMAT_COMPOSITE. */
/* */
/* This is for use by the auto-hinter and possibly other tools. */
/* For nearly all applications, this flags should be left unset */
@@ -2135,7 +2188,7 @@ FT_BEGIN_HEADER
/* <Description> */
/* Only used with FT_LOAD_RENDER set, it indicates that the returned */
/* glyph image should be 1-bit monochrome. This really tells the */
- /* glyph loader to use `ft_render_mode_mono' when calling */
+ /* glyph loader to use `FT_RENDER_MODE_MONO' when calling */
/* @FT_Render_Glyph. */
/* */
#define FT_LOAD_MONOCHROME 0x1000
@@ -2181,6 +2234,14 @@ FT_BEGIN_HEADER
/* */
#define FT_LOAD_NO_AUTOHINT 0x8000U
+ /* */
+#define FT_LOAD_TARGET_(x) ( (FT_Int32)((x) & 7) << 16 )
+#define FT_LOAD_TARGET_MODE(x) ((FT_Render_Mode)( ((x) >> 16) & 7 ))
+
+#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_(FT_RENDER_MODE_NORMAL)
+#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_(FT_RENDER_MODE_MONO)
+#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_(FT_RENDER_MODE_LCD)
+#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_(FT_RENDER_MODE_LCD_V)
/*************************************************************************/
/* */
@@ -2233,37 +2294,67 @@ FT_BEGIN_HEADER
/* FT_Render_Mode */
/* */
/* <Description> */
- /* An enumeration type that lists the render modes supported by the */
- /* FreeType 2 renderer(s). A renderer is in charge of converting a */
- /* glyph image into a bitmap. */
+ /* An enumeration type that lists the render modes supported by */
+ /* FreeType 2. Each mode corresponds to a specific type of scanline */
+ /* conversion performed on the outline, as well as specific */
+ /* hinting optimizations. */
/* */
/* <Fields> */
- /* ft_render_mode_normal :: This is the default render mode; it */
- /* corresponds to 8-bit anti-aliased */
- /* bitmaps, using 256 levels of gray. */
+ /* FT_RENDER_MODE_NORMAL :: */
+ /* this is the default render mode; it corresponds to 8-bit */
+ /* anti-aliased bitmaps, using 256 levels of opacity */
/* */
- /* ft_render_mode_mono :: This render mode is used to produce 1-bit */
- /* monochrome bitmaps. */
+ /* FT_RENDER_MODE_MONO :: */
+ /* this mode corresponds to 1-bit bitmaps */
/* */
- /* <Note> */
- /* There is no render mode to produce 8-bit `monochrome' bitmaps -- */
- /* you have to make the conversion yourself if you need such things */
- /* (besides, FreeType is not a graphics library). */
+ /* FT_RENDER_MODE_LCD :: */
+ /* this mode corresponds to horizontal RGB/BGR sub-pixel displays, */
+ /* like LCD-screens. It produces 8-bit bitmaps that are 3 times the */
+ /* width of the original glyph outline in pixels, and which use the */
+ /* @FT_PIXEL_MODE_LCD mode */
/* */
- /* More modes might appear later for specific display modes (e.g. TV, */
- /* LCDs, etc.). They will be supported through the simple addition */
- /* of a renderer module, with no changes to the rest of the engine. */
+ /* FT_RENDER_MODE_LCD_V :: */
+ /* this mode corresponds to vertical RGB/BGR sub-pixel displays */
+ /* (like PDA screens, rotated LCD displays, etc..). It produces */
+ /* 8-bit bitmaps that are 3 times the height of the original */
+ /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode */
+ /* */
+ /* <Note> */
+ /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are */
+ /* _not_ _filtered_ to reduce color-fringes. It's up to the caller to */
+ /* perform this pass */
/* */
typedef enum FT_Render_Mode_
{
- ft_render_mode_normal = 0,
- ft_render_mode_mono = 1
+ FT_RENDER_MODE_NORMAL = 0,
+ FT_RENDER_MODE_MONO,
+ FT_RENDER_MODE_LCD,
+ FT_RENDER_MODE_LCD_V,
+
+ FT_RENDER_MODE_MAX
} FT_Render_Mode;
/*************************************************************************/
/* */
+ /* <Enum> */
+ /* ft_render_mode_xxx */
+ /* */
+ /* <Description> */
+ /* these constats are deprecated. Use the corresponding */
+ /* @FT_Render_Mode values instead */
+ /* */
+ /* <Values> */
+ /* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */
+ /* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */
+ /* */
+#define ft_render_mode_normal FT_RENDER_MODE_NORMAL
+#define ft_render_mode_mono FT_RENDER_MODE_MONO
+
+
+ /*************************************************************************/
+ /* */
/* <Function> */
/* FT_Render_Glyph */
/* */
@@ -2299,23 +2390,56 @@ FT_BEGIN_HEADER
/* @FT_Get_Kerning. */
/* */
/* <Fields> */
- /* ft_kerning_default :: Return scaled and grid-fitted kerning */
+ /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */
/* distances (value is 0). */
/* */
- /* ft_kerning_unfitted :: Return scaled but un-grid-fitted kerning */
+ /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */
/* distances. */
/* */
- /* ft_kerning_unscaled :: Return the kerning vector in original font */
+ /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */
/* units. */
/* */
typedef enum FT_Kerning_Mode_
{
- ft_kerning_default = 0,
- ft_kerning_unfitted,
- ft_kerning_unscaled
+ FT_KERNING_DEFAULT = 0,
+ FT_KERNING_UNFITTED,
+ FT_KERNING_UNSCALED
} FT_Kerning_Mode;
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* ft_kerning_default */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_KERNING_DEFAULT */
+ /* instead. */
+ /* */
+#define ft_kerning_default FT_KERNING_DEFAULT
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* ft_kerning_unfitted */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_KERNING_UNFITTED */
+ /* instead. */
+ /* */
+#define ft_kerning_unfitted FT_KERNING_UNFITTED
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* ft_kerning_unscaled */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_KERNING_UNSCALED */
+ /* instead. */
+ /* */
+#define ft_kerning_unscaled FT_KERNING_UNSCALED
+
/*************************************************************************/
/* */
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index abf9a64..6d2ab46 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -145,7 +145,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* You can typecast FT_Glyph to FT_BitmapGlyph if you have */
- /* glyph->format == ft_glyph_format_bitmap. This lets you access */
+ /* glyph->format == FT_GLYPH_FORMAT_BITMAP. This lets you access */
/* the bitmap's contents easily. */
/* */
/* The corresponding pixel buffer is always owned by the BitmapGlyph */
@@ -189,7 +189,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* You can typecast FT_Glyph to FT_OutlineGlyph if you have */
- /* glyph->format == ft_glyph_format_outline. This lets you access */
+ /* glyph->format == FT_GLYPH_FORMAT_OUTLINE. This lets you access */
/* the outline's content easily. */
/* */
/* As the outline is extracted from a glyph slot, its coordinates are */
@@ -411,7 +411,7 @@ FT_BEGIN_HEADER
/* error = FT_Get_Glyph( face->glyph, &glyph ); */
/* */
/* // convert to a bitmap (default render mode + destroy old) */
- /* if ( glyph->format != ft_glyph_format_bitmap ) */
+ /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */
/* { */
/* error = FT_Glyph_To_Bitmap( &glyph, ft_render_mode_default, */
/* 0, 1 ); */
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index 9720218..635b499 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -115,53 +115,51 @@ FT_BEGIN_HEADER
/* future. */
/* */
/* <Fields> */
- /* ft_pixel_mode_mono :: A monochrome bitmap (1 bit/pixel). */
- /* */
- /* ft_pixel_mode_grays :: An 8-bit gray-levels bitmap. Note that the */
- /* total number of gray levels is given in the */
- /* `num_grays' field of the FT_Bitmap */
- /* structure. */
- /* */
- /* ft_pixel_mode_pal2 :: A 2-bit paletted bitmap. */
- /* Currently unused by FreeType. */
- /* */
- /* ft_pixel_mode_pal4 :: A 4-bit paletted bitmap. */
- /* Currently unused by FreeType. */
- /* */
- /* ft_pixel_mode_pal8 :: An 8-bit paletted bitmap. */
- /* Currently unused by FreeType. */
- /* */
- /* ft_pixel_mode_rgb15 :: A 15-bit RGB bitmap. Uses 5:5:5 encoding. */
- /* Currently unused by FreeType. */
- /* */
- /* ft_pixel_mode_rgb16 :: A 16-bit RGB bitmap. Uses 5:6:5 encoding. */
- /* Currently unused by FreeType. */
- /* */
- /* ft_pixel_mode_rgb24 :: A 24-bit RGB bitmap. */
- /* Currently unused by FreeType. */
- /* */
- /* ft_pixel_mode_rgb32 :: A 32-bit RGB bitmap. */
- /* Currently unused by FreeType. */
- /* */
- /* <Note> */
- /* Some anti-aliased bitmaps might be embedded in TrueType fonts */
- /* using formats pal2 or pal4, though no fonts presenting those have */
- /* been found to date. */
+ /* FT_PIXEL_MODE_MONO :: */
+ /* A monochrome bitmap, using 1 bit per pixel. Note that pixels */
+ /* are stored in most-significant order (MSB), which means that */
+ /* the left-most pixel in a byte has value 128 */
+ /* */
+ /* FT_PIXEL_MODE_GRAY :: */
+ /* An 8-bit bitmap, generally used to represent anti-aliased glyph */
+ /* images. Each pixel is stored in one byte. Note that the number */
+ /* of value "gray" levels is stored in the 'num_bytes' field of */
+ /* the @FT_Bitmap structure (it generally is 256) */
+ /* */
+ /* FT_PIXEL_MODE_GRAY2 :: */
+ /* A 2-bit/pixel bitmap, used to represent embedded anti-aliased */
+ /* bitmaps in font files according to the OpenType specification. */
+ /* We haven't found a single font using this format however */
+ /* */
+ /* FT_PIXEL_MODE_GRAY4 :: */
+ /* A 4-bit/pixel bitmap, used to represent embedded anti-aliased */
+ /* bitmaps in font files according to the OpenType specification. */
+ /* We haven't found a single font using this format however */
+ /* */
+ /* */
+ /* FT_PIXEL_MODE_LCD :: */
+ /* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */
+ /* images used for display on LCD displays; the bitmap's width is */
+ /* three times wider than the original glyph image. See also */
+ /* @FT_RENDER_MODE_LCD */
+ /* */
+ /* FT_PIXEL_MODE_LCD_V :: */
+ /* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */
+ /* images used for display on rotated LCD displays; the bitmap's */
+ /* height is three times taller than the original glyph image. */
+ /* See also @FT_RENDER_MODE_LCD_V */
/* */
typedef enum FT_Pixel_Mode_
{
- ft_pixel_mode_none = 0,
- ft_pixel_mode_mono,
- ft_pixel_mode_grays,
- ft_pixel_mode_pal2,
- ft_pixel_mode_pal4,
- ft_pixel_mode_pal8,
- ft_pixel_mode_rgb15,
- ft_pixel_mode_rgb16,
- ft_pixel_mode_rgb24,
- ft_pixel_mode_rgb32,
-
- ft_pixel_mode_max /* do not remove */
+ FT_PIXEL_MODE_NONE = 0,
+ FT_PIXEL_MODE_MONO,
+ FT_PIXEL_MODE_GRAY,
+ FT_PIXEL_MODE_GRAY2,
+ FT_PIXEL_MODE_GRAY4,
+ FT_PIXEL_MODE_LCD,
+ FT_PIXEL_MODE_LCD_V,
+
+ FT_PIXEL_MODE_MAX /* do not remove */
} FT_Pixel_Mode;
@@ -169,9 +167,35 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Enum> */
+ /* ft_pixel_mode_xxx */
+ /* */
+ /* <Description> */
+ /* a list of deprecated constants. Use the corresponding */
+ /* @FT_Pixel_Mode values instead */
+ /* */
+ /* <Values> */
+ /* ft_pixel_mode_none :: see @FT_PIXEL_MODE_NONE */
+ /* ft_pixel_mode_mono :: see @FT_PIXEL_MODE_MONO */
+ /* ft_pixel_mode_grays :: see @FT_PIXEL_MODE_GRAY */
+ /* ft_pixel_mode_pal2 :: see @FT_PIXEL_MODE_GRAY2 */
+ /* ft_pixel_mode_pal4 :: see @FT_PIXEL_MODE_GRAY4 */
+ /* */
+#define ft_pixel_mode_none FT_PIXEL_MODE_NONE
+#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
+#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
+#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
+#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
+
+ /* */
+#if 0
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
/* FT_Palette_Mode */
/* */
/* <Description> */
+ /* THIS TYPE IS DEPRECATED. DO NOT USE IT !! */
+ /* */
/* An enumeration type used to describe the format of a bitmap */
/* palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
/* */
@@ -195,6 +219,8 @@ FT_BEGIN_HEADER
} FT_Palette_Mode;
+ /* */
+#endif
/*************************************************************************/
/* */
@@ -223,7 +249,7 @@ FT_BEGIN_HEADER
/* most cases. */
/* */
/* num_grays :: This field is only used with */
- /* `ft_pixel_mode_grays'; it gives the number of gray */
+ /* `FT_PIXEL_MODE_GRAY'; it gives the number of gray */
/* levels used in the bitmap. */
/* */
/* pixel_mode :: The pixel_mode, i.e., how pixel bits are stored. */
@@ -329,20 +355,20 @@ FT_BEGIN_HEADER
/* `outline_flags' field. */
/* */
/* <Fields> */
- /* ft_outline_owner :: If set, this flag indicates that the */
+ /* FT_OUTLINE_OWNER :: If set, this flag indicates that the */
/* outline's field arrays (i.e. */
/* `points', `flags' & `contours') are */
/* `owned' by the outline object, and */
/* should thus be freed when it is */
/* destroyed. */
/* */
- /* ft_outline_even_odd_fill :: By default, outlines are filled using */
+ /* FT_OUTLINE_EVEN_ODD_FILL :: By default, outlines are filled using */
/* the non-zero winding rule. If set to */
/* 1, the outline will be filled using */
/* the even-odd fill rule (only works */
/* with the smooth raster). */
/* */
- /* ft_outline_reverse_fill :: By default, outside contours of an */
+ /* FT_OUTLINE_REVERSE_FILL :: By default, outside contours of an */
/* outline are oriented in clock-wise */
/* direction, as defined in the TrueType */
/* specification. This flag is set if */
@@ -352,14 +378,14 @@ FT_BEGIN_HEADER
/* scan-converter. However, it is very */
/* important for the auto-hinter. */
/* */
- /* ft_outline_ignore_dropouts :: By default, the scan converter will */
+ /* FT_OUTLINE_IGNORE_DROPOUTS :: By default, the scan converter will */
/* try to detect drop-outs in an outline */
/* and correct the glyph bitmap to */
/* ensure consistent shape continuity. */
/* If set, this flag hints the scan-line */
/* converter to ignore such cases. */
/* */
- /* ft_outline_high_precision :: This flag indicates that the */
+ /* FT_OUTLINE_HIGH_PRECISION :: This flag indicates that the */
/* scan-line converter should try to */
/* convert this outline to bitmaps with */
/* the highest possible quality. It is */
@@ -368,7 +394,7 @@ FT_BEGIN_HEADER
/* hint, that might be completely */
/* ignored by a given scan-converter. */
/* */
- /* ft_outline_single_pass :: This flag is set to force a given */
+ /* FT_OUTLINE_SINGLE_PASS :: This flag is set to force a given */
/* scan-converter to only use a single */
/* pass over the outline to render a */
/* bitmap glyph image. Normally, it is */
@@ -379,35 +405,117 @@ FT_BEGIN_HEADER
/* */
typedef enum FT_Outline_Flags_
{
- ft_outline_none = 0,
- ft_outline_owner = 1,
- ft_outline_even_odd_fill = 2,
- ft_outline_reverse_fill = 4,
- ft_outline_ignore_dropouts = 8,
- ft_outline_high_precision = 256,
- ft_outline_single_pass = 512
+ FT_OUTLINE_NONE = 0,
+ FT_OUTLINE_OWNER = 1,
+ FT_OUTLINE_EVEN_ODD_FILL = 2,
+ FT_OUTLINE_REVERSE_FILL = 4,
+ FT_OUTLINE_IGNORE_DROPOUTS = 8,
+ FT_OUTLINE_HIGH_PRECISION = 256,
+ FT_OUTLINE_SINGLE_PASS = 512
} FT_Outline_Flags;
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_NONE */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_NONE */
+ /* instead. */
+ /* */
+#define zft_outline_none FT_OUTLINE_NONE
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_OWNER */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_OWNER */
+ /* instead. */
+ /* */
+#define zft_outline_owner FT_OUTLINE_OWNER
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* ft_outline_even_odd_fill */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_EVEN_ODD_FILL */
+ /* instead. */
+ /* */
+#define zft_outline_even_off_fill FT_OUTLINE_EVEN_ODD_FILL
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_REVERSE_FILL */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_REVERSE_FILL */
+ /* instead. */
+ /* */
+#define zft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_IGNORE_DROPOUTS */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_IGNORE_DROPOUTS */
+ /* instead. */
+ /* */
+#define zft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_HIGH_PRECISION */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_HIGH_PRECISION */
+ /* instead. */
+ /* */
+#define zft_outline_high_precision FT_OUTLINE_HIGH_PRECISION
+
+ /*************************************************************************/
+ /* */
+ /* <Const> */
+ /* FT_OUTLINE_SINGLE_PASS */
+ /* */
+ /* <Description> */
+ /* this constant is deprecated. Please use @FT_OUTLINE_SINGLE_PASS */
+ /* instead. */
+ /* */
+#define zft_outline_single_pass FT_OUTLINE_SINGLE_PASS
+
/* */
#define FT_CURVE_TAG( flag ) ( flag & 3 )
-#define FT_Curve_Tag_On 1
-#define FT_Curve_Tag_Conic 0
-#define FT_Curve_Tag_Cubic 2
+#define FT_CURVE_TAG_ON 1
+#define FT_CURVE_TAG_CONIC 0
+#define FT_CURVE_TAG_CUBIC 2
-#define FT_Curve_Tag_Touch_X 8 /* reserved for the TrueType hinter */
-#define FT_Curve_Tag_Touch_Y 16 /* reserved for the TrueType hinter */
+#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */
+#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */
-#define FT_Curve_Tag_Touch_Both ( FT_Curve_Tag_Touch_X | \
- FT_Curve_Tag_Touch_Y )
+#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \
+ FT_CURVE_TAG_TOUCH_Y )
+#define FT_Curve_Tag_On FT_CURVE_TAG_ON
+#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC
+#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC
+#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X
+#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Outline_MoveTo_Func */
+ /* FT_Outline_MoveToFunc */
/* */
/* <Description> */
/* A function pointer type used to describe the signature of a `move */
@@ -425,14 +533,15 @@ FT_BEGIN_HEADER
/* Error code. 0 means success. */
/* */
typedef int
- (*FT_Outline_MoveTo_Func)( FT_Vector* to,
- void* user );
+ (*FT_Outline_MoveToFunc)( FT_Vector* to,
+ void* user );
+#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Outline_LineTo_Func */
+ /* FT_Outline_LineToFunc */
/* */
/* <Description> */
/* A function pointer type used to describe the signature of a `line */
@@ -450,14 +559,15 @@ FT_BEGIN_HEADER
/* Error code. 0 means success. */
/* */
typedef int
- (*FT_Outline_LineTo_Func)( FT_Vector* to,
- void* user );
+ (*FT_Outline_LineToFunc)( FT_Vector* to,
+ void* user );
+#define FT_Outline_LineTo_Func FT_Outline_LineToFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Outline_ConicTo_Func */
+ /* FT_Outline_ConicToFunc */
/* */
/* <Description> */
/* A function pointer type use to describe the signature of a `conic */
@@ -479,15 +589,16 @@ FT_BEGIN_HEADER
/* Error code. 0 means success. */
/* */
typedef int
- (*FT_Outline_ConicTo_Func)( FT_Vector* control,
- FT_Vector* to,
- void* user );
+ (*FT_Outline_ConicToFunc)( FT_Vector* control,
+ FT_Vector* to,
+ void* user );
+#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Outline_CubicTo_Func */
+ /* FT_Outline_CubicToFunc */
/* */
/* <Description> */
/* A function pointer type used to describe the signature of a `cubic */
@@ -509,10 +620,12 @@ FT_BEGIN_HEADER
/* Error code. 0 means success. */
/* */
typedef int
- (*FT_Outline_CubicTo_Func)( FT_Vector* control1,
- FT_Vector* control2,
- FT_Vector* to,
- void* user );
+ (*FT_Outline_CubicToFunc)( FT_Vector* control1,
+ FT_Vector* control2,
+ FT_Vector* to,
+ void* user );
+
+#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc
/*************************************************************************/
@@ -553,13 +666,13 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Outline_Funcs_
{
- FT_Outline_MoveTo_Func move_to;
- FT_Outline_LineTo_Func line_to;
- FT_Outline_ConicTo_Func conic_to;
- FT_Outline_CubicTo_Func cubic_to;
+ FT_Outline_MoveToFunc move_to;
+ FT_Outline_LineToFunc line_to;
+ FT_Outline_ConicToFunc conic_to;
+ FT_Outline_CubicToFunc cubic_to;
- int shift;
- FT_Pos delta;
+ int shift;
+ FT_Pos delta;
} FT_Outline_Funcs;
@@ -609,36 +722,65 @@ FT_BEGIN_HEADER
/* formats, even though future font drivers will be able to register */
/* their own format. */
/* */
- /* <Fields> */
- /* ft_glyph_format_composite :: The glyph image is a composite of */
- /* several other images. This glyph */
- /* format is _only_ used with the */
- /* FT_LOAD_FLAG_NO_RECURSE flag (XXX: */
- /* Which is currently unimplemented). */
- /* */
- /* ft_glyph_format_bitmap :: The glyph image is a bitmap, and can */
- /* be described as a FT_Bitmap. */
- /* */
- /* ft_glyph_format_outline :: The glyph image is a vectorial image */
- /* made of bezier control points, and */
- /* can be described as a FT_Outline. */
- /* */
- /* ft_glyph_format_plotter :: The glyph image is a vectorial image */
- /* made of plotter lines (some T1 fonts */
- /* like Hershey contain glyph in this */
- /* format). */
+ /* <Values> */
+ /* FT_GLYPH_FORMAT_NONE :: */
+ /* the value 0 is reserved and does describe a glyph format */
+ /* */
+ /* FT_GLYPH_FORMAT_COMPOSITE :: */
+ /* the glyph image is a composite of several other images. This */
+ /* format is _only_ used with @FT_LOAD_FLAG_NO_RECURSE, and is */
+ /* used to report compound glyphs (like accented characters) */
+ /* */
+ /* FT_GLYPH_FORMAT_BITMAP :: */
+ /* the glyph image is a bitmap, and can be described as a */
+ /* @FT_Bitmap. You'll generally need to access the 'bitmap' field */
+ /* of the @FT_GlyphSlotRec structure to read it. */
+ /* */
+ /* FT_GLYPH_FORMAT_OUTLINE :: The glyph image is a vectorial image */
+ /* the glyph image is a vertorial outline made of line segments */
+ /* and bezier arcs; it can be described as a @FT_Outline and you'll */
+ /* generally want to access the 'outline' field of the */
+ /* @FT_GlyphSlotRec structure to read it. */
+ /* */
+ /* FT_GLYPH_FORMAT_PLOTTER :: */
+ /* the glyph image is a vectorial path with no inside/outside */
+ /* contours. Some Type 1 fonts, like those in the Hershy family, */
+ /* contain glyphs in this format. These are described as */
+ /* @FT_Outline, but FreeType isn't currently capable of rendering */
+ /* them correctly. */
/* */
typedef enum FT_Glyph_Format_
{
- FT_IMAGE_TAG( ft_glyph_format_none, 0, 0, 0, 0 ),
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
- FT_IMAGE_TAG( ft_glyph_format_composite, 'c', 'o', 'm', 'p' ),
- FT_IMAGE_TAG( ft_glyph_format_bitmap, 'b', 'i', 't', 's' ),
- FT_IMAGE_TAG( ft_glyph_format_outline, 'o', 'u', 't', 'l' ),
- FT_IMAGE_TAG( ft_glyph_format_plotter, 'p', 'l', 'o', 't' )
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ),
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ),
+ FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' )
} FT_Glyph_Format;
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* ft_glyph_format_xxx */
+ /* */
+ /* <Description> */
+ /* A list of decprecated constants. Use the corresponding */
+ /* @FT_Glyph_Format values instead. */
+ /* */
+ /* <Values> */
+ /* ft_glyph_format_none :: see @FT_GLYPH_FORMAT_NONE */
+ /* ft_glyph_format_composite :: see @FT_GLYPH_FORMAT_COMPOSITE */
+ /* ft_glyph_format_bitmap :: see @FT_GLYPH_FORMAT_BITMAP */
+ /* ft_glyph_format_outline :: see @FT_GLYPH_FORMAT_OUTLINE */
+ /* ft_glyph_format_plotter :: see @FT_GLYPH_FORMAT_PLOTTER */
+ /* */
+#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
+#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
+#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
+#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE
+#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER
/*************************************************************************/
/*************************************************************************/
@@ -712,7 +854,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* This structure is used by the span drawing callback type named */
- /* FT_Raster_Span_Func(), which takes the y-coordinate of the span as */
+ /* FT_SpanFunc which takes the y-coordinate of the span as */
/* a parameter. */
/* */
/* The coverage value is always between 0 and 255, even if the number */
@@ -730,7 +872,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Span_Func */
+ /* FT_SpanFunc */
/* */
/* <Description> */
/* A function used as a call-back by the anti-aliased renderer in */
@@ -764,11 +906,12 @@ FT_BEGIN_HEADER
/* only for those scanlines that do have `gray' pixels on them. */
/* */
typedef void
- (*FT_Raster_Span_Func)( int y,
- int count,
- FT_Span* spans,
- void* user );
+ (*FT_SpanFunc)( int y,
+ int count,
+ FT_Span* spans,
+ void* user );
+#define FT_Raster_Span_Func FT_SpanFunc
/*************************************************************************/
/* */
@@ -776,6 +919,8 @@ FT_BEGIN_HEADER
/* FT_Raster_BitTest_Func */
/* */
/* <Description> */
+ /* THIS TYPE IS DEPRECATED. DO NOT USE IT */
+ /* */
/* A function used as a call-back by the monochrome scan-converter */
/* to test whether a given target pixel is already set to the drawing */
/* `color'. These tests are crucial to implement drop-out control */
@@ -803,6 +948,8 @@ FT_BEGIN_HEADER
/* FT_Raster_BitSet_Func */
/* */
/* <Description> */
+ /* THIS TYPE IS DEPRECATED. DO NOT USE IT */
+ /* */
/* A function used as a call-back by the monochrome scan-converter */
/* to set an individual target pixel. This is crucial to implement */
/* drop-out control according to the TrueType specification. */
@@ -822,7 +969,6 @@ FT_BEGIN_HEADER
int x,
void* user );
-
/*************************************************************************/
/* */
/* <Enum> */
@@ -833,14 +979,14 @@ FT_BEGIN_HEADER
/* of a FT_Raster_Params structure. */
/* */
/* <Fields> */
- /* ft_raster_flag_default :: This value is 0. */
+ /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */
/* */
- /* ft_raster_flag_aa :: This flag is set to indicate that an */
+ /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */
/* anti-aliased glyph image should be */
/* generated. Otherwise, it will be */
/* monochrome (1-bit) */
/* */
- /* ft_raster_flag_direct :: This flag is set to indicate direct */
+ /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */
/* rendering. In this mode, client */
/* applications must provide their own span */
/* callback. This lets them directly */
@@ -852,7 +998,7 @@ FT_BEGIN_HEADER
/* Note that for now, direct rendering is */
/* only possible with anti-aliased glyphs. */
/* */
- /* ft_raster_flag_clip :: This flag is only used in direct */
+ /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
/* rendering mode. If set, the output will */
/* be clipped to a box specified in the */
/* "clip_box" field of the FT_Raster_Params */
@@ -865,13 +1011,18 @@ FT_BEGIN_HEADER
/* */
typedef enum
{
- ft_raster_flag_default = 0,
- ft_raster_flag_aa = 1,
- ft_raster_flag_direct = 2,
- ft_raster_flag_clip = 4
+ FT_RASTER_FLAG_DEFAULT = 0,
+ FT_RASTER_FLAG_AA = 1,
+ FT_RASTER_FLAG_DIRECT = 2,
+ FT_RASTER_FLAG_CLIP = 4
} FT_Raster_Flag;
+#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
+#define ft_raster_flag_aa FT_RASTER_FLAG_AA
+#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
+#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP
+
/*************************************************************************/
/* */
@@ -894,9 +1045,9 @@ FT_BEGIN_HEADER
/* */
/* black_spans :: The black span drawing callback. */
/* */
- /* bit_test :: The bit test callback. */
+ /* bit_test :: The bit test callback. UNIMPLEMENTED !! */
/* */
- /* bit_set :: The bit set callback. */
+ /* bit_set :: The bit set callback. UNIMPLEMENTED !! */
/* */
/* user :: User-supplied data that is passed to each drawing */
/* callback. */
@@ -907,11 +1058,11 @@ FT_BEGIN_HEADER
/* 26.6 fixed-point units). */
/* */
/* <Note> */
- /* An anti-aliased glyph bitmap is drawn if the ft_raster_flag_aa bit */
+ /* An anti-aliased glyph bitmap is drawn if the FT_RASTER_FLAG_AA bit */
/* flag is set in the `flags' field, otherwise a monochrome bitmap */
/* will be generated. */
/* */
- /* If the ft_raster_flag_direct bit flag is set in `flags', the */
+ /* If the FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
/* raster will call the `gray_spans' callback to draw gray pixel */
/* spans, in the case of an aa glyph bitmap, it will call */
/* `black_spans', and `bit_test' and `bit_set' in the case of a */
@@ -928,10 +1079,10 @@ FT_BEGIN_HEADER
FT_Bitmap* target;
void* source;
int flags;
- FT_Raster_Span_Func gray_spans;
- FT_Raster_Span_Func black_spans;
- FT_Raster_BitTest_Func bit_test;
- FT_Raster_BitSet_Func bit_set;
+ FT_SpanFunc gray_spans;
+ FT_SpanFunc black_spans;
+ FT_Raster_BitTest_Func bit_test; /* doesn't work !! */
+ FT_Raster_BitSet_Func bit_set; /* doesn't work !! */
void* user;
FT_BBox clip_box;
@@ -941,7 +1092,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_New_Func */
+ /* FT_Raster_NewFunc */
/* */
/* <Description> */
/* A function used to create a new raster object. */
@@ -963,14 +1114,15 @@ FT_BEGIN_HEADER
/* ignored by a given raster implementation. */
/* */
typedef int
- (*FT_Raster_New_Func)( void* memory,
- FT_Raster* raster );
+ (*FT_Raster_NewFunc)( void* memory,
+ FT_Raster* raster );
+#define FT_Raster_New_Func FT_Raster_NewFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Done_Func */
+ /* FT_Raster_DoneFunc */
/* */
/* <Description> */
/* A function used to destroy a given raster object. */
@@ -979,13 +1131,14 @@ FT_BEGIN_HEADER
/* raster :: A handle to the raster object. */
/* */
typedef void
- (*FT_Raster_Done_Func)( FT_Raster raster );
+ (*FT_Raster_DoneFunc)( FT_Raster raster );
+#define FT_Raster_Done_Func FT_Raster_DoneFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Reset_Func */
+ /* FT_Raster_ResetFunc */
/* */
/* <Description> */
/* FreeType provides an area of memory called the `render pool', */
@@ -1010,15 +1163,16 @@ FT_BEGIN_HEADER
/* recommended for efficiency purposes. */
/* */
typedef void
- (*FT_Raster_Reset_Func)( FT_Raster raster,
- unsigned char* pool_base,
- unsigned long pool_size );
+ (*FT_Raster_ResetFunc)( FT_Raster raster,
+ unsigned char* pool_base,
+ unsigned long pool_size );
+#define FT_Raster_Reset_Func FT_Raster_ResetFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Set_Mode_Func */
+ /* FT_Raster_SetModeFunc */
/* */
/* <Description> */
/* This function is a generic facility to change modes or attributes */
@@ -1034,15 +1188,16 @@ FT_BEGIN_HEADER
/* args :: A pointer to the new mode/property to use. */
/* */
typedef int
- (*FT_Raster_Set_Mode_Func)( FT_Raster raster,
- unsigned long mode,
- void* args );
+ (*FT_Raster_SetModeFunc)( FT_Raster raster,
+ unsigned long mode,
+ void* args );
+#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
/*************************************************************************/
/* */
/* <FuncType> */
- /* FT_Raster_Render_Func */
+ /* FT_Raster_RenderFunc */
/* */
/* <Description> */
/* Invokes a given raster to scan-convert a given glyph image into a */
@@ -1074,9 +1229,10 @@ FT_BEGIN_HEADER
/* composition). */
/* */
typedef int
- (*FT_Raster_Render_Func)( FT_Raster raster,
- FT_Raster_Params* params );
+ (*FT_Raster_RenderFunc)( FT_Raster raster,
+ FT_Raster_Params* params );
+#define FT_Raster_Render_Func FT_Raster_RenderFunc
/*************************************************************************/
/* */
@@ -1099,12 +1255,12 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Raster_Funcs_
{
- FT_Glyph_Format glyph_format;
- FT_Raster_New_Func raster_new;
- FT_Raster_Reset_Func raster_reset;
- FT_Raster_Set_Mode_Func raster_set_mode;
- FT_Raster_Render_Func raster_render;
- FT_Raster_Done_Func raster_done;
+ FT_Glyph_Format glyph_format;
+ FT_Raster_NewFunc raster_new;
+ FT_Raster_ResetFunc raster_reset;
+ FT_Raster_SetModeFunc raster_set_mode;
+ FT_Raster_RenderFunc raster_render;
+ FT_Raster_DoneFunc raster_done;
} FT_Raster_Funcs;
diff --git a/include/freetype/ftincrem.h b/include/freetype/ftincrem.h
index 19d90e2..08ce7a9 100644
--- a/include/freetype/ftincrem.h
+++ b/include/freetype/ftincrem.h
@@ -245,8 +245,8 @@ FT_BEGIN_HEADER
* parameter.data = &inc_int;
*
* // set up FT_Open_Args structure
- * open_args.flags = (FT_Open_Flags)( ft_open_pathname |
- * ft_open_params );
+ * open_args.flags = (FT_Open_Flags)( FT_OPEN_PATHNAME |
+ * FT_OPEN_PARAMS );
* open_args.pathname = my_font_pathname;
* open_args.num_params = 1;
* open_args.params = ¶meter; // we use one optional argument
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index 977a122..fdf7ed2 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -310,7 +310,7 @@ FT_BEGIN_HEADER
/* outline :: A pointer to the target outline descriptor. */
/* */
/* <Note> */
- /* This functions toggles the bit flag `ft_outline_reverse_fill' in */
+ /* This functions toggles the bit flag `FT_OUTLINE_REVERSE_FILL' in */
/* the outline's `flags' field. */
/* */
/* It shouldn't be used by a normal client application, unless it */
diff --git a/include/freetype/ftrender.h b/include/freetype/ftrender.h
index 2a0b122..f1be808 100644
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -38,65 +38,81 @@ FT_BEGIN_HEADER
/* create a new glyph object */
typedef FT_Error
- (*FT_Glyph_Init_Func)( FT_Glyph glyph,
- FT_GlyphSlot slot );
+ (*FT_Glyph_InitFunc)( FT_Glyph glyph,
+ FT_GlyphSlot slot );
/* destroys a given glyph object */
typedef void
- (*FT_Glyph_Done_Func)( FT_Glyph glyph );
+ (*FT_Glyph_DoneFunc)( FT_Glyph glyph );
typedef void
- (*FT_Glyph_Transform_Func)( FT_Glyph glyph,
- FT_Matrix* matrix,
- FT_Vector* delta );
+ (*FT_Glyph_TransformFunc)( FT_Glyph glyph,
+ FT_Matrix* matrix,
+ FT_Vector* delta );
typedef void
- (*FT_Glyph_BBox_Func)( FT_Glyph glyph,
- FT_BBox* abbox );
+ (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph,
+ FT_BBox* abbox );
typedef FT_Error
- (*FT_Glyph_Copy_Func)( FT_Glyph source,
- FT_Glyph target );
+ (*FT_Glyph_CopyFunc)( FT_Glyph source,
+ FT_Glyph target );
typedef FT_Error
- (*FT_Glyph_Prepare_Func)( FT_Glyph glyph,
- FT_GlyphSlot slot );
+ (*FT_Glyph_PrepareFunc)( FT_Glyph glyph,
+ FT_GlyphSlot slot );
+/* deprecated */
+#define FT_Glyph_Init_Func FT_Glyph_InitFunc
+#define FT_Glyph_Done_Func FT_Glyph_DoneFunc
+#define FT_Glyph_Transform_Func FT_Glyph_TransformFunc
+#define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc
+#define FT_Glyph_Copy_Func FT_Glyph_CopyFunc
+#define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc
struct FT_Glyph_Class_
{
- FT_UInt glyph_size;
- FT_Glyph_Format glyph_format;
- FT_Glyph_Init_Func glyph_init;
- FT_Glyph_Done_Func glyph_done;
- FT_Glyph_Copy_Func glyph_copy;
- FT_Glyph_Transform_Func glyph_transform;
- FT_Glyph_BBox_Func glyph_bbox;
- FT_Glyph_Prepare_Func glyph_prepare;
+ FT_UInt glyph_size;
+ FT_Glyph_Format glyph_format;
+ FT_Glyph_InitFunc glyph_init;
+ FT_Glyph_DoneFunc glyph_done;
+ FT_Glyph_CopyFunc glyph_copy;
+ FT_Glyph_TransformFunc glyph_transform;
+ FT_Glyph_GetBBoxFunc glyph_bbox;
+ FT_Glyph_PrepareFunc glyph_prepare;
};
typedef FT_Error
- (*FTRenderer_render)( FT_Renderer renderer,
- FT_GlyphSlot slot,
- FT_UInt mode,
- FT_Vector* origin );
+ (*FT_Renderer_RenderFunc)( FT_Renderer renderer,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin );
typedef FT_Error
- (*FTRenderer_transform)( FT_Renderer renderer,
- FT_GlyphSlot slot,
- FT_Matrix* matrix,
- FT_Vector* delta );
+ (*FT_Renderer_TransformFunc)( FT_Renderer renderer,
+ FT_GlyphSlot slot,
+ FT_Matrix* matrix,
+ FT_Vector* delta );
+
typedef void
- (*FTRenderer_getCBox)( FT_Renderer renderer,
- FT_GlyphSlot slot,
- FT_BBox* cbox );
+ (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer,
+ FT_GlyphSlot slot,
+ FT_BBox* cbox );
+
typedef FT_Error
- (*FTRenderer_setMode)( FT_Renderer renderer,
- FT_ULong mode_tag,
- FT_Pointer mode_ptr );
+ (*FT_Renderer_SetModeFunc)( FT_Renderer renderer,
+ FT_ULong mode_tag,
+ FT_Pointer mode_ptr );
+
+/* deprecated identifiers */
+#define FTRenderer_render FT_Renderer_RenderFunc
+#define FTRenderer_transform FT_Renderer_TransformFunc
+#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc
+#define FTRenderer_setMode FT_Renderer_SetModeFunc
+
/*************************************************************************/
@@ -117,10 +133,10 @@ FT_BEGIN_HEADER
/* */
/* set_mode :: A method used to pass additional parameters. */
/* */
- /* raster_class :: For `ft_glyph_format_outline' renderers only, this */
+ /* raster_class :: For `FT_GLYPH_FORMAT_OUTLINE' renderers only, this */
/* is a pointer to its raster's class. */
/* */
- /* raster :: For `ft_glyph_format_outline' renderers only. this */
+ /* raster :: For `FT_GLYPH_FORMAT_OUTLINE' renderers only. this */
/* is a pointer to the corresponding raster object, */
/* if any. */
/* */
@@ -130,12 +146,12 @@ FT_BEGIN_HEADER
FT_Glyph_Format glyph_format;
- FTRenderer_render render_glyph;
- FTRenderer_transform transform_glyph;
- FTRenderer_getCBox get_glyph_cbox;
- FTRenderer_setMode set_mode;
+ FT_Renderer_RenderFunc render_glyph;
+ FT_Renderer_TransformFunc transform_glyph;
+ FT_Renderer_GetCBoxFunc get_glyph_cbox;
+ FT_Renderer_SetModeFunc set_mode;
- FT_Raster_Funcs* raster_class;
+ FT_Raster_Funcs* raster_class;
} FT_Renderer_Class;
diff --git a/include/freetype/ftsysio.h b/include/freetype/ftsysio.h
index f28d0ed..5f8f8b1 100644
--- a/include/freetype/ftsysio.h
+++ b/include/freetype/ftsysio.h
@@ -93,6 +93,7 @@ FT_BEGIN_HEADER
typedef FT_Error (*FT_Stream_SeekFunc)( FT_Stream stream,
FT_ULong pos );
+
/********************************************************************
*
* @struct: FT_Stream_ClassRec
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index f6ec411..c5f3238 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -563,7 +563,7 @@ FT_BEGIN_HEADER
FT_Raster raster;
FT_Raster_Render_Func raster_render;
- FTRenderer_render render;
+ FT_Renderer_RenderFunc render;
} FT_RendererRec;
@@ -678,7 +678,7 @@ FT_BEGIN_HEADER
/* shortcut used to avoid parsing the list on */
/* each call to FT_Outline_Render(). It is a */
/* handle to the current renderer for the */
- /* ft_glyph_format_outline format. */
+ /* FT_GLYPH_FORMAT_OUTLINE format. */
/* */
/* auto_hinter :: XXX */
/* */
diff --git a/include/freetype/ttnameid.h b/include/freetype/ttnameid.h
index e0f56b8..04c6596 100644
--- a/include/freetype/ttnameid.h
+++ b/include/freetype/ttnameid.h
@@ -31,34 +31,124 @@ FT_BEGIN_HEADER
/* Possible values for the `platform' identifier code in the name */
/* records of the TTF `name' table. */
/* */
+
+/***********************************************************************
+ *
+ * @enum:
+ * TT_PLATFORM_XXX
+ *
+ * @description:
+ * a list of valie values for the 'platform_d' identifier code in
+ * @FT_CharmapRec and @FT_SfntName structures
+ *
+ * @values:
+ * TT_PLATFORM_APPLE_UNICODE ::
+ * used by Apple to indicate a Unicode character map and/or name entry.
+ * see @TT_APPLE_ID_XXX for corresponding 'encoding_id' values. Note that
+ * name entries in this format are coded as big-endian UCS-2 character
+ * codes _only_ .
+ *
+ * TT_PLATFORM_MACINTOSH ::
+ * used by Apple to indicate a MacOS-specific charmap and/or name entry.
+ * see @TT_MAC_ID_XXX for corresponding 'encoding_id' values. Note that
+ * most TrueType fonts contain an Apple roman charmap to be usable on
+ * MacOS systems (even when they contain a Microsoft charmap as well)
+ *
+ * TT_PLATFORM_ISO ::
+ * this value was used to specify Unicode charmaps. It is however
+ * now deprecated. See @TT_ISO_ID_XXX for a list of
+ * corresponding 'encoding_id' values
+ *
+ * TT_PLATFORM_MICROSOFT ::
+ * used by Microsoft to indicate Windows-specific charmaps. See
+ * @TT_MS_ID_XXX for a list of corresponding 'encoding_id' values.
+ * note that most fonts contain a Unicode charmap using
+ * ( @@TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS )
+ *
+ * TT_PLATFORM_CUSTOM ::
+ * used to indicate application-specific charmaps.
+ *
+ * TT_PLATFORM_ADOBE ::
+ * this value isn't part of any font format specification, but is used
+ * by FreeType to report Adobe-specific charmaps in a @FT_CharMapRec
+ * structure. See @TT_ADOBE_ID_XXX
+ */
#define TT_PLATFORM_APPLE_UNICODE 0
#define TT_PLATFORM_MACINTOSH 1
#define TT_PLATFORM_ISO 2 /* deprecated */
#define TT_PLATFORM_MICROSOFT 3
#define TT_PLATFORM_CUSTOM 4
-
- /* artificial values defined ad-hoc by FreeType */
-#define TT_PLATFORM_ADOBE 7
-
-
- /*************************************************************************/
- /* */
- /* Possible values of the platform specific encoding identifier field in */
- /* the name records of the TTF `name' table if the `platform' identifier */
- /* code is TT_PLATFORM_APPLE_UNICODE. */
- /* */
+#define TT_PLATFORM_ADOBE 7 /* artificial */
+
+
+/***********************************************************************
+ *
+ * @enum:
+ * TT_APPLE_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries
+ *
+ * @values:
+ * TT_APPLE_ID_DEFAULT :: Unicode 1.0
+ * TT_APPLE_ID_UNICODE_1_1 :: Unicode 1.1, specifies Hangul at U+34xx
+ * TT_APPLE_ID_ISO_10646 :: deprecated
+ * TT_APPLE_ID_UNICODE_2_0 :: Unicode 2.0 and beyond (UTF-16 BMP only)
+ * TT_APPLE_ID_UNICODE_32 :: UTF-32 (Adobe proposal for OpenType)
+ */
#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */
#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */
#define TT_APPLE_ID_ISO_10646 2 /* deprecated */
#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */
-
-
- /*************************************************************************/
- /* */
- /* Possible values of the platform specific encoding identifier field in */
- /* the name records of the TTF `name' table if the `platform' identifier */
- /* code is TT_PLATFORM_MACINTOSH. */
- /* */
+#define TT_APPLE_ID_UNICODE_32 4 /* Adobe proposal */
+
+
+/***********************************************************************
+ *
+ * @enum:
+ * TT_MAC_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_MACINTOSH charmaps and name entries
+ *
+ * @values:
+ * TT_MAC_ID_ROMAN ::
+ * TT_MAC_ID_JAPANESE ::
+ * TT_MAC_ID_TRADITIONAL_CHINESE ::
+ * TT_MAC_ID_KOREAN ::
+ * TT_MAC_ID_ARABIC ::
+ * TT_MAC_ID_HEBREW ::
+ * TT_MAC_ID_GREEK ::
+ * TT_MAC_ID_RUSSIAN ::
+ * TT_MAC_ID_RSYMBOL ::
+ * TT_MAC_ID_DEVANAGARI ::
+ * TT_MAC_ID_GURMUKHI ::
+ * TT_MAC_ID_GUJARATI ::
+ * TT_MAC_ID_ORIYA ::
+ * TT_MAC_ID_BENGALI ::
+ * TT_MAC_ID_TAMIL ::
+ * TT_MAC_ID_TELUGU ::
+ * TT_MAC_ID_KANNADA ::
+ * TT_MAC_ID_MALAYALAM ::
+ * TT_MAC_ID_SINHALESE ::
+ * TT_MAC_ID_BURMESE ::
+ * TT_MAC_ID_KHMER ::
+ * TT_MAC_ID_THAI ::
+ * TT_MAC_ID_LAOTIAN ::
+ * TT_MAC_ID_GEORGIAN ::
+ * TT_MAC_ID_ARMENIAN ::
+ * TT_MAC_ID_MALDIVIAN ::
+ * TT_MAC_ID_SIMPLIFIED_CHINESE ::
+ * TT_MAC_ID_TIBETAN ::
+ * TT_MAC_ID_MONGOLIAN ::
+ * TT_MAC_ID_GEEZ ::
+ * TT_MAC_ID_SLAVIC ::
+ * TT_MAC_ID_VIETNAMESE ::
+ * TT_MAC_ID_SINDHI ::
+ * TT_MAC_ID_UNINTERP ::
+ */
#define TT_MAC_ID_ROMAN 0
#define TT_MAC_ID_JAPANESE 1
#define TT_MAC_ID_TRADITIONAL_CHINESE 2
@@ -95,25 +185,67 @@ FT_BEGIN_HEADER
#define TT_MAC_ID_UNINTERP 32
- /*************************************************************************/
- /* */
- /* Possible values of the platform specific encoding identifier field in */
- /* the name records of the TTF `name' table if the `platform' identifier */
- /* code is TT_PLATFORM_ISO. */
- /* */
- /* This use is now deprecated. */
- /* */
+/***********************************************************************
+ *
+ * @enum:
+ * TT_ISO_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_ISO charmaps and name entries
+ *
+ * their use is now deprecated
+ *
+ * @values:
+ * TT_ISO_ID_7BIT_ASCII :: ASCII
+ * TT_ISO_ID_10646 :: ISO/10646
+ * TT_ISO_ID_8859_1 :: a.k.a. Latin-1
+ */
#define TT_ISO_ID_7BIT_ASCII 0
#define TT_ISO_ID_10646 1
#define TT_ISO_ID_8859_1 2
- /*************************************************************************/
- /* */
- /* possible values of the platform specific encoding identifier field in */
- /* the name records of the TTF `name' table if the `platform' identifier */
- /* code is TT_PLATFORM_MICROSOFT. */
- /* */
+/***********************************************************************
+ *
+ * @enum:
+ * TT_MS_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_MICROSOFT charmaps and name entries
+ *
+ * @values:
+ * TT_MS_ID_SYMBOLS_CS ::
+ * correspond to symbol encodings. see @FT_ENCODING_MS_SYMBOL
+ *
+ * TT_MS_ID_UNICODE_CS ::
+ * correspond to a Microsoft WGL4 charmap, matching Unicode. See
+ * @FT_ENCODING_UNICODE
+ *
+ * TT_MS_ID_SJIS ::
+ * corresponds to Microsoft S-JIS Japanese encoding.
+ * See @FT_ENCODING_MS_SJIS
+ *
+ * TT_MS_ID_GB2312 ::
+ * corresponds to Microsoft Simplified Chinese as used in China. See
+ * @FT_ENCODING_MS_GB2312
+ *
+ * TT_MS_ID_BIG_5 ::
+ * corresponds to Microsoft Simplified Chinese as used in Taiwan and
+ * Hong Kong. See @FT_ENCODING_MS_BIG5
+ *
+ * TT_MS_ID_WANSUNG ::
+ * corresponds to Microsoft Korean Wansung encoding. See
+ * @FT_ENCODING_MS_WANSUNG
+ *
+ * TT_MS_ID_JOHAB ::
+ * corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB
+ *
+ * TT_MS_ID_UCS_4 ::
+ * corresponds to UCS-4 or UTF-32 charmaps. This is a recent Adobe proposal
+ * for OpenType.
+ */
#define TT_MS_ID_SYMBOL_CS 0
#define TT_MS_ID_UNICODE_CS 1
#define TT_MS_ID_SJIS 2
@@ -132,6 +264,20 @@ FT_BEGIN_HEADER
/* */
/* These are artificial values defined ad-hoc by FreeType. */
/* */
+/***********************************************************************
+ *
+ * @enum:
+ * TT_ADOBE_ID_XXX
+ *
+ * @description:
+ * a list of valid values for the 'encoding_id' for
+ * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific list !!
+ *
+ * @values:
+ * TT_ADOBE_ID_STANDARD :: Adobe standard encoding
+ * TT_ADOBE_ID_EXPERT :: Adobe expert encoding
+ * TT_ADOBE_ID_CUSTOM :: Adobe custom encoding
+ */
#define TT_ADOBE_ID_STANDARD 0
#define TT_ADOBE_ID_EXPERT 1
#define TT_ADOBE_ID_CUSTOM 2
@@ -545,7 +691,7 @@ FT_BEGIN_HEADER
/* sublanguage > 0x1F. */
#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40a
#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40c
-
+
#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c
#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c
#define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845
diff --git a/src/autohint/ahglobal.c b/src/autohint/ahglobal.c
index 3924ffb..f9c3a8d 100644
--- a/src/autohint/ahglobal.c
+++ b/src/autohint/ahglobal.c
@@ -28,7 +28,7 @@
#define MAX_TEST_CHARACTERS 12
static
- const char* blue_chars[ah_blue_max] =
+ const char* blue_chars[AH_BLUE_MAX] =
{
"THEZOCQS",
"HEZLOCUS",
@@ -62,10 +62,10 @@
static FT_Error
- ah_hinter_compute_blues( AH_Hinter* hinter )
+ ah_hinter_compute_blues( AH_Hinter hinter )
{
AH_Blue blue;
- AH_Globals* globals = &hinter->globals->design;
+ AH_Globals globals = &hinter->globals->design;
FT_Pos flats [MAX_TEST_CHARACTERS];
FT_Pos rounds[MAX_TEST_CHARACTERS];
FT_Int num_flats;
@@ -84,7 +84,7 @@
charmap = face->charmap;
/* do we have a Unicode charmap in there? */
- error = FT_Select_Charmap( face, ft_encoding_unicode );
+ error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );
if ( error )
goto Exit;
@@ -95,7 +95,7 @@
AH_LOG(( "blue zones computation\n" ));
AH_LOG(( "------------------------------------------------\n" ));
- for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+ for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
{
const char* p = blue_chars[blue];
const char* limit = p + MAX_TEST_CHARACTERS;
@@ -216,8 +216,8 @@
/* now, set the `round' flag depending on the segment's kind */
round = FT_BOOL(
- FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_Curve_Tag_On ||
- FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_Curve_Tag_On );
+ FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_CURVE_TAG_ON ||
+ FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_CURVE_TAG_ON );
AH_LOG(( "%c ", round ? 'r' : 'f' ));
}
@@ -286,13 +286,13 @@
static FT_Error
- ah_hinter_compute_widths( AH_Hinter* hinter )
+ ah_hinter_compute_widths( AH_Hinter hinter )
{
/* scan the array of segments in each direction */
- AH_Outline* outline = hinter->glyph;
- AH_Segment* segments;
- AH_Segment* limit;
- AH_Globals* globals = &hinter->globals->design;
+ AH_Outline outline = hinter->glyph;
+ AH_Segment segments;
+ AH_Segment limit;
+ AH_Globals globals = &hinter->globals->design;
FT_Pos* widths;
FT_Int dimension;
FT_Int* p_num_widths;
@@ -334,8 +334,8 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Segment* seg = segments;
- AH_Segment* link;
+ AH_Segment seg = segments;
+ AH_Segment link;
FT_Int num_widths = 0;
@@ -384,7 +384,7 @@
FT_LOCAL_DEF( FT_Error )
- ah_hinter_compute_globals( AH_Hinter* hinter )
+ ah_hinter_compute_globals( AH_Hinter hinter )
{
return ah_hinter_compute_widths( hinter ) ||
ah_hinter_compute_blues ( hinter );
diff --git a/src/autohint/ahglobal.h b/src/autohint/ahglobal.h
index 6dbd711..9d557b9 100644
--- a/src/autohint/ahglobal.h
+++ b/src/autohint/ahglobal.h
@@ -32,13 +32,13 @@
FT_BEGIN_HEADER
-#define AH_IS_TOP_BLUE( b ) ( (b) == ah_blue_capital_top || \
- (b) == ah_blue_small_top )
+#define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
+ (b) == AH_BLUE_SMALL_TOP )
/* compute global metrics automatically */
FT_LOCAL( FT_Error )
- ah_hinter_compute_globals( AH_Hinter* hinter );
+ ah_hinter_compute_globals( AH_Hinter hinter );
FT_END_HEADER
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index 1268ee0..46700d2 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -32,11 +32,11 @@
#include <stdio.h>
void
- ah_dump_edges( AH_Outline* outline )
+ ah_dump_edges( AH_Outline outline )
{
- AH_Edge* edges;
- AH_Edge* edge_limit;
- AH_Segment* segments;
+ AH_Edge edges;
+ AH_Edge edge_limit;
+ AH_Segment segments;
FT_Int dimension;
@@ -46,7 +46,7 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Edge* edge;
+ AH_Edge edge;
printf ( "Table of %s edges:\n",
@@ -59,13 +59,13 @@
printf ( " [ %5d | %4d | %5s | %4d | %5d | %c | %5.2f | %5.2f ]\n",
edge - edges,
(int)edge->fpos,
- edge->dir == ah_dir_up
+ edge->dir == AH_DIR_UP
? "up"
- : ( edge->dir == ah_dir_down
+ : ( edge->dir == AH_DIR_DOWN
? "down"
- : ( edge->dir == ah_dir_left
+ : ( edge->dir == AH_DIR_LEFT
? "left"
- : ( edge->dir == ah_dir_right
+ : ( edge->dir == AH_DIR_RIGHT
? "right"
: "none" ) ) ),
edge->link ? ( edge->link - edges ) : -1,
@@ -84,11 +84,11 @@
/* A function used to dump the array of linked segments */
void
- ah_dump_segments( AH_Outline* outline )
+ ah_dump_segments( AH_Outline outline )
{
- AH_Segment* segments;
- AH_Segment* segment_limit;
- AH_Point* points;
+ AH_Segment segments;
+ AH_Segment segment_limit;
+ AH_Point points;
FT_Int dimension;
@@ -98,7 +98,7 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Segment* seg;
+ AH_Segment seg;
printf ( "Table of %s segments:\n",
@@ -111,13 +111,13 @@
printf ( " [ %5d | %4d | %5s | %4d | %5d | %4d | %5d | %5d ]\n",
seg - segments,
(int)seg->pos,
- seg->dir == ah_dir_up
+ seg->dir == AH_DIR_UP
? "up"
- : ( seg->dir == ah_dir_down
+ : ( seg->dir == AH_DIR_DOWN
? "down"
- : ( seg->dir == ah_dir_left
+ : ( seg->dir == AH_DIR_LEFT
? "left"
- : ( seg->dir == ah_dir_right
+ : ( seg->dir == AH_DIR_RIGHT
? "right"
: "none" ) ) ),
seg->link ? (seg->link-segments) : -1,
@@ -145,17 +145,17 @@
FT_Pos ay = ABS( dy );
- dir = ah_dir_none;
+ dir = AH_DIR_NONE;
/* test for vertical direction */
if ( ax * 12 < ay )
{
- dir = dy > 0 ? ah_dir_up : ah_dir_down;
+ dir = dy > 0 ? AH_DIR_UP : AH_DIR_DOWN;
}
/* test for horizontal direction */
else if ( ay * 12 < ax )
{
- dir = dx > 0 ? ah_dir_right : ah_dir_left;
+ dir = dx > 0 ? AH_DIR_RIGHT : AH_DIR_LEFT;
}
return dir;
@@ -209,7 +209,7 @@
/* Compute the orientation of path filling. It differs between TrueType */
- /* and Type1 formats. We could use the `ft_outline_reverse_fill' flag, */
+ /* and Type1 formats. We could use the `FT_OUTLINE_REVERSE_FILL' flag, */
/* but it is better to re-compute it directly (it seems that this flag */
/* isn't correctly set for some weird composite glyphs currently). */
/* */
@@ -298,14 +298,14 @@
/* ah_outline_new */
/* */
/* <Description> */
- /* Creates a new and empty AH_Outline object. */
+ /* Creates a new and empty AH_OutlineRec object. */
/* */
FT_LOCAL_DEF( FT_Error )
ah_outline_new( FT_Memory memory,
- AH_Outline** aoutline )
+ AH_Outline * aoutline )
{
FT_Error error;
- AH_Outline* outline;
+ AH_Outline outline;
if ( !FT_NEW( outline ) )
@@ -324,10 +324,10 @@
/* ah_outline_done */
/* */
/* <Description> */
- /* Destroys a given AH_Outline object. */
+ /* Destroys a given AH_OutlineRec object. */
/* */
FT_LOCAL_DEF( void )
- ah_outline_done( AH_Outline* outline )
+ ah_outline_done( AH_Outline outline )
{
FT_Memory memory = outline->memory;
@@ -347,15 +347,15 @@
/* ah_outline_save */
/* */
/* <Description> */
- /* Saves the content of a given AH_Outline object into a face's glyph */
+ /* Saves the content of a given AH_OutlineRec object into a face's glyph */
/* slot. */
/* */
FT_LOCAL_DEF( void )
- ah_outline_save( AH_Outline* outline,
+ ah_outline_save( AH_Outline outline,
AH_Loader gloader )
{
- AH_Point* point = outline->points;
- AH_Point* point_limit = point + outline->num_points;
+ AH_Point point = outline->points;
+ AH_Point point_limit = point + outline->num_points;
FT_Vector* vec = gloader->current.outline.points;
char* tag = gloader->current.outline.tags;
@@ -366,12 +366,12 @@
vec->x = point->x;
vec->y = point->y;
- if ( point->flags & ah_flag_conic )
- tag[0] = FT_Curve_Tag_Conic;
- else if ( point->flags & ah_flag_cubic )
- tag[0] = FT_Curve_Tag_Cubic;
+ if ( point->flags & AH_FLAG_CONIC )
+ tag[0] = FT_CURVE_TAG_CONIC;
+ else if ( point->flags & AH_FLAG_CUBIC )
+ tag[0] = FT_CURVE_TAG_CUBIC;
else
- tag[0] = FT_Curve_Tag_On;
+ tag[0] = FT_CURVE_TAG_ON;
}
}
@@ -382,11 +382,11 @@
/* ah_outline_load */
/* */
/* <Description> */
- /* Loads an unscaled outline from a glyph slot into an AH_Outline */
+ /* Loads an unscaled outline from a glyph slot into an AH_OutlineRec */
/* object. */
/* */
FT_LOCAL_DEF( FT_Error )
- ah_outline_load( AH_Outline* outline,
+ ah_outline_load( AH_Outline outline,
FT_Face face )
{
FT_Memory memory = outline->memory;
@@ -394,13 +394,13 @@
FT_Outline* source = &face->glyph->outline;
FT_Int num_points = source->n_points;
FT_Int num_contours = source->n_contours;
- AH_Point* points;
+ AH_Point points;
/* check arguments */
if ( !face ||
!face->size ||
- face->glyph->format != ft_glyph_format_outline )
+ face->glyph->format != FT_GLYPH_FORMAT_OUTLINE )
return AH_Err_Invalid_Argument;
/* first of all, reallocate the contours array if necessary */
@@ -450,13 +450,13 @@
/* direction used for a glyph, given that some fonts are broken (e.g. */
/* the Arphic ones). We thus recompute it each time we need to. */
/* */
- outline->vert_major_dir = ah_dir_up;
- outline->horz_major_dir = ah_dir_left;
+ outline->vert_major_dir = AH_DIR_UP;
+ outline->horz_major_dir = AH_DIR_LEFT;
if ( ah_get_orientation( source ) > 1 )
{
- outline->vert_major_dir = ah_dir_down;
- outline->horz_major_dir = ah_dir_right;
+ outline->vert_major_dir = AH_DIR_DOWN;
+ outline->horz_major_dir = AH_DIR_RIGHT;
}
outline->x_scale = face->size->metrics.x_scale;
@@ -469,8 +469,8 @@
{
/* do one thing at a time -- it is easier to understand, and */
/* the code is clearer */
- AH_Point* point;
- AH_Point* point_limit = points + outline->num_points;
+ AH_Point point;
+ AH_Point point_limit = points + outline->num_points;
/* compute coordinates */
@@ -500,10 +500,10 @@
{
switch ( FT_CURVE_TAG( *tag ) )
{
- case FT_Curve_Tag_Conic:
- point->flags = ah_flag_conic; break;
- case FT_Curve_Tag_Cubic:
- point->flags = ah_flag_cubic; break;
+ case FT_CURVE_TAG_CONIC:
+ point->flags = AH_FLAG_CONIC; break;
+ case FT_CURVE_TAG_CUBIC:
+ point->flags = AH_FLAG_CUBIC; break;
default:
;
}
@@ -513,9 +513,9 @@
/* compute `next' and `prev' */
{
FT_Int contour_index;
- AH_Point* prev;
- AH_Point* first;
- AH_Point* end;
+ AH_Point prev;
+ AH_Point first;
+ AH_Point end;
contour_index = 0;
@@ -548,8 +548,8 @@
/* set-up the contours array */
{
- AH_Point** contour = outline->contours;
- AH_Point** contour_limit = contour + outline->num_contours;
+ AH_Point * contour = outline->contours;
+ AH_Point * contour_limit = contour + outline->num_contours;
short* end = source->contours;
short idx = 0;
@@ -565,8 +565,8 @@
{
for ( point = points; point < point_limit; point++ )
{
- AH_Point* prev;
- AH_Point* next;
+ AH_Point prev;
+ AH_Point next;
FT_Vector ivec, ovec;
@@ -583,17 +583,17 @@
point->out_dir = ah_compute_direction( ovec.x, ovec.y );
#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
- if ( point->flags & (ah_flag_conic | ah_flag_cubic) )
+ if ( point->flags & (AH_FLAG_CONIC | AH_FLAG_CUBIC) )
{
Is_Weak_Point:
- point->flags |= ah_flag_weak_interpolation;
+ point->flags |= AH_FLAG_WEAK_INTERPOLATION;
}
else if ( point->out_dir == point->in_dir )
{
AH_Angle angle_in, angle_out, delta;
- if ( point->out_dir != ah_dir_none )
+ if ( point->out_dir != AH_DIR_NONE )
goto Is_Weak_Point;
angle_in = ah_angle( &ivec );
@@ -622,11 +622,11 @@
FT_LOCAL_DEF( void )
- ah_setup_uv( AH_Outline* outline,
+ ah_setup_uv( AH_Outline outline,
AH_UV source )
{
- AH_Point* point = outline->points;
- AH_Point* point_limit = point + outline->num_points;
+ AH_Point point = outline->points;
+ AH_Point point_limit = point + outline->num_points;
for ( ; point < point_limit; point++ )
@@ -636,31 +636,31 @@
switch ( source )
{
- case ah_uv_fxy:
+ case AH_UV_FXY:
u = point->fx;
v = point->fy;
break;
- case ah_uv_fyx:
+ case AH_UV_FYX:
u = point->fy;
v = point->fx;
break;
- case ah_uv_oxy:
+ case AH_UV_OXY:
u = point->ox;
v = point->oy;
break;
- case ah_uv_oyx:
+ case AH_UV_OYX:
u = point->oy;
v = point->ox;
break;
- case ah_uv_yx:
+ case AH_UV_YX:
u = point->y;
v = point->x;
break;
- case ah_uv_ox:
+ case AH_UV_OX:
u = point->x;
v = point->ox;
break;
- case ah_uv_oy:
+ case AH_UV_OY:
u = point->y;
v = point->oy;
break;
@@ -677,25 +677,25 @@
/* compute all inflex points in a given glyph */
static void
- ah_outline_compute_inflections( AH_Outline* outline )
+ ah_outline_compute_inflections( AH_Outline outline )
{
- AH_Point** contour = outline->contours;
- AH_Point** contour_limit = contour + outline->num_contours;
+ AH_Point * contour = outline->contours;
+ AH_Point * contour_limit = contour + outline->num_contours;
/* load original coordinates in (u,v) */
- ah_setup_uv( outline, ah_uv_fxy );
+ ah_setup_uv( outline, AH_UV_FXY );
/* do each contour separately */
for ( ; contour < contour_limit; contour++ )
{
FT_Vector vec;
- AH_Point* point = contour[0];
- AH_Point* first = point;
- AH_Point* start = point;
- AH_Point* end = point;
- AH_Point* before;
- AH_Point* after;
+ AH_Point point = contour[0];
+ AH_Point first = point;
+ AH_Point start = point;
+ AH_Point end = point;
+ AH_Point before;
+ AH_Point after;
AH_Angle angle_in, angle_seg, angle_out;
AH_Angle diff_in, diff_out;
FT_Int finished = 0;
@@ -770,12 +770,12 @@
do
{
- start->flags |= ah_flag_inflection;
+ start->flags |= AH_FLAG_INFLECTION;
start = start->next;
} while ( start != end );
- start->flags |= ah_flag_inflection;
+ start->flags |= AH_FLAG_INFLECTION;
}
start = end;
@@ -792,10 +792,10 @@
FT_LOCAL_DEF( void )
- ah_outline_compute_segments( AH_Outline* outline )
+ ah_outline_compute_segments( AH_Outline outline )
{
int dimension;
- AH_Segment* segments;
+ AH_Segment segments;
FT_Int* p_num_segments;
AH_Direction segment_dir;
AH_Direction major_dir;
@@ -803,22 +803,22 @@
segments = outline->horz_segments;
p_num_segments = &outline->num_hsegments;
- major_dir = ah_dir_right; /* This value must be positive! */
+ major_dir = AH_DIR_RIGHT; /* This value must be positive! */
segment_dir = major_dir;
/* set up (u,v) in each point */
- ah_setup_uv( outline, ah_uv_fyx );
+ ah_setup_uv( outline, AH_UV_FYX );
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Point** contour = outline->contours;
- AH_Point** contour_limit = contour + outline->num_contours;
- AH_Segment* segment = segments;
+ AH_Point * contour = outline->contours;
+ AH_Point * contour_limit = contour + outline->num_contours;
+ AH_Segment segment = segments;
FT_Int num_segments = 0;
#ifdef AH_HINT_METRICS
- AH_Point* min_point = 0;
- AH_Point* max_point = 0;
+ AH_Point min_point = 0;
+ AH_Point max_point = 0;
FT_Pos min_coord = 32000;
FT_Pos max_coord = -32000;
#endif
@@ -827,8 +827,8 @@
/* do each contour separately */
for ( ; contour < contour_limit; contour++ )
{
- AH_Point* point = contour[0];
- AH_Point* last = point->prev;
+ AH_Point point = contour[0];
+ AH_Point last = point->prev;
int on_edge = 0;
FT_Pos min_pos = +32000; /* minimum segment pos != min_coord */
FT_Pos max_pos = -32000; /* maximum segment pos != max_coord */
@@ -895,8 +895,8 @@
/* a segment is round if either its first or last point */
/* is a control point */
if ( ( segment->first->flags | point->flags ) &
- ah_flag_control )
- segment->flags |= ah_edge_round;
+ AH_FLAG_CONTROL )
+ segment->flags |= AH_EDGE_ROUND;
/* compute segment size */
min_pos = max_pos = point->v;
@@ -934,7 +934,7 @@
FT_ZERO( segment );
segment->dir = segment_dir;
- segment->flags = ah_edge_normal;
+ segment->flags = AH_EDGE_NORMAL;
min_pos = max_pos = point->u;
segment->first = point;
segment->last = point;
@@ -961,8 +961,8 @@
/* we do this by inserting fake segments when needed */
if ( dimension == 0 )
{
- AH_Point* point = outline->points;
- AH_Point* point_limit = point + outline->num_points;
+ AH_Point point = outline->points;
+ AH_Point point_limit = point + outline->num_points;
FT_Pos min_pos = 32000;
FT_Pos max_pos = -32000;
@@ -996,7 +996,7 @@
FT_ZERO( segment );
segment->dir = segment_dir;
- segment->flags = ah_edge_normal;
+ segment->flags = AH_EDGE_NORMAL;
segment->first = min_point;
segment->last = min_point;
segment->pos = min_pos;
@@ -1012,7 +1012,7 @@
FT_ZERO( segment );
segment->dir = segment_dir;
- segment->flags = ah_edge_normal;
+ segment->flags = AH_EDGE_NORMAL;
segment->first = max_point;
segment->last = max_point;
segment->pos = max_pos;
@@ -1026,36 +1026,36 @@
*p_num_segments = num_segments;
segments = outline->vert_segments;
- major_dir = ah_dir_up;
+ major_dir = AH_DIR_UP;
p_num_segments = &outline->num_vsegments;
- ah_setup_uv( outline, ah_uv_fxy );
+ ah_setup_uv( outline, AH_UV_FXY );
}
}
FT_LOCAL_DEF( void )
- ah_outline_link_segments( AH_Outline* outline )
+ ah_outline_link_segments( AH_Outline outline )
{
- AH_Segment* segments;
- AH_Segment* segment_limit;
+ AH_Segment segments;
+ AH_Segment segment_limit;
int dimension;
- ah_setup_uv( outline, ah_uv_fyx );
+ ah_setup_uv( outline, AH_UV_FYX );
segments = outline->horz_segments;
segment_limit = segments + outline->num_hsegments;
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Segment* seg1;
- AH_Segment* seg2;
+ AH_Segment seg1;
+ AH_Segment seg2;
/* now compare each segment to the others */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
FT_Pos best_score;
- AH_Segment* best_segment;
+ AH_Segment best_segment;
/* the fake segments are introduced to hint the metrics -- */
/* we must never link them to anything */
@@ -1105,9 +1105,9 @@
dist = seg2->pos - seg1->pos;
if ( dist < 0 )
dist = -dist;
-
+
score = dist + 3000 / len;
-
+
if ( score < best_score )
{
best_score = score;
@@ -1139,7 +1139,7 @@
}
}
- ah_setup_uv( outline, ah_uv_fxy );
+ ah_setup_uv( outline, AH_UV_FXY );
segments = outline->vert_segments;
segment_limit = segments + outline->num_vsegments;
@@ -1148,11 +1148,11 @@
static void
- ah_outline_compute_edges( AH_Outline* outline )
+ ah_outline_compute_edges( AH_Outline outline )
{
- AH_Edge* edges;
- AH_Segment* segments;
- AH_Segment* segment_limit;
+ AH_Edge edges;
+ AH_Segment segments;
+ AH_Segment segment_limit;
AH_Direction up_dir;
FT_Int* p_num_edges;
FT_Int dimension;
@@ -1164,14 +1164,14 @@
segments = outline->horz_segments;
segment_limit = segments + outline->num_hsegments;
p_num_edges = &outline->num_hedges;
- up_dir = ah_dir_right;
+ up_dir = AH_DIR_RIGHT;
scale = outline->y_scale;
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Edge* edge;
- AH_Edge* edge_limit; /* really == edge + num_edges */
- AH_Segment* seg;
+ AH_Edge edge;
+ AH_Edge edge_limit; /* really == edge + num_edges */
+ AH_Segment seg;
/*********************************************************************/
@@ -1198,7 +1198,7 @@
edge_limit = edges;
for ( seg = segments; seg < segment_limit; seg++ )
{
- AH_Edge* found = 0;
+ AH_Edge found = 0;
/* look for an edge corresponding to the segment */
@@ -1296,7 +1296,7 @@
/* check for roundness of segment */
- if ( seg->flags & ah_edge_round )
+ if ( seg->flags & AH_EDGE_ROUND )
is_round++;
else
is_straight++;
@@ -1313,8 +1313,8 @@
if ( seg->link || is_serif )
{
- AH_Edge* edge2;
- AH_Segment* seg2;
+ AH_Edge edge2;
+ AH_Segment seg2;
edge2 = edge->link;
@@ -1357,13 +1357,13 @@
} while ( seg != edge->first );
/* set the round/straight flags */
- edge->flags = ah_edge_normal;
+ edge->flags = AH_EDGE_NORMAL;
if ( is_round > 0 && is_round >= is_straight )
- edge->flags |= ah_edge_round;
+ edge->flags |= AH_EDGE_ROUND;
/* set the edge's main direction */
- edge->dir = ah_dir_none;
+ edge->dir = AH_DIR_NONE;
if ( ups > downs )
edge->dir = up_dir;
@@ -1386,7 +1386,7 @@
segments = outline->vert_segments;
segment_limit = segments + outline->num_vsegments;
p_num_edges = &outline->num_vedges;
- up_dir = ah_dir_up;
+ up_dir = AH_DIR_UP;
scale = outline->x_scale;
}
}
@@ -1398,10 +1398,10 @@
/* ah_outline_detect_features */
/* */
/* <Description> */
- /* Performs feature detection on a given AH_Outline object. */
+ /* Performs feature detection on a given AH_OutlineRec object. */
/* */
FT_LOCAL_DEF( void )
- ah_outline_detect_features( AH_Outline* outline )
+ ah_outline_detect_features( AH_Outline outline )
{
ah_outline_compute_segments ( outline );
ah_outline_link_segments ( outline );
@@ -1420,15 +1420,15 @@
/* be snapped to a blue zone edge (top or bottom). */
/* */
FT_LOCAL_DEF( void )
- ah_outline_compute_blue_edges( AH_Outline* outline,
- AH_Face_Globals* face_globals )
+ ah_outline_compute_blue_edges( AH_Outline outline,
+ AH_Face_Globals face_globals )
{
- AH_Edge* edge = outline->horz_edges;
- AH_Edge* edge_limit = edge + outline->num_hedges;
- AH_Globals* globals = &face_globals->design;
+ AH_Edge edge = outline->horz_edges;
+ AH_Edge edge_limit = edge + outline->num_hedges;
+ AH_Globals globals = &face_globals->design;
FT_Fixed y_scale = outline->y_scale;
- FT_Bool blue_active[ah_blue_max];
+ FT_Bool blue_active[AH_BLUE_MAX];
/* compute which blue zones are active, i.e. have their scaled */
@@ -1438,7 +1438,7 @@
FT_Bool check = 0;
- for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+ for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
{
FT_Pos ref, shoot, dist;
@@ -1476,7 +1476,7 @@
if ( best_dist > 64 / 4 )
best_dist = 64 / 4;
- for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+ for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
{
/* if it is a top zone, check for right edges -- if it is a bottom */
/* zone, check for left edges */
@@ -1514,7 +1514,7 @@
/* now, compare it to the overshoot position if the edge is */
/* rounded, and if the edge is over the reference position of a */
/* top zone, or under the reference position of a bottom zone */
- if ( edge->flags & ah_edge_round && dist != 0 )
+ if ( edge->flags & AH_EDGE_ROUND && dist != 0 )
{
FT_Bool is_under_ref = FT_BOOL( edge->fpos < *blue_pos );
@@ -1554,11 +1554,11 @@
/* edge' pointer from `design units' to `scaled ones'). */
/* */
FT_LOCAL_DEF( void )
- ah_outline_scale_blue_edges( AH_Outline* outline,
- AH_Face_Globals* globals )
+ ah_outline_scale_blue_edges( AH_Outline outline,
+ AH_Face_Globals globals )
{
- AH_Edge* edge = outline->horz_edges;
- AH_Edge* edge_limit = edge + outline->num_hedges;
+ AH_Edge edge = outline->horz_edges;
+ AH_Edge edge_limit = edge + outline->num_hedges;
FT_Int delta;
diff --git a/src/autohint/ahglyph.h b/src/autohint/ahglyph.h
index 8089f41..fc9941f 100644
--- a/src/autohint/ahglyph.h
+++ b/src/autohint/ahglyph.h
@@ -33,56 +33,56 @@ FT_BEGIN_HEADER
typedef enum AH_UV_
{
- ah_uv_fxy,
- ah_uv_fyx,
- ah_uv_oxy,
- ah_uv_oyx,
- ah_uv_ox,
- ah_uv_oy,
- ah_uv_yx,
- ah_uv_xy /* should always be last! */
+ AH_UV_FXY,
+ AH_UV_FYX,
+ AH_UV_OXY,
+ AH_UV_OYX,
+ AH_UV_OX,
+ AH_UV_OY,
+ AH_UV_YX,
+ AH_UV_XY /* should always be last! */
} AH_UV;
FT_LOCAL( void )
- ah_setup_uv( AH_Outline* outline,
+ ah_setup_uv( AH_Outline outline,
AH_UV source );
- /* AH_Outline functions - they should be typically called in this order */
+ /* AH_OutlineRec functions - they should be typically called in this order */
FT_LOCAL( FT_Error )
ah_outline_new( FT_Memory memory,
- AH_Outline** aoutline );
+ AH_Outline * aoutline );
FT_LOCAL( FT_Error )
- ah_outline_load( AH_Outline* outline,
+ ah_outline_load( AH_Outline outline,
FT_Face face );
FT_LOCAL( void )
- ah_outline_compute_segments( AH_Outline* outline );
+ ah_outline_compute_segments( AH_Outline outline );
FT_LOCAL( void )
- ah_outline_link_segments( AH_Outline* outline );
+ ah_outline_link_segments( AH_Outline outline );
FT_LOCAL( void )
- ah_outline_detect_features( AH_Outline* outline );
+ ah_outline_detect_features( AH_Outline outline );
FT_LOCAL( void )
- ah_outline_compute_blue_edges( AH_Outline* outline,
- AH_Face_Globals* globals );
+ ah_outline_compute_blue_edges( AH_Outline outline,
+ AH_Face_Globals globals );
FT_LOCAL( void )
- ah_outline_scale_blue_edges( AH_Outline* outline,
- AH_Face_Globals* globals );
+ ah_outline_scale_blue_edges( AH_Outline outline,
+ AH_Face_Globals globals );
FT_LOCAL( void )
- ah_outline_save( AH_Outline* outline,
+ ah_outline_save( AH_Outline outline,
AH_Loader loader );
FT_LOCAL( void )
- ah_outline_done( AH_Outline* outline );
+ ah_outline_done( AH_Outline outline );
FT_END_HEADER
diff --git a/src/autohint/ahhint.c b/src/autohint/ahhint.c
index de23d12..e9fcedb 100644
--- a/src/autohint/ahhint.c
+++ b/src/autohint/ahhint.c
@@ -27,7 +27,7 @@
#include FT_OUTLINE_H
-#define FACE_GLOBALS( face ) ((AH_Face_Globals*)(face)->autohint.data)
+#define FACE_GLOBALS( face ) ((AH_Face_Globals )(face)->autohint.data)
#define AH_USE_IUP
#define OPTIM_STEM_SNAP
@@ -90,11 +90,11 @@
/* compute the snapped width of a given stem */
static FT_Pos
- ah_compute_stem_width( AH_Hinter* hinter,
+ ah_compute_stem_width( AH_Hinter hinter,
int vertical,
FT_Pos width )
{
- AH_Globals* globals = &hinter->globals->scaled;
+ AH_Globals globals = &hinter->globals->scaled;
FT_Pos dist = width;
FT_Int sign = 0;
@@ -159,7 +159,7 @@
{
dist = ah_snap_width( globals->widths, globals->num_widths, dist );
- if ( hinter->flags & ah_hinter_monochrome )
+ if ( hinter->flags & AH_HINTER_MONOCHROME )
{
/* monochrome horizontal hinting: snap widths to integer pixels */
/* with a different threshold */
@@ -194,9 +194,9 @@
/* align one stem edge relative to the previous stem edge */
static void
- ah_align_linked_edge( AH_Hinter* hinter,
- AH_Edge* base_edge,
- AH_Edge* stem_edge,
+ ah_align_linked_edge( AH_Hinter hinter,
+ AH_Edge base_edge,
+ AH_Edge stem_edge,
int vertical )
{
FT_Pos dist = stem_edge->opos - base_edge->opos;
@@ -208,9 +208,9 @@
static void
- ah_align_serif_edge( AH_Hinter* hinter,
- AH_Edge* base,
- AH_Edge* serif,
+ ah_align_serif_edge( AH_Hinter hinter,
+ AH_Edge base,
+ AH_Edge serif,
int vertical )
{
FT_Pos dist;
@@ -231,7 +231,7 @@
dist = 32;
#else
/* do not strengthen serifs */
- if ( base->flags & ah_edge_done )
+ if ( base->flags & AH_EDGE_DONE )
{
if ( dist >= 64 )
dist = (dist+8) & -64;
@@ -260,11 +260,11 @@
/* Another alternative edge hinting algorithm */
static void
- ah_hint_edges_3( AH_Hinter* hinter )
+ ah_hint_edges_3( AH_Hinter hinter )
{
- AH_Edge* edges;
- AH_Edge* edge_limit;
- AH_Outline* outline = hinter->glyph;
+ AH_Edge edges;
+ AH_Edge edge_limit;
+ AH_Outline outline = hinter->glyph;
FT_Int dimension;
@@ -273,8 +273,8 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Edge* edge;
- AH_Edge* anchor = 0;
+ AH_Edge edge;
+ AH_Edge anchor = 0;
int has_serifs = 0;
@@ -291,10 +291,10 @@
for ( edge = edges; edge < edge_limit; edge++ )
{
FT_Pos* blue;
- AH_Edge *edge1, *edge2;
+ AH_EdgeRec *edge1, *edge2;
- if ( edge->flags & ah_edge_done )
+ if ( edge->flags & AH_EDGE_DONE )
continue;
blue = edge->blue_edge;
@@ -316,12 +316,12 @@
continue;
edge1->pos = blue[0];
- edge1->flags |= ah_edge_done;
+ edge1->flags |= AH_EDGE_DONE;
if ( edge2 && !edge2->blue_edge )
{
ah_align_linked_edge( hinter, edge1, edge2, dimension );
- edge2->flags |= ah_edge_done;
+ edge2->flags |= AH_EDGE_DONE;
}
if ( !anchor )
@@ -333,10 +333,10 @@
/* relative order of stems in the glyph.. */
for ( edge = edges; edge < edge_limit; edge++ )
{
- AH_Edge *edge2;
+ AH_EdgeRec *edge2;
- if ( edge->flags & ah_edge_done )
+ if ( edge->flags & AH_EDGE_DONE )
continue;
/* skip all non-stem edges */
@@ -359,7 +359,7 @@
#endif
ah_align_linked_edge( hinter, edge2, edge, dimension );
- edge->flags |= ah_edge_done;
+ edge->flags |= AH_EDGE_DONE;
continue;
}
@@ -374,7 +374,7 @@
edge->pos = ( edge->opos + 32 ) & -64;
anchor = edge;
- edge->flags |= ah_edge_done;
+ edge->flags |= AH_EDGE_DONE;
ah_align_linked_edge( hinter, edge, edge2, dimension );
}
@@ -403,8 +403,8 @@
edge->pos = ( delta1 <= delta2 ) ? cur_pos1 : cur_pos2;
edge2->pos = edge->pos + cur_len;
- edge->flags |= ah_edge_done;
- edge2->flags |= ah_edge_done;
+ edge->flags |= AH_EDGE_DONE;
+ edge2->flags |= AH_EDGE_DONE;
if ( edge > edges && edge->pos < edge[-1].pos )
edge->pos = edge[-1].pos;
@@ -412,7 +412,7 @@
#if 0
delta = 0;
if ( edge2 + 1 < edge_limit &&
- edge2[1].flags & ah_edge_done )
+ edge2[1].flags & AH_EDGE_DONE )
delta = edge2[1].pos - edge2->pos;
if ( delta < 0 )
@@ -421,7 +421,7 @@
if ( !min )
edge->pos += delta;
}
- edge2->flags |= ah_edge_done;
+ edge2->flags |= AH_EDGE_DONE;
#endif
}
}
@@ -434,7 +434,7 @@
/* to complete our processing */
for ( edge = edges; edge < edge_limit; edge++ )
{
- if ( edge->flags & ah_edge_done )
+ if ( edge->flags & AH_EDGE_DONE )
continue;
if ( edge->serif )
@@ -448,13 +448,13 @@
edge->pos = anchor->pos +
( ( edge->opos-anchor->opos + 32 ) & -64 );
- edge->flags |= ah_edge_done;
+ edge->flags |= AH_EDGE_DONE;
if ( edge > edges && edge->pos < edge[-1].pos )
edge->pos = edge[-1].pos;
if ( edge + 1 < edge_limit &&
- edge[1].flags & ah_edge_done &&
+ edge[1].flags & AH_EDGE_DONE &&
edge->pos > edge[1].pos )
edge->pos = edge[1].pos;
}
@@ -467,7 +467,7 @@
FT_LOCAL_DEF( void )
- ah_hinter_hint_edges( AH_Hinter* hinter,
+ ah_hinter_hint_edges( AH_Hinter hinter,
FT_Bool no_horz_edges,
FT_Bool no_vert_edges )
{
@@ -486,7 +486,7 @@
#if 0
/* outline optimizer removed temporarily */
- if ( hinter->flags & ah_hinter_optimize )
+ if ( hinter->flags & AH_HINTER_OPTIMIZE )
{
AH_Optimizer opt;
@@ -514,11 +514,11 @@
/*************************************************************************/
static void
- ah_hinter_align_edge_points( AH_Hinter* hinter )
+ ah_hinter_align_edge_points( AH_Hinter hinter )
{
- AH_Outline* outline = hinter->glyph;
- AH_Edge* edges;
- AH_Edge* edge_limit;
+ AH_Outline outline = hinter->glyph;
+ AH_Edge edges;
+ AH_Edge edge_limit;
FT_Int dimension;
@@ -527,7 +527,7 @@
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Edge* edge;
+ AH_Edge edge;
edge = edges;
@@ -535,12 +535,12 @@
{
/* move the points of each segment */
/* in each edge to the edge's position */
- AH_Segment* seg = edge->first;
+ AH_Segment seg = edge->first;
do
{
- AH_Point* point = seg->first;
+ AH_Point point = seg->first;
for (;;)
@@ -548,12 +548,12 @@
if ( dimension )
{
point->y = edge->pos;
- point->flags |= ah_flag_touch_y;
+ point->flags |= AH_FLAG_TOUCH_Y;
}
else
{
point->x = edge->pos;
- point->flags |= ah_flag_touch_x;
+ point->flags |= AH_FLAG_TOUCH_X;
}
if ( point == seg->last )
@@ -575,14 +575,14 @@
/* hint the strong points -- this is equivalent to the TrueType `IP' */
static void
- ah_hinter_align_strong_points( AH_Hinter* hinter )
+ ah_hinter_align_strong_points( AH_Hinter hinter )
{
- AH_Outline* outline = hinter->glyph;
+ AH_Outline outline = hinter->glyph;
FT_Int dimension;
- AH_Edge* edges;
- AH_Edge* edge_limit;
- AH_Point* points;
- AH_Point* point_limit;
+ AH_Edge edges;
+ AH_Edge edge_limit;
+ AH_Point points;
+ AH_Point point_limit;
AH_Flags touch_flag;
@@ -591,12 +591,12 @@
edges = outline->horz_edges;
edge_limit = edges + outline->num_hedges;
- touch_flag = ah_flag_touch_y;
+ touch_flag = AH_FLAG_TOUCH_Y;
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Point* point;
- AH_Edge* edge;
+ AH_Point point;
+ AH_Edge edge;
if ( edges < edge_limit )
@@ -612,8 +612,8 @@
#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
/* if this point is candidate to weak interpolation, we will */
/* interpolate it after all strong points have been processed */
- if ( ( point->flags & ah_flag_weak_interpolation ) &&
- !( point->flags & ah_flag_inflection ) )
+ if ( ( point->flags & AH_FLAG_WEAK_INTERPOLATION ) &&
+ !( point->flags & AH_FLAG_INFLECTION ) )
continue;
#endif
@@ -650,8 +650,8 @@
/* otherwise, interpolate the point in between */
{
- AH_Edge* before = 0;
- AH_Edge* after = 0;
+ AH_Edge before = 0;
+ AH_Edge after = 0;
for ( edge = edges; edge < edge_limit; edge++ )
@@ -697,7 +697,7 @@
edges = outline->vert_edges;
edge_limit = edges + outline->num_vedges;
- touch_flag = ah_flag_touch_x;
+ touch_flag = AH_FLAG_TOUCH_X;
}
}
@@ -705,11 +705,11 @@
#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
static void
- ah_iup_shift( AH_Point* p1,
- AH_Point* p2,
- AH_Point* ref )
+ ah_iup_shift( AH_Point p1,
+ AH_Point p2,
+ AH_Point ref )
{
- AH_Point* p;
+ AH_Point p;
FT_Pos delta = ref->u - ref->v;
@@ -722,12 +722,12 @@
static void
- ah_iup_interp( AH_Point* p1,
- AH_Point* p2,
- AH_Point* ref1,
- AH_Point* ref2 )
+ ah_iup_interp( AH_Point p1,
+ AH_Point p2,
+ AH_Point ref1,
+ AH_Point ref2 )
{
- AH_Point* p;
+ AH_Point p;
FT_Pos u;
FT_Pos v1 = ref1->v;
FT_Pos v2 = ref2->v;
@@ -791,13 +791,13 @@
/* interpolate weak points -- this is equivalent to the TrueType `IUP' */
static void
- ah_hinter_align_weak_points( AH_Hinter* hinter )
+ ah_hinter_align_weak_points( AH_Hinter hinter )
{
- AH_Outline* outline = hinter->glyph;
+ AH_Outline outline = hinter->glyph;
FT_Int dimension;
- AH_Point* points;
- AH_Point* point_limit;
- AH_Point** contour_limit;
+ AH_Point points;
+ AH_Point point_limit;
+ AH_Point * contour_limit;
AH_Flags touch_flag;
@@ -806,18 +806,18 @@
/* PASS 1: Move segment points to edge positions */
- touch_flag = ah_flag_touch_y;
+ touch_flag = AH_FLAG_TOUCH_Y;
contour_limit = outline->contours + outline->num_contours;
- ah_setup_uv( outline, ah_uv_oy );
+ ah_setup_uv( outline, AH_UV_OY );
for ( dimension = 1; dimension >= 0; dimension-- )
{
- AH_Point* point;
- AH_Point* end_point;
- AH_Point* first_point;
- AH_Point** contour;
+ AH_Point point;
+ AH_Point end_point;
+ AH_Point first_point;
+ AH_Point * contour;
point = points;
@@ -834,8 +834,8 @@
if ( point <= end_point )
{
- AH_Point* first_touched = point;
- AH_Point* cur_touched = point;
+ AH_Point first_touched = point;
+ AH_Point cur_touched = point;
point++;
@@ -880,8 +880,8 @@
for ( point = points; point < point_limit; point++ )
point->y = point->u;
- touch_flag = ah_flag_touch_x;
- ah_setup_uv( outline, ah_uv_ox );
+ touch_flag = AH_FLAG_TOUCH_X;
+ ah_setup_uv( outline, AH_UV_OX );
}
else
{
@@ -897,7 +897,7 @@
FT_LOCAL_DEF( void )
- ah_hinter_align_points( AH_Hinter* hinter )
+ ah_hinter_align_points( AH_Hinter hinter )
{
ah_hinter_align_edge_points( hinter );
@@ -924,14 +924,14 @@
/* scale and fit the global metrics */
static void
- ah_hinter_scale_globals( AH_Hinter* hinter,
+ ah_hinter_scale_globals( AH_Hinter hinter,
FT_Fixed x_scale,
FT_Fixed y_scale )
{
FT_Int n;
- AH_Face_Globals* globals = hinter->globals;
- AH_Globals* design = &globals->design;
- AH_Globals* scaled = &globals->scaled;
+ AH_Face_Globals globals = hinter->globals;
+ AH_Globals design = &globals->design;
+ AH_Globals scaled = &globals->scaled;
/* copy content */
@@ -948,7 +948,7 @@
scaled->stds[1] = ( design->num_heights > 0 ) ? scaled->heights[0] : 32000;
/* scale the blue zones */
- for ( n = 0; n < ah_blue_max; n++ )
+ for ( n = 0; n < AH_BLUE_MAX; n++ )
{
FT_Pos delta, delta2;
@@ -980,7 +980,7 @@
static void
- ah_hinter_align( AH_Hinter* hinter )
+ ah_hinter_align( AH_Hinter hinter )
{
ah_hinter_align_edge_points( hinter );
ah_hinter_align_points( hinter );
@@ -989,7 +989,7 @@
/* finalize a hinter object */
FT_LOCAL_DEF( void )
- ah_hinter_done( AH_Hinter* hinter )
+ ah_hinter_done( AH_Hinter hinter )
{
if ( hinter )
{
@@ -1013,9 +1013,9 @@
/* create a new empty hinter object */
FT_LOCAL_DEF( FT_Error )
ah_hinter_new( FT_Library library,
- AH_Hinter** ahinter )
+ AH_Hinter* ahinter )
{
- AH_Hinter* hinter = 0;
+ AH_Hinter hinter = 0;
FT_Memory memory = library->memory;
FT_Error error;
@@ -1048,13 +1048,13 @@
/* create a face's autohint globals */
FT_LOCAL_DEF( FT_Error )
- ah_hinter_new_face_globals( AH_Hinter* hinter,
+ ah_hinter_new_face_globals( AH_Hinter hinter,
FT_Face face,
- AH_Globals* globals )
+ AH_Globals globals )
{
FT_Error error;
FT_Memory memory = hinter->memory;
- AH_Face_Globals* face_globals;
+ AH_Face_Globals face_globals;
if ( FT_NEW( face_globals ) )
@@ -1080,7 +1080,7 @@
/* discard a face's autohint globals */
FT_LOCAL_DEF( void )
- ah_hinter_done_face_globals( AH_Face_Globals* globals )
+ ah_hinter_done_face_globals( AH_Face_Globals globals )
{
FT_Face face = globals->face;
FT_Memory memory = face->memory;
@@ -1091,7 +1091,7 @@
static FT_Error
- ah_hinter_load( AH_Hinter* hinter,
+ ah_hinter_load( AH_Hinter hinter,
FT_UInt glyph_index,
FT_UInt load_flags,
FT_UInt depth )
@@ -1102,7 +1102,7 @@
FT_Fixed x_scale = face->size->metrics.x_scale;
FT_Fixed y_scale = face->size->metrics.y_scale;
FT_Error error;
- AH_Outline* outline = hinter->glyph;
+ AH_Outline outline = hinter->glyph;
AH_Loader gloader = hinter->loader;
FT_Bool no_horz_hints = FT_BOOL(
( load_flags & AH_HINT_NO_HORZ_EDGES ) != 0 );
@@ -1137,7 +1137,7 @@
switch ( slot->format )
{
- case ft_glyph_format_outline:
+ case FT_GLYPH_FORMAT_OUTLINE:
/* translate glyph outline if we need to */
if ( hinter->transformed )
@@ -1208,8 +1208,8 @@
/* width/positioning that occured during the hinting process */
{
FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
- AH_Edge* edge1 = outline->vert_edges; /* leftmost edge */
- AH_Edge* edge2 = edge1 +
+ AH_Edge edge1 = outline->vert_edges; /* leftmost edge */
+ AH_Edge edge2 = edge1 +
outline->num_vedges - 1; /* rightmost edge */
@@ -1230,7 +1230,7 @@
ah_loader_add( gloader );
break;
- case ft_glyph_format_composite:
+ case FT_GLYPH_FORMAT_COMPOSITE:
{
FT_UInt nn, num_subglyphs = slot->num_subglyphs;
FT_UInt num_base_subgs, start_point;
@@ -1407,7 +1407,7 @@
goto Exit;
slot->outline = slot->internal->loader->base.outline;
- slot->format = ft_glyph_format_outline;
+ slot->format = FT_GLYPH_FORMAT_OUTLINE;
}
#ifdef DEBUG_HINTER
@@ -1421,7 +1421,7 @@
/* load and hint a given glyph */
FT_LOCAL_DEF( FT_Error )
- ah_hinter_load_glyph( AH_Hinter* hinter,
+ ah_hinter_load_glyph( AH_Hinter hinter,
FT_GlyphSlot slot,
FT_Size size,
FT_UInt glyph_index,
@@ -1431,7 +1431,7 @@
FT_Error error;
FT_Fixed x_scale = size->metrics.x_scale;
FT_Fixed y_scale = size->metrics.y_scale;
- AH_Face_Globals* face_globals = FACE_GLOBALS( face );
+ AH_Face_Globals face_globals = FACE_GLOBALS( face );
/* first of all, we need to check that we're using the correct face and */
@@ -1475,12 +1475,12 @@
/* retrieve a face's autohint globals for client applications */
FT_LOCAL_DEF( void )
- ah_hinter_get_global_hints( AH_Hinter* hinter,
+ ah_hinter_get_global_hints( AH_Hinter hinter,
FT_Face face,
void** global_hints,
long* global_len )
{
- AH_Globals* globals = 0;
+ AH_Globals globals = 0;
FT_Memory memory = hinter->memory;
FT_Error error;
@@ -1512,7 +1512,7 @@
FT_LOCAL_DEF( void )
- ah_hinter_done_global_hints( AH_Hinter* hinter,
+ ah_hinter_done_global_hints( AH_Hinter hinter,
void* global_hints )
{
FT_Memory memory = hinter->memory;
diff --git a/src/autohint/ahhint.h b/src/autohint/ahhint.h
index b0857f3..88b950f 100644
--- a/src/autohint/ahhint.h
+++ b/src/autohint/ahhint.h
@@ -39,11 +39,11 @@ FT_BEGIN_HEADER
/* create a new empty hinter object */
FT_LOCAL( FT_Error )
ah_hinter_new( FT_Library library,
- AH_Hinter** ahinter );
+ AH_Hinter* ahinter );
/* Load a hinted glyph in the hinter */
FT_LOCAL( FT_Error )
- ah_hinter_load_glyph( AH_Hinter* hinter,
+ ah_hinter_load_glyph( AH_Hinter hinter,
FT_GlyphSlot slot,
FT_Size size,
FT_UInt glyph_index,
@@ -51,20 +51,20 @@ FT_BEGIN_HEADER
/* finalize a hinter object */
FT_LOCAL( void )
- ah_hinter_done( AH_Hinter* hinter );
+ ah_hinter_done( AH_Hinter hinter );
FT_LOCAL( void )
- ah_hinter_done_face_globals( AH_Face_Globals* globals );
+ ah_hinter_done_face_globals( AH_Face_Globals globals );
FT_LOCAL( void )
- ah_hinter_get_global_hints( AH_Hinter* hinter,
+ ah_hinter_get_global_hints( AH_Hinter hinter,
FT_Face face,
void** global_hints,
long* global_len );
FT_LOCAL( void )
- ah_hinter_done_global_hints( AH_Hinter* hinter,
- void* global_hints );
+ ah_hinter_done_global_hints( AH_Hinter hinter,
+ void* global_hints );
FT_END_HEADER
diff --git a/src/autohint/ahmodule.c b/src/autohint/ahmodule.c
index 8c148af..c44e396 100644
--- a/src/autohint/ahmodule.c
+++ b/src/autohint/ahmodule.c
@@ -25,7 +25,7 @@
#ifdef DEBUG_HINTER
- AH_Hinter* ah_debug_hinter = NULL;
+ AH_Hinter ah_debug_hinter = NULL;
FT_Bool ah_debug_disable_horz = 0;
FT_Bool ah_debug_disable_vert = 0;
#endif
@@ -33,7 +33,7 @@
typedef struct FT_AutoHinterRec_
{
FT_ModuleRec root;
- AH_Hinter* hinter;
+ AH_Hinter hinter;
} FT_AutoHinterRec;
@@ -83,7 +83,7 @@
FT_UNUSED( module );
if ( face->autohint.data )
- ah_hinter_done_face_globals( (AH_Face_Globals*)(face->autohint.data) );
+ ah_hinter_done_face_globals( (AH_Face_Globals )(face->autohint.data) );
}
diff --git a/src/autohint/ahoptim.c b/src/autohint/ahoptim.c
index d06b1bf..fb2a000 100644
--- a/src/autohint/ahoptim.c
+++ b/src/autohint/ahoptim.c
@@ -157,8 +157,8 @@
static int
- valid_stem_segments( AH_Segment* seg1,
- AH_Segment* seg2 )
+ valid_stem_segments( AH_Segment seg1,
+ AH_Segment seg2 )
{
return seg1->serif == 0 &&
seg2 &&
@@ -173,13 +173,13 @@
static int
optim_compute_stems( AH_Optimizer* optimizer )
{
- AH_Outline* outline = optimizer->outline;
+ AH_Outline outline = optimizer->outline;
FT_Fixed scale;
FT_Memory memory = optimizer->memory;
FT_Error error = 0;
FT_Int dimension;
- AH_Edge* edges;
- AH_Edge* edge_limit;
+ AH_Edge edges;
+ AH_Edge edge_limit;
AH_Stem** p_stems;
FT_Int* p_num_stems;
@@ -195,13 +195,13 @@
{
AH_Stem* stems = 0;
FT_Int num_stems = 0;
- AH_Edge* edge;
+ AH_Edge edge;
/* first of all, count the number of stems in this direction */
for ( edge = edges; edge < edge_limit; edge++ )
{
- AH_Segment* seg = edge->first;
+ AH_Segment seg = edge->first;
do
@@ -226,8 +226,8 @@
stem = stems;
for ( edge = edges; edge < edge_limit; edge++ )
{
- AH_Segment* seg = edge->first;
- AH_Segment* seg2;
+ AH_Segment seg = edge->first;
+ AH_Segment seg2;
do
@@ -235,8 +235,8 @@
seg2 = seg->link;
if ( valid_stem_segments( seg, seg2 ) )
{
- AH_Edge* edge1 = seg->edge;
- AH_Edge* edge2 = seg2->edge;
+ AH_Edge edge1 = seg->edge;
+ AH_Edge edge2 = seg2->edge;
stem->edge1 = edge1;
@@ -721,8 +721,8 @@
stem->edge1->pos = pos;
stem->edge2->pos = pos + stem->width;
- stem->edge1->flags |= ah_edge_done;
- stem->edge2->flags |= ah_edge_done;
+ stem->edge1->flags |= AH_EDGE_DONE;
+ stem->edge2->flags |= AH_EDGE_DONE;
}
}
@@ -768,8 +768,8 @@
stem->edge1->pos = pos;
stem->edge2->pos = pos + stem->width;
- stem->edge1->flags |= ah_edge_done;
- stem->edge2->flags |= ah_edge_done;
+ stem->edge1->flags |= AH_EDGE_DONE;
+ stem->edge2->flags |= AH_EDGE_DONE;
}
}
@@ -808,7 +808,7 @@
/* loads the outline into the optimizer */
int
AH_Optimizer_Init( AH_Optimizer* optimizer,
- AH_Outline* outline,
+ AH_Outline outline,
FT_Memory memory )
{
FT_Error error;
diff --git a/src/autohint/ahoptim.h b/src/autohint/ahoptim.h
index c3e927d..5d79fde 100644
--- a/src/autohint/ahoptim.h
+++ b/src/autohint/ahoptim.h
@@ -45,8 +45,8 @@ FT_BEGIN_HEADER
FT_Pos min_pos; /* minimum grid position */
FT_Pos max_pos; /* maximum grid position */
- AH_Edge* edge1; /* left/bottom edge */
- AH_Edge* edge2; /* right/top edge */
+ AH_Edge edge1; /* left/bottom edge */
+ AH_Edge edge2; /* right/top edge */
FT_Pos opos; /* original position */
FT_Pos owidth; /* original width */
@@ -81,7 +81,7 @@ FT_BEGIN_HEADER
typedef struct AH_Optimizer_
{
FT_Memory memory;
- AH_Outline* outline;
+ AH_Outline outline;
FT_Int num_hstems;
AH_Stem* horz_stems;
@@ -115,7 +115,7 @@ FT_BEGIN_HEADER
/* loads the outline into the optimizer */
int
AH_Optimizer_Init( AH_Optimizer* optimizer,
- AH_Outline* outline,
+ AH_Outline outline,
FT_Memory memory );
diff --git a/src/autohint/ahtypes.h b/src/autohint/ahtypes.h
index 4c91655..de053e9 100644
--- a/src/autohint/ahtypes.h
+++ b/src/autohint/ahtypes.h
@@ -126,64 +126,64 @@ FT_BEGIN_HEADER
/* hint flags */
-#define ah_flag_none 0
+#define AH_FLAG_NONE 0
/* bezier control points flags */
-#define ah_flag_conic 1
-#define ah_flag_cubic 2
-#define ah_flag_control ( ah_flag_conic | ah_flag_cubic )
+#define AH_FLAG_CONIC 1
+#define AH_FLAG_CUBIC 2
+#define AH_FLAG_CONTROL ( AH_FLAG_CONIC | AH_FLAG_CUBIC )
/* extrema flags */
-#define ah_flag_extrema_x 4
-#define ah_flag_extrema_y 8
+#define AH_FLAG_EXTREMA_X 4
+#define AH_FLAG_EXTREMA_Y 8
/* roundness */
-#define ah_flag_round_x 16
-#define ah_flag_round_y 32
+#define AH_FLAG_ROUND_X 16
+#define AH_FLAG_ROUND_Y 32
/* touched */
-#define ah_flag_touch_x 64
-#define ah_flag_touch_y 128
+#define AH_FLAG_TOUCH_X 64
+#define AH_FLAG_TOUCH_Y 128
/* weak interpolation */
-#define ah_flag_weak_interpolation 256
-#define ah_flag_inflection 512
+#define AH_FLAG_WEAK_INTERPOLATION 256
+#define AH_FLAG_INFLECTION 512
typedef FT_Int AH_Flags;
/* edge hint flags */
-#define ah_edge_normal 0
-#define ah_edge_round 1
-#define ah_edge_serif 2
-#define ah_edge_done 4
+#define AH_EDGE_NORMAL 0
+#define AH_EDGE_ROUND 1
+#define AH_EDGE_SERIF 2
+#define AH_EDGE_DONE 4
typedef FT_Int AH_Edge_Flags;
/* hint directions -- the values are computed so that two vectors are */
/* in opposite directions iff `dir1+dir2 == 0' */
-#define ah_dir_none 4
-#define ah_dir_right 1
-#define ah_dir_left -1
-#define ah_dir_up 2
-#define ah_dir_down -2
+#define AH_DIR_NONE 4
+#define AH_DIR_RIGHT 1
+#define AH_DIR_LEFT -1
+#define AH_DIR_UP 2
+#define AH_DIR_DOWN -2
typedef FT_Int AH_Direction;
- typedef struct AH_Point AH_Point;
- typedef struct AH_Segment AH_Segment;
- typedef struct AH_Edge AH_Edge;
+ typedef struct AH_PointRec_* AH_Point;
+ typedef struct AH_SegmentRec_* AH_Segment;
+ typedef struct AH_EdgeRec_* AH_Edge;
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Point */
+ /* AH_PointRec */
/* */
/* <Description> */
- /* A structure used to model an outline point to the AH_Outline type. */
+ /* A structure used to model an outline point to the AH_OutlineRec type. */
/* */
/* <Fields> */
/* flags :: The current point hint flags. */
@@ -208,7 +208,7 @@ FT_BEGIN_HEADER
/* */
/* prev :: The previous point in same contour. */
/* */
- struct AH_Point
+ typedef struct AH_PointRec_
{
AH_Flags flags; /* point flags used by hinter */
FT_Pos ox, oy;
@@ -222,15 +222,16 @@ FT_BEGIN_HEADER
AH_Angle in_angle;
AH_Angle out_angle;
- AH_Point* next; /* next point in contour */
- AH_Point* prev; /* previous point in contour */
- };
+ AH_Point next; /* next point in contour */
+ AH_Point prev; /* previous point in contour */
+
+ } AH_PointRec;
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Segment */
+ /* AH_SegmentRec */
/* */
/* <Description> */
/* A structure used to describe an edge segment to the auto-hinter. */
@@ -265,33 +266,34 @@ FT_BEGIN_HEADER
/* */
/* score :: Used to score the segment when selecting them. */
/* */
- struct AH_Segment
+ typedef struct AH_SegmentRec_
{
AH_Edge_Flags flags;
AH_Direction dir;
- AH_Point* first; /* first point in edge segment */
- AH_Point* last; /* last point in edge segment */
- AH_Point** contour; /* ptr to first point of segment's contour */
+ AH_Point first; /* first point in edge segment */
+ AH_Point last; /* last point in edge segment */
+ AH_Point * contour; /* ptr to first point of segment's contour */
FT_Pos pos; /* position of segment */
FT_Pos min_coord; /* minimum coordinate of segment */
FT_Pos max_coord; /* maximum coordinate of segment */
- AH_Edge* edge;
- AH_Segment* edge_next;
+ AH_Edge edge;
+ AH_Segment edge_next;
- AH_Segment* link; /* link segment */
- AH_Segment* serif; /* primary segment for serifs */
+ AH_Segment link; /* link segment */
+ AH_Segment serif; /* primary segment for serifs */
FT_Pos num_linked; /* number of linked segments */
FT_Int score;
- };
+
+ } AH_SegmentRec;
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Edge */
+ /* AH_EdgeRec */
/* */
/* <Description> */
/* A structure used to describe an edge, which really is a horizontal */
@@ -325,29 +327,30 @@ FT_BEGIN_HEADER
/* Only set for some of the horizontal edges in a Latin */
/* font. */
/* */
- struct AH_Edge
+ typedef struct AH_EdgeRec_
{
AH_Edge_Flags flags;
AH_Direction dir;
- AH_Segment* first;
- AH_Segment* last;
+ AH_Segment first;
+ AH_Segment last;
FT_Pos fpos;
FT_Pos opos;
FT_Pos pos;
- AH_Edge* link;
- AH_Edge* serif;
+ AH_Edge link;
+ AH_Edge serif;
FT_Int num_linked;
FT_Int score;
FT_Pos* blue_edge;
- };
+
+ } AH_EdgeRec;
/* an outline as seen by the hinter */
- typedef struct AH_Outline_
+ typedef struct AH_OutlineRec_
{
FT_Memory memory;
@@ -360,39 +363,39 @@ FT_BEGIN_HEADER
FT_Int max_points;
FT_Int num_points;
- AH_Point* points;
+ AH_Point points;
FT_Int max_contours;
FT_Int num_contours;
- AH_Point** contours;
+ AH_Point * contours;
FT_Int num_hedges;
- AH_Edge* horz_edges;
+ AH_Edge horz_edges;
FT_Int num_vedges;
- AH_Edge* vert_edges;
+ AH_Edge vert_edges;
FT_Int num_hsegments;
- AH_Segment* horz_segments;
+ AH_Segment horz_segments;
FT_Int num_vsegments;
- AH_Segment* vert_segments;
+ AH_Segment vert_segments;
- } AH_Outline;
+ } AH_OutlineRec, *AH_Outline;
-#define ah_blue_capital_top 0 /* THEZOCQS */
-#define ah_blue_capital_bottom ( ah_blue_capital_top + 1 ) /* HEZLOCUS */
-#define ah_blue_small_top ( ah_blue_capital_bottom + 1 ) /* xzroesc */
-#define ah_blue_small_bottom ( ah_blue_small_top + 1 ) /* xzroesc */
-#define ah_blue_small_minor ( ah_blue_small_bottom + 1 ) /* pqgjy */
-#define ah_blue_max ( ah_blue_small_minor + 1 )
+#define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
+#define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
+#define AH_BLUE_SMALL_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* xzroesc */
+#define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
+#define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
+#define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
typedef FT_Int AH_Blue;
-#define ah_hinter_monochrome 1
-#define ah_hinter_optimize 2
+#define AH_HINTER_MONOCHROME 1
+#define AH_HINTER_OPTIMIZE 2
typedef FT_Int AH_Hinter_Flags;
@@ -400,7 +403,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Globals */
+ /* AH_GlobalsRec */
/* */
/* <Description> */
/* Holds the global metrics for a given font face (be it in design */
@@ -419,7 +422,7 @@ FT_BEGIN_HEADER
/* */
/* blue_shoots :: The overshoot positions of blue zones. */
/* */
- typedef struct AH_Globals_
+ typedef struct AH_GlobalsRec_
{
FT_Int num_widths;
FT_Int num_heights;
@@ -429,16 +432,16 @@ FT_BEGIN_HEADER
FT_Pos widths [AH_MAX_WIDTHS];
FT_Pos heights[AH_MAX_HEIGHTS];
- FT_Pos blue_refs [ah_blue_max];
- FT_Pos blue_shoots[ah_blue_max];
+ FT_Pos blue_refs [AH_BLUE_MAX];
+ FT_Pos blue_shoots[AH_BLUE_MAX];
- } AH_Globals;
+ } AH_GlobalsRec, *AH_Globals;
/*************************************************************************/
/* */
/* <Struct> */
- /* AH_Face_Globals */
+ /* AH_Face_GlobalsRec */
/* */
/* <Description> */
/* Holds the complete global metrics for a given font face (i.e., the */
@@ -456,19 +459,19 @@ FT_BEGIN_HEADER
/* */
/* y_scale :: The current vertical scale. */
/* */
- typedef struct AH_Face_Globals_
+ typedef struct AH_Face_GlobalsRec_
{
FT_Face face;
- AH_Globals design;
- AH_Globals scaled;
+ AH_GlobalsRec design;
+ AH_GlobalsRec scaled;
FT_Fixed x_scale;
FT_Fixed y_scale;
FT_Bool control_overshoot;
- } AH_Face_Globals;
+ } AH_Face_GlobalsRec, *AH_Face_Globals;
- typedef struct AH_Hinter
+ typedef struct AH_HinterRec
{
FT_Memory memory;
AH_Hinter_Flags flags;
@@ -476,9 +479,9 @@ FT_BEGIN_HEADER
FT_Int algorithm;
FT_Face face;
- AH_Face_Globals* globals;
+ AH_Face_Globals globals;
- AH_Outline* glyph;
+ AH_Outline glyph;
AH_Loader loader;
FT_Vector pp1;
@@ -488,11 +491,11 @@ FT_BEGIN_HEADER
FT_Vector trans_delta;
FT_Matrix trans_matrix;
- } AH_Hinter;
+ } AH_HinterRec, *AH_Hinter;
#ifdef DEBUG_HINTER
- extern AH_Hinter* ah_debug_hinter;
+ extern AH_Hinter ah_debug_hinter;
extern FT_Bool ah_debug_disable_horz;
extern FT_Bool ah_debug_disable_vert;
#else
diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c
index 2e08051..dd445d8 100644
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -602,7 +602,7 @@
if ( y < cbox.yMin ) cbox.yMin = y;
if ( y > cbox.yMax ) cbox.yMax = y;
- if ( FT_CURVE_TAG( outline->tags[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/ftglyph.c b/src/base/ftglyph.c
index f7c7068..a52ef29 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -147,7 +147,7 @@
FT_Memory memory = library->memory;
- if ( slot->format != ft_glyph_format_bitmap )
+ if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
{
error = FT_Err_Invalid_Glyph_Format;
goto Exit;
@@ -209,14 +209,14 @@
const FT_Glyph_Class ft_bitmap_glyph_class =
{
sizeof( FT_BitmapGlyphRec ),
- ft_glyph_format_bitmap,
-
- (FT_Glyph_Init_Func) ft_bitmap_glyph_init,
- (FT_Glyph_Done_Func) ft_bitmap_glyph_done,
- (FT_Glyph_Copy_Func) ft_bitmap_glyph_copy,
- (FT_Glyph_Transform_Func)0,
- (FT_Glyph_BBox_Func) ft_bitmap_glyph_bbox,
- (FT_Glyph_Prepare_Func) 0
+ FT_GLYPH_FORMAT_BITMAP,
+
+ (FT_Glyph_InitFunc) ft_bitmap_glyph_init,
+ (FT_Glyph_DoneFunc) ft_bitmap_glyph_done,
+ (FT_Glyph_CopyFunc) ft_bitmap_glyph_copy,
+ (FT_Glyph_TransformFunc)0,
+ (FT_Glyph_GetBBoxFunc) ft_bitmap_glyph_bbox,
+ (FT_Glyph_PrepareFunc) 0
};
@@ -240,7 +240,7 @@
/* check format in glyph slot */
- if ( slot->format != ft_glyph_format_outline )
+ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
{
error = FT_Err_Invalid_Glyph_Format;
goto Exit;
@@ -262,8 +262,8 @@
FT_MEM_COPY( target->contours, source->contours,
source->n_contours * sizeof ( FT_Short ) );
- /* copy all flags, except the `ft_outline_owner' one */
- target->flags = source->flags | ft_outline_owner;
+ /* copy all flags, except the `FT_OUTLINE_OWNER' one */
+ target->flags = source->flags | FT_OUTLINE_OWNER;
Exit:
return error;
@@ -319,9 +319,9 @@
ft_outline_glyph_prepare( FT_OutlineGlyph glyph,
FT_GlyphSlot slot )
{
- slot->format = ft_glyph_format_outline;
+ slot->format = FT_GLYPH_FORMAT_OUTLINE;
slot->outline = glyph->outline;
- slot->outline.flags &= ~ft_outline_owner;
+ slot->outline.flags &= ~FT_OUTLINE_OWNER;
return FT_Err_Ok;
}
@@ -330,14 +330,14 @@
const FT_Glyph_Class ft_outline_glyph_class =
{
sizeof( FT_OutlineGlyphRec ),
- ft_glyph_format_outline,
-
- (FT_Glyph_Init_Func) ft_outline_glyph_init,
- (FT_Glyph_Done_Func) ft_outline_glyph_done,
- (FT_Glyph_Copy_Func) ft_outline_glyph_copy,
- (FT_Glyph_Transform_Func)ft_outline_glyph_transform,
- (FT_Glyph_BBox_Func) ft_outline_glyph_bbox,
- (FT_Glyph_Prepare_Func) ft_outline_glyph_prepare
+ FT_GLYPH_FORMAT_OUTLINE,
+
+ (FT_Glyph_InitFunc) ft_outline_glyph_init,
+ (FT_Glyph_DoneFunc) ft_outline_glyph_done,
+ (FT_Glyph_CopyFunc) ft_outline_glyph_copy,
+ (FT_Glyph_TransformFunc)ft_outline_glyph_transform,
+ (FT_Glyph_GetBBoxFunc) ft_outline_glyph_bbox,
+ (FT_Glyph_PrepareFunc) ft_outline_glyph_prepare
};
@@ -435,11 +435,11 @@
return FT_Err_Invalid_Argument;
/* if it is a bitmap, that's easy :-) */
- if ( slot->format == ft_glyph_format_bitmap )
+ if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
clazz = &ft_bitmap_glyph_class;
/* it it is an outline too */
- else if ( slot->format == ft_glyph_format_outline )
+ else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
clazz = &ft_outline_glyph_class;
else
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index d433992..2d37d39 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -530,11 +530,11 @@
return error;
}
- args.flags = ft_open_stream;
+ args.flags = FT_OPEN_STREAM;
args.stream = stream;
if ( driver_name )
{
- args.flags = args.flags | ft_open_driver;
+ args.flags = args.flags | FT_OPEN_DRIVER;
args.driver = FT_Get_Module( library, driver_name );
}
@@ -910,7 +910,7 @@
#endif
/* let it fall through to normal loader (.ttf, .otf, etc.) */
- args.flags = ft_open_pathname;
+ args.flags = FT_OPEN_PATHNAME;
args.pathname = (char*)pathname;
return FT_Open_Face( library, &args, face_index, aface );
}
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 59ac1b8..f9a2f61 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -98,20 +98,20 @@
stream->memory = memory;
- if ( args->flags & ft_open_memory )
+ if ( args->flags & FT_OPEN_MEMORY )
{
/* create a memory-based stream */
FT_Stream_OpenMemory( stream,
(const FT_Byte*)args->memory_base,
args->memory_size );
}
- else if ( args->flags & ft_open_pathname )
+ else if ( args->flags & FT_OPEN_PATHNAME )
{
/* create a normal system stream */
error = FT_Stream_Open( stream, args->pathname );
stream->pathname.pointer = args->pathname;
}
- else if ( ( args->flags & ft_open_stream ) && args->stream )
+ else if ( ( args->flags & FT_OPEN_STREAM ) && args->stream )
{
/* use an existing, user-provided stream */
@@ -222,7 +222,7 @@
slot->control_data = 0;
slot->control_len = 0;
slot->other = 0;
- slot->format = ft_glyph_format_none;
+ slot->format = FT_GLYPH_FORMAT_NONE;
slot->linearHoriAdvance = 0;
slot->linearVertAdvance = 0;
@@ -472,7 +472,7 @@
glyph_index,
load_flags | FT_LOAD_SBITS_ONLY );
- if ( !error && slot->format == ft_glyph_format_bitmap )
+ if ( !error && slot->format == FT_GLYPH_FORMAT_BITMAP )
goto Load_Ok;
}
@@ -549,14 +549,14 @@
/* do we need to render the image now? */
if ( !error &&
- slot->format != ft_glyph_format_bitmap &&
- slot->format != ft_glyph_format_composite &&
+ slot->format != FT_GLYPH_FORMAT_BITMAP &&
+ slot->format != FT_GLYPH_FORMAT_COMPOSITE &&
load_flags & FT_LOAD_RENDER )
{
error = FT_Render_Glyph( slot,
( load_flags & FT_LOAD_MONOCHROME )
- ? ft_render_mode_mono
- : ft_render_mode_normal );
+ ? FT_RENDER_MODE_MONO
+ : FT_RENDER_MODE_NORMAL );
}
Exit:
@@ -758,7 +758,7 @@
{
cmap = face->charmaps[nn];
- if ( cmap->encoding == ft_encoding_unicode )
+ if ( cmap->encoding == FT_ENCODING_UNICODE )
{
unicmap = cmap;
break;
@@ -804,7 +804,7 @@
if ( !pathname )
return FT_Err_Invalid_Argument;
- args.flags = ft_open_pathname;
+ args.flags = FT_OPEN_PATHNAME;
args.pathname = (char*)pathname;
return FT_Open_Face( library, &args, face_index, aface );
@@ -829,7 +829,7 @@
if ( !file_base )
return FT_Err_Invalid_Argument;
- args.flags = ft_open_memory;
+ args.flags = FT_OPEN_MEMORY;
args.memory_base = file_base;
args.memory_size = file_size;
@@ -862,7 +862,7 @@
*aface = 0;
- external_stream = FT_BOOL( ( args->flags & ft_open_stream ) &&
+ external_stream = FT_BOOL( ( args->flags & FT_OPEN_STREAM ) &&
args->stream );
/* create input stream */
@@ -874,7 +874,7 @@
/* If the font driver is specified in the `args' structure, use */
/* it. Otherwise, we scan the list of registered drivers. */
- if ( ( args->flags & ft_open_driver ) && args->driver )
+ if ( ( args->flags & FT_OPEN_DRIVER ) && args->driver )
{
driver = FT_DRIVER( args->driver );
@@ -885,7 +885,7 @@
FT_Parameter* params = 0;
- if ( args->flags & ft_open_params )
+ if ( args->flags & FT_OPEN_PARAMS )
{
num_params = args->num_params;
params = args->params;
@@ -920,7 +920,7 @@
driver = FT_DRIVER( cur[0] );
- if ( args->flags & ft_open_params )
+ if ( args->flags & FT_OPEN_PARAMS )
{
num_params = args->num_params;
params = args->params;
@@ -1029,7 +1029,7 @@
if ( !filepathname )
return FT_Err_Invalid_Argument;
- open.flags = ft_open_pathname;
+ open.flags = FT_OPEN_PATHNAME;
open.pathname = (char*)filepathname;
return FT_Attach_Stream( face, &open );
@@ -1073,7 +1073,7 @@
/* close the attached stream */
ft_input_stream_free( stream,
(FT_Bool)( parameters->stream &&
- ( parameters->flags & ft_open_stream ) ) );
+ ( parameters->flags & FT_OPEN_STREAM ) ) );
Exit:
return error;
@@ -1399,12 +1399,12 @@
akerning );
if ( !error )
{
- if ( kern_mode != ft_kerning_unscaled )
+ if ( kern_mode != FT_KERNING_UNSCALED )
{
akerning->x = FT_MulFix( akerning->x, face->size->metrics.x_scale );
akerning->y = FT_MulFix( akerning->y, face->size->metrics.y_scale );
- if ( kern_mode != ft_kerning_unfitted )
+ if ( kern_mode != FT_KERNING_UNFITTED )
{
akerning->x = ( akerning->x + 32 ) & -64;
akerning->y = ( akerning->y + 32 ) & -64;
@@ -1853,7 +1853,7 @@
FT_Renderer renderer;
- renderer = FT_Lookup_Renderer( library, ft_glyph_format_outline, 0 );
+ renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE, 0 );
library->cur_renderer = renderer;
}
@@ -1879,7 +1879,7 @@
render->glyph_format = clazz->glyph_format;
/* allocate raster object if needed */
- if ( clazz->glyph_format == ft_glyph_format_outline &&
+ if ( clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
clazz->raster_class->raster_new )
{
error = clazz->raster_class->raster_new( memory, &render->raster );
@@ -1972,12 +1972,12 @@
FT_List_Up( &library->renderers, node );
- if ( renderer->glyph_format == ft_glyph_format_outline )
+ if ( renderer->glyph_format == FT_GLYPH_FORMAT_OUTLINE )
library->cur_renderer = renderer;
if ( num_params > 0 )
{
- FTRenderer_setMode set_mode = renderer->clazz->set_mode;
+ FT_Renderer_SetModeFunc set_mode = renderer->clazz->set_mode;
for ( ; num_params > 0; num_params-- )
@@ -2005,7 +2005,7 @@
/* if it is already a bitmap, no need to do anything */
switch ( slot->format )
{
- case ft_glyph_format_bitmap: /* already a bitmap, don't do anything */
+ case FT_GLYPH_FORMAT_BITMAP: /* already a bitmap, don't do anything */
break;
default:
@@ -2015,7 +2015,7 @@
/* small shortcut for the very common case */
- if ( slot->format == ft_glyph_format_outline )
+ if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
{
renderer = library->cur_renderer;
node = library->renderers.head;
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 62b0cd9..c59043b 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -98,14 +98,14 @@
tag = FT_CURVE_TAG( tags[0] );
/* A contour cannot start with a cubic control point! */
- if ( tag == FT_Curve_Tag_Cubic )
+ if ( tag == FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
/* check first point to determine origin */
- if ( tag == FT_Curve_Tag_Conic )
+ if ( tag == FT_CURVE_TAG_CONIC )
{
/* first point is conic control. Yes, this happens. */
- if ( FT_CURVE_TAG( outline->tags[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;
@@ -137,7 +137,7 @@
tag = FT_CURVE_TAG( tags[0] );
switch ( tag )
{
- case FT_Curve_Tag_On: /* emit a single line_to */
+ case FT_CURVE_TAG_ON: /* emit a single line_to */
{
FT_Vector vec;
@@ -151,7 +151,7 @@
continue;
}
- case FT_Curve_Tag_Conic: /* consume conic arcs */
+ case FT_CURVE_TAG_CONIC: /* consume conic arcs */
v_control.x = SCALED( point->x );
v_control.y = SCALED( point->y );
@@ -169,7 +169,7 @@
vec.x = SCALED( point->x );
vec.y = SCALED( point->y );
- if ( tag == FT_Curve_Tag_On )
+ if ( tag == FT_CURVE_TAG_ON )
{
error = func_interface->conic_to( &v_control, &vec, user );
if ( error )
@@ -177,7 +177,7 @@
continue;
}
- if ( tag != FT_Curve_Tag_Conic )
+ if ( tag != FT_CURVE_TAG_CONIC )
goto Invalid_Outline;
v_middle.x = ( v_control.x + vec.x ) / 2;
@@ -194,13 +194,13 @@
error = func_interface->conic_to( &v_control, &v_start, user );
goto Close;
- default: /* FT_Curve_Tag_Cubic */
+ default: /* FT_CURVE_TAG_CUBIC */
{
FT_Vector vec1, vec2;
if ( point + 1 > limit ||
- FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+ FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
point += 2;
@@ -270,12 +270,12 @@
anoutline->n_points = (FT_UShort)numPoints;
anoutline->n_contours = (FT_Short)numContours;
- anoutline->flags |= ft_outline_owner;
+ anoutline->flags |= FT_OUTLINE_OWNER;
return FT_Err_Ok;
Fail:
- anoutline->flags |= ft_outline_owner;
+ anoutline->flags |= FT_OUTLINE_OWNER;
FT_Outline_Done_Internal( memory, anoutline );
return error;
@@ -366,11 +366,11 @@
FT_MEM_COPY( target->contours, source->contours,
source->n_contours * sizeof ( FT_Short ) );
- /* copy all flags, except the `ft_outline_owner' one */
- is_owner = target->flags & ft_outline_owner;
+ /* copy all flags, except the `FT_OUTLINE_OWNER' one */
+ is_owner = target->flags & FT_OUTLINE_OWNER;
target->flags = source->flags;
- target->flags &= ~ft_outline_owner;
+ target->flags &= ~FT_OUTLINE_OWNER;
target->flags |= is_owner;
return FT_Err_Ok;
@@ -383,7 +383,7 @@
{
if ( outline )
{
- if ( outline->flags & ft_outline_owner )
+ if ( outline->flags & FT_OUTLINE_OWNER )
{
FT_FREE( outline->points );
FT_FREE( outline->tags );
@@ -535,7 +535,7 @@
first = last + 1;
}
- outline->flags ^= ft_outline_reverse_fill;
+ outline->flags ^= FT_OUTLINE_REVERSE_FILL;
}
@@ -576,7 +576,7 @@
/* now, look for another renderer that supports the same */
/* format */
- renderer = FT_Lookup_Renderer( library, ft_glyph_format_outline,
+ renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE,
&node );
update = 1;
}
@@ -608,8 +608,10 @@
params.target = abitmap;
params.flags = 0;
- if ( abitmap->pixel_mode == ft_pixel_mode_grays )
- params.flags |= ft_raster_flag_aa;
+ if ( abitmap->pixel_mode == FT_PIXEL_MODE_GRAY ||
+ abitmap->pixel_mode == FT_PIXEL_MODE_LCD ||
+ abitmap->pixel_mode == FT_PIXEL_MODE_LCD_V )
+ params.flags |= FT_RASTER_FLAG_AA;
return FT_Outline_Render( library, outline, ¶ms );
}
diff --git a/src/base/ftstroker.c b/src/base/ftstroker.c
index 7f6b3de..c019be7 100644
--- a/src/base/ftstroker.c
+++ b/src/base/ftstroker.c
@@ -79,7 +79,7 @@
}
theta = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_out ) );
-
+
return FT_BOOL( theta < FT_SMALL_CONIC_THRESHOLD );
}
@@ -523,11 +523,11 @@
for ( ; count > 0; count--, read++, write++ )
{
if ( *read & FT_STROKE_TAG_ON )
- *write = FT_Curve_Tag_On;
+ *write = FT_CURVE_TAG_ON;
else if ( *read & FT_STROKE_TAG_CUBIC )
- *write = FT_Curve_Tag_Cubic;
+ *write = FT_CURVE_TAG_CUBIC;
else
- *write = FT_Curve_Tag_Conic;
+ *write = FT_CURVE_TAG_CONIC;
}
}
@@ -1008,9 +1008,9 @@
while ( arc >= bez_stack )
{
FT_Angle angle_in, angle_out;
-
+
angle_in = angle_out = 0; /* remove compiler warnings */
-
+
if ( arc < limit &&
!ft_conic_is_small_enough( arc, &angle_in, &angle_out ) )
{
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index 437ea03..35b52e3 100644
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -43,7 +43,7 @@
/* only oblique outline glyphs */
- if ( slot->format != ft_glyph_format_outline )
+ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
return;
/* we don't touch the advance width */
@@ -116,7 +116,7 @@
/* Compute the orientation of path filling. It differs between TrueType */
- /* and Type1 formats. We could use the `ft_outline_reverse_fill' flag, */
+ /* and Type1 formats. We could use the `FT_OUTLINE_REVERSE_FILL' flag, */
/* but it is better to re-compute it directly (it seems that this flag */
/* isn't correctly set for some weird composite glyphs currently). */
/* */
@@ -212,7 +212,7 @@
/* only embolden outline glyph images */
- if ( slot->format != ft_glyph_format_outline )
+ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
return;
/* compute control distance */
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index 967ceca..b379a98 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -398,13 +398,13 @@ THE SOFTWARE.
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_none;
+ charmap.encoding = FT_ENCODING_NONE;
charmap.platform_id = 0;
charmap.encoding_id = 0;
if ( unicode_charmap )
{
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
charmap.platform_id = 3;
charmap.encoding_id = 1;
}
@@ -429,7 +429,7 @@ THE SOFTWARE.
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_adobe_standard;
+ charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
charmap.platform_id = 7;
charmap.encoding_id = 0;
@@ -510,7 +510,7 @@ THE SOFTWARE.
if ( bpp == 1 )
{
- bitmap->pixel_mode = ft_pixel_mode_mono;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
bitmap->pitch = glyph.bpr;
if ( FT_NEW_ARRAY( bitmap->buffer, glyph.bytes ) )
@@ -520,7 +520,7 @@ THE SOFTWARE.
else
{
/* blow up pixmap to have 8 bits per pixel */
- bitmap->pixel_mode = ft_pixel_mode_grays;
+ bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
bitmap->pitch = bitmap->width;
if ( FT_NEW_ARRAY( bitmap->buffer, bitmap->rows * bitmap->pitch ) )
@@ -623,7 +623,7 @@ THE SOFTWARE.
slot->metrics.height = bitmap->rows << 6;
slot->linearHoriAdvance = (FT_Fixed)glyph.dwidth << 16;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
slot->flags = FT_GLYPH_OWN_BITMAP;
Exit:
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index 101db85..57915dd 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -143,8 +143,8 @@
error = FT_Load_Glyph( face, gindex, load_flags );
if ( !error )
{
- if ( face->glyph->format == ft_glyph_format_bitmap ||
- face->glyph->format == ft_glyph_format_outline )
+ if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP ||
+ face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
{
/* ok, copy it */
FT_Glyph glyph;
@@ -179,7 +179,7 @@
switch ( glyph->format )
{
- case ft_glyph_format_bitmap:
+ case FT_GLYPH_FORMAT_BITMAP:
{
FT_BitmapGlyph bitg;
@@ -190,7 +190,7 @@
}
break;
- case ft_glyph_format_outline:
+ case FT_GLYPH_FORMAT_OUTLINE:
{
FT_OutlineGlyph outg;
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 9fd8968..c9098fc 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -423,7 +423,7 @@
point->x = x >> 16;
point->y = y >> 16;
- *control = (FT_Byte)( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
+ *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
builder->last = *point;
}
@@ -525,7 +525,7 @@
/* `delete' last point only if it coincides with the first */
/* point and if it is not a control point (which can happen). */
if ( p1->x == p2->x && p1->y == p2->y )
- if ( *control == FT_Curve_Tag_On )
+ if ( *control == FT_CURVE_TAG_ON )
outline->n_points--;
}
@@ -692,7 +692,7 @@
/* set up remaining glyph fields */
glyph->num_subglyphs = 2;
glyph->subglyphs = loader->base.subglyphs;
- glyph->format = ft_glyph_format_composite;
+ glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
loader->current.num_subglyphs = 2;
}
@@ -2291,7 +2291,7 @@
hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
( load_flags & FT_LOAD_NO_HINTING ) == 0 );
- glyph->root.format = ft_glyph_format_outline; /* by default */
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE; /* by default */
{
FT_Byte* charstring;
@@ -2381,13 +2381,13 @@
glyph->root.linearVertAdvance = 0;
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
glyph->root.outline.flags = 0;
if ( size && size->metrics.y_ppem < 24 )
- glyph->root.outline.flags |= ft_outline_high_precision;
+ glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
- glyph->root.outline.flags |= ft_outline_reverse_fill;
+ glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
/* apply the font matrix */
FT_Outline_Transform( &glyph->root.outline, &font_matrix );
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index a1b6166..cc321ef 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -480,7 +480,7 @@
cmaprec.face = root;
cmaprec.platform_id = 3;
cmaprec.encoding_id = 1;
- cmaprec.encoding = ft_encoding_unicode;
+ cmaprec.encoding = FT_ENCODING_UNICODE;
nn = (FT_UInt) root->num_charmaps;
@@ -503,19 +503,19 @@
{
case 0:
cmaprec.encoding_id = 0;
- cmaprec.encoding = ft_encoding_adobe_standard;
+ cmaprec.encoding = FT_ENCODING_ADOBE_STANDARD;
clazz = &cff_cmap_encoding_class_rec;
break;
case 1:
cmaprec.encoding_id = 1;
- cmaprec.encoding = ft_encoding_adobe_expert;
+ cmaprec.encoding = FT_ENCODING_ADOBE_EXPERT;
clazz = &cff_cmap_encoding_class_rec;
break;
default:
cmaprec.encoding_id = 3;
- cmaprec.encoding = ft_encoding_adobe_custom;
+ cmaprec.encoding = FT_ENCODING_ADOBE_CUSTOM;
clazz = &cff_cmap_encoding_class_rec;
}
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index 04a66c2..b5b58f1 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -206,8 +206,8 @@
FT_LOCAL_DEF( FT_Error )
- CID_Compute_Max_Advance( CID_Face face,
- FT_Int* max_advance )
+ cid_face_compute_max_advance( CID_Face face,
+ FT_Int* max_advance )
{
FT_Error error;
T1_DecoderRec decoder;
@@ -269,10 +269,10 @@
FT_LOCAL_DEF( FT_Error )
- CID_Load_Glyph( CID_GlyphSlot glyph,
- CID_Size size,
- FT_Int glyph_index,
- FT_Int load_flags )
+ cid_slot_load_glyph( CID_GlyphSlot glyph,
+ CID_Size size,
+ FT_Int glyph_index,
+ FT_Int load_flags )
{
FT_Error error;
T1_DecoderRec decoder;
@@ -296,7 +296,7 @@
hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
( load_flags & FT_LOAD_NO_HINTING ) == 0 );
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
{
error = psaux->t1_decoder_funcs->init( &decoder,
@@ -326,8 +326,8 @@
/* bearing the yMax */
if ( !error )
{
- glyph->root.outline.flags &= ft_outline_owner;
- glyph->root.outline.flags |= ft_outline_reverse_fill;
+ glyph->root.outline.flags &= FT_OUTLINE_OWNER;
+ glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
/* for composite glyphs, return only left side bearing and */
/* advance width */
@@ -360,10 +360,10 @@
metrics->vertAdvance = 0;
glyph->root.linearVertAdvance = 0;
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
if ( size && size->root.metrics.y_ppem < 24 )
- glyph->root.outline.flags |= ft_outline_high_precision;
+ glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
/* apply the font matrix */
FT_Outline_Transform( &glyph->root.outline, &font_matrix );
diff --git a/src/cid/cidgload.h b/src/cid/cidgload.h
index 20cdba1..578b7c4 100644
--- a/src/cid/cidgload.h
+++ b/src/cid/cidgload.h
@@ -31,16 +31,16 @@ FT_BEGIN_HEADER
/* Compute the maximum advance width of a font through quick parsing */
FT_LOCAL( FT_Error )
- CID_Compute_Max_Advance( CID_Face face,
- FT_Int* max_advance );
+ cid_face_compute_max_advance( CID_Face face,
+ FT_Int* max_advance );
#endif /* 0 */
FT_LOCAL( FT_Error )
- CID_Load_Glyph( CID_GlyphSlot glyph,
- CID_Size size,
- FT_Int glyph_index,
- FT_Int load_flags );
+ cid_slot_load_glyph( CID_GlyphSlot glyph,
+ CID_Size size,
+ FT_Int glyph_index,
+ FT_Int load_flags );
FT_END_HEADER
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index fe9d724..66a3cbe 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -146,10 +146,10 @@
/* now, load the keyword data in the object's field(s) */
if ( keyword->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
keyword->type == T1_FIELD_TYPE_FIXED_ARRAY )
- error = CID_Load_Field_Table( &loader->parser, keyword,
+ error = cid_parser_load_field_table( &loader->parser, keyword,
&dummy_object );
else
- error = CID_Load_Field( &loader->parser, keyword, &dummy_object );
+ error = cid_parser_load_field( &loader->parser, keyword, &dummy_object );
Exit:
return error;
}
@@ -163,7 +163,7 @@
FT_BBox* bbox = &face->cid.font_bbox;
- (void)CID_ToFixedArray( parser, 4, temp, 0 );
+ (void)cid_parser_to_fixed_array( parser, 4, temp, 0 );
bbox->xMin = FT_RoundFix( temp[0] );
bbox->yMin = FT_RoundFix( temp[1] );
bbox->xMax = FT_RoundFix( temp[2] );
@@ -192,7 +192,7 @@
matrix = &dict->font_matrix;
offset = &dict->font_offset;
- (void)CID_ToFixedArray( parser, 6, temp, 3 );
+ (void)cid_parser_to_fixed_array( parser, 6, temp, 3 );
temp_scale = ABS( temp[3] );
@@ -238,7 +238,7 @@
FT_Long num_dicts;
- num_dicts = CID_ToInt( parser );
+ num_dicts = cid_parser_to_int( parser );
if ( !cid->font_dicts )
{
@@ -362,7 +362,7 @@
{
/* we found it - run the parsing callback */
parser->root.cursor = cur2;
- CID_Skip_Spaces( parser );
+ cid_parser_skip_spaces( parser );
parser->root.error = cid_load_keyword( face,
loader,
keyword );
@@ -508,12 +508,12 @@
/* finalize parser */
- CID_Done_Parser( parser );
+ cid_parser_done( parser );
}
FT_LOCAL_DEF( FT_Error )
- CID_Open_Face( CID_Face face )
+ cid_face_open( CID_Face face )
{
CID_Loader loader;
CID_Parser* parser;
@@ -523,7 +523,7 @@
t1_init_loader( &loader, face );
parser = &loader.parser;
- error = CID_New_Parser( parser, face->root.stream, face->root.memory,
+ error = cid_parser_new( parser, face->root.stream, face->root.memory,
(PSAux_Service)face->psaux );
if ( error )
goto Exit;
diff --git a/src/cid/cidload.h b/src/cid/cidload.h
index 66e6d2f..8fc577d 100644
--- a/src/cid/cidload.h
+++ b/src/cid/cidload.h
@@ -46,7 +46,7 @@ FT_BEGIN_HEADER
FT_UShort seed );
FT_LOCAL( FT_Error )
- CID_Open_Face( CID_Face face );
+ cid_face_open( CID_Face face );
FT_END_HEADER
diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
index f003a28..b839fbf 100644
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -45,14 +45,14 @@
/*************************************************************************/
FT_LOCAL_DEF( void )
- CID_GlyphSlot_Done( CID_GlyphSlot slot )
+ cid_slot_done( CID_GlyphSlot slot )
{
slot->root.internal->glyph_hints = 0;
}
FT_LOCAL_DEF( FT_Error )
- CID_GlyphSlot_Init( CID_GlyphSlot slot )
+ cid_slot_init( CID_GlyphSlot slot )
{
CID_Face face;
PSHinter_Service pshinter;
@@ -90,7 +90,7 @@
static PSH_Globals_Funcs
- CID_Size_Get_Globals_Funcs( CID_Size size )
+ cid_size_get_globals_funcs( CID_Size size )
{
CID_Face face = (CID_Face)size->root.face;
PSHinter_Service pshinter = (PSHinter_Service)face->pshinter;
@@ -106,14 +106,14 @@
FT_LOCAL_DEF( void )
- CID_Size_Done( CID_Size size )
+ cid_size_done( CID_Size size )
{
if ( size->root.internal )
{
PSH_Globals_Funcs funcs;
- funcs = CID_Size_Get_Globals_Funcs( size );
+ funcs = cid_size_get_globals_funcs( size );
if ( funcs )
funcs->destroy( (PSH_Globals)size->root.internal );
@@ -126,7 +126,7 @@
CID_Size_Init( CID_Size size )
{
FT_Error error = 0;
- PSH_Globals_Funcs funcs = CID_Size_Get_Globals_Funcs( size );
+ PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
if ( funcs )
@@ -147,9 +147,9 @@
FT_LOCAL_DEF( FT_Error )
- CID_Size_Reset( CID_Size size )
+ cid_size_reset( CID_Size size )
{
- PSH_Globals_Funcs funcs = CID_Size_Get_Globals_Funcs( size );
+ PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
FT_Error error = 0;
@@ -171,7 +171,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CID_Face_Done */
+ /* cid_face_done */
/* */
/* <Description> */
/* Finalizes a given face object. */
@@ -180,7 +180,7 @@
/* face :: A pointer to the face object to destroy. */
/* */
FT_LOCAL_DEF( void )
- CID_Face_Done( CID_Face face )
+ cid_face_done( CID_Face face )
{
FT_Memory memory;
@@ -239,7 +239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CID_Face_Init */
+ /* cid_face_init */
/* */
/* <Description> */
/* Initializes a given CID face object. */
@@ -260,7 +260,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- CID_Face_Init( FT_Stream stream,
+ cid_face_init( FT_Stream stream,
CID_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -310,7 +310,7 @@
if ( FT_STREAM_SEEK( 0 ) )
goto Exit;
- error = CID_Open_Face( face );
+ error = cid_face_open( face );
if ( error )
goto Exit;
@@ -321,7 +321,7 @@
/* check the face index */
if ( face_index != 0 )
{
- FT_ERROR(( "CID_Face_Init: invalid face index\n" ));
+ FT_ERROR(( "cid_face_init: invalid face index\n" ));
error = CID_Err_Invalid_Argument;
goto Exit;
}
@@ -407,7 +407,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CID_Driver_Init */
+ /* cid_driver_init */
/* */
/* <Description> */
/* Initializes a given CID driver object. */
@@ -419,7 +419,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- CID_Driver_Init( CID_Driver driver )
+ cid_driver_init( CID_Driver driver )
{
FT_UNUSED( driver );
@@ -430,7 +430,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CID_Driver_Done */
+ /* cid_driver_done */
/* */
/* <Description> */
/* Finalizes a given CID driver. */
@@ -439,7 +439,7 @@
/* driver :: A handle to the target CID driver. */
/* */
FT_LOCAL_DEF( void )
- CID_Driver_Done( CID_Driver driver )
+ cid_driver_done( CID_Driver driver )
{
FT_UNUSED( driver );
}
diff --git a/src/cid/cidobjs.h b/src/cid/cidobjs.h
index e8d6653..527eb3f 100644
--- a/src/cid/cidobjs.h
+++ b/src/cid/cidobjs.h
@@ -112,14 +112,14 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
- CID_GlyphSlot_Done( CID_GlyphSlot slot );
+ cid_slot_done( CID_GlyphSlot slot );
FT_LOCAL( FT_Error )
- CID_GlyphSlot_Init( CID_GlyphSlot slot );
+ cid_slot_init( CID_GlyphSlot slot );
FT_LOCAL( void )
- CID_Size_Done( CID_Size size );
+ cid_size_done( CID_Size size );
FT_LOCAL( FT_Error )
@@ -127,11 +127,11 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- CID_Size_Reset( CID_Size size );
+ cid_size_reset( CID_Size size );
FT_LOCAL( FT_Error )
- CID_Face_Init( FT_Stream stream,
+ cid_face_init( FT_Stream stream,
CID_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -139,15 +139,15 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
- CID_Face_Done( CID_Face face );
+ cid_face_done( CID_Face face );
FT_LOCAL( FT_Error )
- CID_Driver_Init( CID_Driver driver );
+ cid_driver_init( CID_Driver driver );
FT_LOCAL( void )
- CID_Driver_Done( CID_Driver driver );
+ cid_driver_done( CID_Driver driver );
FT_END_HEADER
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index ab4c06a..397a66f 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -49,7 +49,7 @@
FT_LOCAL_DEF( FT_Error )
- CID_New_Parser( CID_Parser* parser,
+ cid_parser_new( CID_Parser* parser,
FT_Stream stream,
FT_Memory memory,
PSAux_Service psaux )
@@ -138,7 +138,7 @@
FT_LOCAL_DEF( void )
- CID_Done_Parser( CID_Parser* parser )
+ cid_parser_done( CID_Parser* parser )
{
/* always free the private dictionary */
if ( parser->postscript )
diff --git a/src/cid/cidparse.h b/src/cid/cidparse.h
index 7cf255c..eb56a48 100644
--- a/src/cid/cidparse.h
+++ b/src/cid/cidparse.h
@@ -72,13 +72,13 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- CID_New_Parser( CID_Parser* parser,
+ cid_parser_new( CID_Parser* parser,
FT_Stream stream,
FT_Memory memory,
PSAux_Service psaux );
FT_LOCAL( void )
- CID_Done_Parser( CID_Parser* parser );
+ cid_parser_done( CID_Parser* parser );
/*************************************************************************/
@@ -87,24 +87,24 @@ FT_BEGIN_HEADER
/* */
/*************************************************************************/
-#define CID_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
-#define CID_Skip_Alpha( p ) (p)->root.funcs.skip_alpha ( &(p)->root )
+#define cid_parser_skip_spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
+#define cid_parser_skip_alpha( p ) (p)->root.funcs.skip_alpha ( &(p)->root )
-#define CID_ToInt( p ) (p)->root.funcs.to_int( &(p)->root )
-#define CID_ToFixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
+#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root )
+#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
-#define CID_ToCoordArray( p, m, c ) \
+#define cid_parser_to_coord_array( p, m, c ) \
(p)->root.funcs.to_coord_array( &(p)->root, m, c )
-#define CID_ToFixedArray( p, m, f, t ) \
+#define cid_parser_to_fixed_array( p, m, f, t ) \
(p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
-#define CID_ToToken( p, t ) \
+#define cid_parser_to_token( p, t ) \
(p)->root.funcs.to_token( &(p)->root, t )
-#define CID_ToTokenArray( p, t, m, c ) \
+#define cid_parser_to_token_array( p, t, m, c ) \
(p)->root.funcs.to_token_array( &(p)->root, t, m, c )
-#define CID_Load_Field( p, f, o ) \
+#define cid_parser_load_field( p, f, o ) \
(p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
-#define CID_Load_Field_Table( p, f, o ) \
+#define cid_parser_load_field_table( p, f, o ) \
(p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c
index 9ab86a4..e5b28ba 100644
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -50,7 +50,7 @@
static FT_Module_Interface
- CID_Get_Interface( FT_Driver driver,
+ cid_get_interface( FT_Driver driver,
const FT_String* cid_interface )
{
FT_UNUSED( driver );
@@ -80,9 +80,9 @@
0,
- (FT_Module_Constructor)CID_Driver_Init,
- (FT_Module_Destructor) CID_Driver_Done,
- (FT_Module_Requester) CID_Get_Interface
+ (FT_Module_Constructor)cid_driver_init,
+ (FT_Module_Destructor) cid_driver_done,
+ (FT_Module_Requester) cid_get_interface
},
/* then the other font drivers fields */
@@ -90,18 +90,18 @@
sizeof( CID_SizeRec ),
sizeof( CID_GlyphSlotRec ),
- (FT_Face_InitFunc) CID_Face_Init,
- (FT_Face_DoneFunc) CID_Face_Done,
+ (FT_Face_InitFunc) cid_face_init,
+ (FT_Face_DoneFunc) cid_face_done,
(FT_Size_InitFunc) CID_Size_Init,
- (FT_Size_DoneFunc) CID_Size_Done,
- (FT_Slot_InitFunc) CID_GlyphSlot_Init,
- (FT_Slot_DoneFunc) CID_GlyphSlot_Done,
+ (FT_Size_DoneFunc) cid_size_done,
+ (FT_Slot_InitFunc) cid_slot_init,
+ (FT_Slot_DoneFunc) cid_slot_done,
- (FT_Size_ResetPointsFunc)CID_Size_Reset,
- (FT_Size_ResetPixelsFunc)CID_Size_Reset,
+ (FT_Size_ResetPointsFunc)cid_size_reset,
+ (FT_Size_ResetPixelsFunc)cid_size_reset,
- (FT_Slot_LoadFunc) CID_Load_Glyph,
+ (FT_Slot_LoadFunc) cid_slot_load_glyph,
(FT_Face_GetKerningFunc) 0,
(FT_Face_AttachFunc) 0,
diff --git a/src/pcf/pcfdriver.c b/src/pcf/pcfdriver.c
index ac9dda3..cdaadb5 100644
--- a/src/pcf/pcfdriver.c
+++ b/src/pcf/pcfdriver.c
@@ -253,13 +253,13 @@ THE SOFTWARE.
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_none;
+ charmap.encoding = FT_ENCODING_NONE;
charmap.platform_id = 0;
charmap.encoding_id = 0;
if ( unicode_charmap )
{
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
charmap.platform_id = 3;
charmap.encoding_id = 1;
}
@@ -348,7 +348,7 @@ THE SOFTWARE.
bitmap->rows = metric->ascent + metric->descent;
bitmap->width = metric->rightSideBearing - metric->leftSideBearing;
bitmap->num_grays = 1;
- bitmap->pixel_mode = ft_pixel_mode_mono;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
FT_TRACE6(( "BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n",
PCF_BIT_ORDER( face->bitmapsFormat ),
@@ -418,7 +418,7 @@ THE SOFTWARE.
slot->metrics.height = bitmap->rows << 6;
slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
slot->flags = FT_GLYPH_OWN_BITMAP;
FT_TRACE4(( " --- ok\n" ));
diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c
index 192f0e0..dd8e114 100644
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -139,7 +139,7 @@
outline->points[n] = *to;
- outline->tags [n] = FT_Curve_Tag_On;
+ outline->tags [n] = FT_CURVE_TAG_ON;
outline->n_points++;
}
@@ -172,9 +172,9 @@
vec[0] = *control1;
vec[1] = *control2;
vec[2] = *to;
- tag[0] = FT_Curve_Tag_Cubic;
- tag[1] = FT_Curve_Tag_Cubic;
- tag[2] = FT_Curve_Tag_On;
+ tag[0] = FT_CURVE_TAG_CUBIC;
+ tag[1] = FT_CURVE_TAG_CUBIC;
+ tag[2] = FT_CURVE_TAG_ON;
outline->n_points = (FT_Short)( outline->n_points + 3 );
}
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 3134e41..30ba5e2 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -172,7 +172,7 @@
charmap.face = root;
charmap.platform_id = 3;
charmap.encoding_id = 1;
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
@@ -238,7 +238,7 @@
FT_ASSERT( gindex < face->phy_font.num_chars );
gchar = face->phy_font.chars + gindex;
- slot->root.format = ft_glyph_format_outline;
+ slot->root.format = FT_GLYPH_FORMAT_OUTLINE;
outline->n_points = 0;
outline->n_contours = 0;
gps_offset = face->header.gps_section_offset;
@@ -261,11 +261,11 @@
/* copy outline data */
*outline = slot->glyph.loader->base.outline;
- outline->flags &= ~ft_outline_owner;
- outline->flags |= ft_outline_reverse_fill;
+ outline->flags &= ~FT_OUTLINE_OWNER;
+ outline->flags |= FT_OUTLINE_REVERSE_FILL;
if ( size && size->root.metrics.y_ppem < 24 )
- outline->flags |= ft_outline_high_precision;
+ outline->flags |= FT_OUTLINE_HIGH_PRECISION;
/* compute the advance vector */
metrics->horiAdvance = 0;
diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c
index f2f935a..37a126c 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -26,51 +26,51 @@
FT_CALLBACK_TABLE_DEF
const PS_Table_FuncsRec ps_table_funcs =
{
- PS_Table_New,
- PS_Table_Done,
- PS_Table_Add,
- PS_Table_Release
+ ps_table_new,
+ ps_table_done,
+ ps_table_add,
+ ps_table_release
};
FT_CALLBACK_TABLE_DEF
const PS_Parser_FuncsRec ps_parser_funcs =
{
- PS_Parser_Init,
- PS_Parser_Done,
- PS_Parser_SkipSpaces,
- PS_Parser_SkipAlpha,
- PS_Parser_ToInt,
- PS_Parser_ToFixed,
- PS_Parser_ToCoordArray,
- PS_Parser_ToFixedArray,
- PS_Parser_ToToken,
- PS_Parser_ToTokenArray,
- PS_Parser_LoadField,
- PS_Parser_LoadFieldTable
+ ps_parser_init,
+ ps_parser_done,
+ ps_parser_skip_spaces,
+ ps_parser_skip_alpha,
+ ps_parser_to_int,
+ ps_parser_to_fixed,
+ ps_parser_to_coord_array,
+ ps_parser_to_fixed_array,
+ ps_parser_to_token,
+ ps_parser_to_token_array,
+ ps_parser_load_field,
+ ps_parser_load_field_table
};
FT_CALLBACK_TABLE_DEF
const T1_Builder_FuncsRec t1_builder_funcs =
{
- T1_Builder_Init,
- T1_Builder_Done,
- T1_Builder_Check_Points,
- T1_Builder_Add_Point,
+ t1_builder_init,
+ t1_builder_done,
+ t1_builder_check_points,
+ t1_builder_add_point,
T1_Builder_Add_Point1,
- T1_Builder_Add_Contour,
- T1_Builder_Start_Point,
- T1_Builder_Close_Contour
+ t1_builder_add_contour,
+ t1_builder_start_point,
+ t1_builder_close_contour
};
FT_CALLBACK_TABLE_DEF
const T1_Decoder_FuncsRec t1_decoder_funcs =
{
- T1_Decoder_Init,
- T1_Decoder_Done,
- T1_Decoder_Parse_Charstrings
+ t1_decoder_init,
+ t1_decoder_done,
+ t1_decoder_parse_charstrings
};
@@ -92,7 +92,7 @@
&t1_builder_funcs,
&t1_decoder_funcs,
- T1_Decrypt,
+ t1_decrypt,
(const T1_CMap_ClassesRec*) &t1_cmap_classes,
};
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 7f7373d..245d9b7 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -36,7 +36,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* PS_Table_New */
+ /* ps_table_new */
/* */
/* <Description> */
/* Initializes a PS_Table. */
@@ -54,7 +54,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- PS_Table_New( PS_Table table,
+ ps_table_new( PS_Table table,
FT_Int count,
FT_Memory memory )
{
@@ -72,7 +72,7 @@
table->block = 0;
table->capacity = 0;
table->cursor = 0;
-
+
*(PS_Table_FuncsRec*)&table->funcs = ps_table_funcs;
Exit:
@@ -130,7 +130,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* PS_Table_Add */
+ /* ps_table_add */
/* */
/* <Description> */
/* Adds an object to a PS_Table, possibly growing its memory block. */
@@ -150,14 +150,14 @@
/* reallocation fails. */
/* */
FT_LOCAL_DEF( FT_Error )
- PS_Table_Add( PS_Table table,
+ ps_table_add( PS_Table table,
FT_Int idx,
void* object,
FT_Int length )
{
if ( idx < 0 || idx > table->max_elems )
{
- FT_ERROR(( "PS_Table_Add: invalid index\n" ));
+ FT_ERROR(( "ps_table_add: invalid index\n" ));
return PSaux_Err_Invalid_Argument;
}
@@ -197,7 +197,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* PS_Table_Done */
+ /* ps_table_done */
/* */
/* <Description> */
/* Finalizes a PS_TableRec (i.e., reallocate it to its current */
@@ -211,7 +211,7 @@
/* to the caller to clean it, or reference it in its own structures. */
/* */
FT_LOCAL_DEF( void )
- PS_Table_Done( PS_Table table )
+ ps_table_done( PS_Table table )
{
FT_Memory memory = table->memory;
FT_Error error;
@@ -235,7 +235,7 @@
FT_LOCAL_DEF( void )
- PS_Table_Release( PS_Table table )
+ ps_table_release( PS_Table table )
{
FT_Memory memory = table->memory;
@@ -266,7 +266,7 @@
FT_LOCAL_DEF( void )
- PS_Parser_SkipSpaces( PS_Parser parser )
+ ps_parser_skip_spaces( PS_Parser parser )
{
FT_Byte* cur = parser->cursor;
FT_Byte* limit = parser->limit;
@@ -286,7 +286,7 @@
FT_LOCAL_DEF( void )
- PS_Parser_SkipAlpha( PS_Parser parser )
+ ps_parser_skip_alpha( PS_Parser parser )
{
FT_Byte* cur = parser->cursor;
FT_Byte* limit = parser->limit;
@@ -306,8 +306,8 @@
FT_LOCAL_DEF( void )
- PS_Parser_ToToken( PS_Parser parser,
- T1_Token token )
+ ps_parser_to_token( PS_Parser parser,
+ T1_Token token )
{
FT_Byte* cur;
FT_Byte* limit;
@@ -320,7 +320,7 @@
token->limit = 0;
/* first of all, skip space */
- PS_Parser_SkipSpaces( parser );
+ ps_parser_skip_spaces( parser );
cur = parser->cursor;
limit = parser->limit;
@@ -389,17 +389,17 @@
FT_LOCAL_DEF( void )
- PS_Parser_ToTokenArray( PS_Parser parser,
- T1_Token tokens,
- FT_UInt max_tokens,
- FT_Int* pnum_tokens )
+ ps_parser_to_token_array( PS_Parser parser,
+ T1_Token tokens,
+ FT_UInt max_tokens,
+ FT_Int* pnum_tokens )
{
T1_TokenRec master;
*pnum_tokens = -1;
- PS_Parser_ToToken( parser, &master );
+ ps_parser_to_token( parser, &master );
if ( master.type == T1_TOKEN_TYPE_ARRAY )
{
FT_Byte* old_cursor = parser->cursor;
@@ -416,7 +416,7 @@
T1_TokenRec token;
- PS_Parser_ToToken( parser, &token );
+ ps_parser_to_token( parser, &token );
if ( !token.type )
break;
@@ -829,11 +829,11 @@
/* Load a simple field (i.e. non-table) into the current list of objects */
FT_LOCAL_DEF( FT_Error )
- PS_Parser_LoadField( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags )
+ ps_parser_load_field( PS_Parser parser,
+ const T1_Field field,
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags )
{
T1_TokenRec token;
FT_Byte* cur;
@@ -843,7 +843,7 @@
FT_Error error;
- PS_Parser_ToToken( parser, &token );
+ ps_parser_to_token( parser, &token );
if ( !token.type )
goto Fail;
@@ -858,15 +858,15 @@
T1_TokenRec token2;
FT_Byte* old_cur = parser->cursor;
FT_Byte* old_limit = parser->limit;
-
+
parser->cursor = token.start;
parser->limit = token.limit;
-
- PS_Parser_ToToken( parser, &token2 );
+
+ ps_parser_to_token( parser, &token2 );
parser->cursor = old_cur;
parser->limit = old_limit;
-
+
if ( token2.type == T1_TOKEN_TYPE_ARRAY )
goto FieldArray;
}
@@ -945,7 +945,7 @@
{
FT_Fixed temp[4];
FT_BBox* bbox = (FT_BBox*)q;
-
+
/* we need the '[' and ']' delimiters */
token.start--;
@@ -987,11 +987,11 @@
FT_LOCAL_DEF( FT_Error )
- PS_Parser_LoadFieldTable( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags )
+ ps_parser_load_field_table( PS_Parser parser,
+ const T1_Field field,
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags )
{
T1_TokenRec elements[T1_MAX_TABLE_ELEMENTS];
T1_Token token;
@@ -1008,7 +1008,7 @@
fieldrec.type = T1_FIELD_TYPE_FIXED;
#endif
- PS_Parser_ToTokenArray( parser, elements, 32, &num_elements );
+ ps_parser_to_token_array( parser, elements, 32, &num_elements );
if ( num_elements < 0 )
goto Fail;
@@ -1028,7 +1028,7 @@
{
parser->cursor = token->start;
parser->limit = token->limit;
- PS_Parser_LoadField( parser, &fieldrec, objects, max_objects, 0 );
+ ps_parser_load_field( parser, &fieldrec, objects, max_objects, 0 );
fieldrec.offset += fieldrec.size;
}
@@ -1052,24 +1052,24 @@
FT_LOCAL_DEF( FT_Long )
- PS_Parser_ToInt( PS_Parser parser )
+ ps_parser_to_int( PS_Parser parser )
{
return t1_toint( &parser->cursor, parser->limit );
}
FT_LOCAL_DEF( FT_Fixed )
- PS_Parser_ToFixed( PS_Parser parser,
- FT_Int power_ten )
+ ps_parser_to_fixed( PS_Parser parser,
+ FT_Int power_ten )
{
return t1_tofixed( &parser->cursor, parser->limit, power_ten );
}
FT_LOCAL_DEF( FT_Int )
- PS_Parser_ToCoordArray( PS_Parser parser,
- FT_Int max_coords,
- FT_Short* coords )
+ ps_parser_to_coord_array( PS_Parser parser,
+ FT_Int max_coords,
+ FT_Short* coords )
{
return t1_tocoordarray( &parser->cursor, parser->limit,
max_coords, coords );
@@ -1077,10 +1077,10 @@
FT_LOCAL_DEF( FT_Int )
- PS_Parser_ToFixedArray( PS_Parser parser,
- FT_Int max_values,
- FT_Fixed* values,
- FT_Int power_ten )
+ ps_parser_to_fixed_array( PS_Parser parser,
+ FT_Int max_values,
+ FT_Fixed* values,
+ FT_Int power_ten )
{
return t1_tofixedarray( &parser->cursor, parser->limit,
max_values, values, power_ten );
@@ -1106,7 +1106,7 @@
FT_LOCAL_DEF( void )
- PS_Parser_Init( PS_Parser parser,
+ ps_parser_init( PS_Parser parser,
FT_Byte* base,
FT_Byte* limit,
FT_Memory memory )
@@ -1121,7 +1121,7 @@
FT_LOCAL_DEF( void )
- PS_Parser_Done( PS_Parser parser )
+ ps_parser_done( PS_Parser parser )
{
FT_UNUSED( parser );
}
@@ -1138,7 +1138,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* T1_Builder_Init */
+ /* t1_builder_init */
/* */
/* <Description> */
/* Initializes a given glyph builder. */
@@ -1156,7 +1156,7 @@
/* hinting :: Whether hinting should be applied. */
/* */
FT_LOCAL_DEF( void )
- T1_Builder_Init( T1_Builder builder,
+ t1_builder_init( T1_Builder builder,
FT_Face face,
FT_Size size,
FT_GlyphSlot glyph,
@@ -1207,7 +1207,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* T1_Builder_Done */
+ /* t1_builder_done */
/* */
/* <Description> */
/* Finalizes a given glyph builder. Its contents can still be used */
@@ -1218,7 +1218,7 @@
/* builder :: A pointer to the glyph builder to finalize. */
/* */
FT_LOCAL_DEF( void )
- T1_Builder_Done( T1_Builder builder )
+ t1_builder_done( T1_Builder builder )
{
FT_GlyphSlot glyph = builder->glyph;
@@ -1230,7 +1230,7 @@
/* check that there is enough space for `count' more points */
FT_LOCAL_DEF( FT_Error )
- T1_Builder_Check_Points( T1_Builder builder,
+ t1_builder_check_points( T1_Builder builder,
FT_Int count )
{
return FT_GlyphLoader_CheckPoints( builder->loader, count, 0 );
@@ -1239,7 +1239,7 @@
/* add a new point, do not check space */
FT_LOCAL_DEF( void )
- T1_Builder_Add_Point( T1_Builder builder,
+ t1_builder_add_point( T1_Builder builder,
FT_Pos x,
FT_Pos y,
FT_Byte flag )
@@ -1260,7 +1260,7 @@
}
point->x = x;
point->y = y;
- *control = (FT_Byte)( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
+ *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
builder->last = *point;
}
@@ -1277,9 +1277,9 @@
FT_Error error;
- error = T1_Builder_Check_Points( builder, 1 );
+ error = t1_builder_check_points( builder, 1 );
if ( !error )
- T1_Builder_Add_Point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
return error;
}
@@ -1287,7 +1287,7 @@
/* check room for a new contour, then add it */
FT_LOCAL_DEF( FT_Error )
- T1_Builder_Add_Contour( T1_Builder builder )
+ t1_builder_add_contour( T1_Builder builder )
{
FT_Outline* outline = builder->current;
FT_Error error;
@@ -1315,7 +1315,7 @@
/* if a path was begun, add its first on-curve point */
FT_LOCAL_DEF( FT_Error )
- T1_Builder_Start_Point( T1_Builder builder,
+ t1_builder_start_point( T1_Builder builder,
FT_Pos x,
FT_Pos y )
{
@@ -1326,7 +1326,7 @@
if ( !builder->path_begun )
{
builder->path_begun = 1;
- error = T1_Builder_Add_Contour( builder );
+ error = t1_builder_add_contour( builder );
if ( !error )
error = T1_Builder_Add_Point1( builder, x, y );
}
@@ -1336,7 +1336,7 @@
/* close the current contour */
FT_LOCAL_DEF( void )
- T1_Builder_Close_Contour( T1_Builder builder )
+ t1_builder_close_contour( T1_Builder builder )
{
FT_Outline* outline = builder->current;
@@ -1360,7 +1360,7 @@
/* `delete' last point only if it coincides with the first */
/* point and it is not a control point (which can happen). */
if ( p1->x == p2->x && p1->y == p2->y )
- if ( *control == FT_Curve_Tag_On )
+ if ( *control == FT_CURVE_TAG_ON )
outline->n_points--;
}
@@ -1379,7 +1379,7 @@
/*************************************************************************/
FT_LOCAL_DEF( void )
- T1_Decrypt( FT_Byte* buffer,
+ t1_decrypt( FT_Byte* buffer,
FT_Offset length,
FT_UShort seed )
{
diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h
index f748085..6400b58 100644
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -47,22 +47,22 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- PS_Table_New( PS_Table table,
+ ps_table_new( PS_Table table,
FT_Int count,
FT_Memory memory );
FT_LOCAL( FT_Error )
- PS_Table_Add( PS_Table table,
+ ps_table_add( PS_Table table,
FT_Int idx,
void* object,
FT_Int length );
FT_LOCAL( void )
- PS_Table_Done( PS_Table table );
+ ps_table_done( PS_Table table );
FT_LOCAL( void )
- PS_Table_Release( PS_Table table );
+ ps_table_release( PS_Table table );
/*************************************************************************/
@@ -75,64 +75,64 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
- PS_Parser_SkipSpaces( PS_Parser parser );
+ ps_parser_skip_spaces( PS_Parser parser );
FT_LOCAL( void )
- PS_Parser_SkipAlpha( PS_Parser parser );
+ ps_parser_skip_alpha( PS_Parser parser );
FT_LOCAL( void )
- PS_Parser_ToToken( PS_Parser parser,
- T1_Token token );
+ ps_parser_to_token( PS_Parser parser,
+ T1_Token token );
FT_LOCAL( void )
- PS_Parser_ToTokenArray( PS_Parser parser,
- T1_Token tokens,
- FT_UInt max_tokens,
- FT_Int* pnum_tokens );
+ ps_parser_to_token_array( PS_Parser parser,
+ T1_Token tokens,
+ FT_UInt max_tokens,
+ FT_Int* pnum_tokens );
FT_LOCAL( FT_Error )
- PS_Parser_LoadField( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags );
+ ps_parser_load_field( PS_Parser parser,
+ const T1_Field field,
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags );
FT_LOCAL( FT_Error )
- PS_Parser_LoadFieldTable( PS_Parser parser,
- const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags );
+ ps_parser_load_field_table( PS_Parser parser,
+ const T1_Field field,
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags );
FT_LOCAL( FT_Long )
- PS_Parser_ToInt( PS_Parser parser );
+ ps_parser_to_int( PS_Parser parser );
FT_LOCAL( FT_Fixed )
- PS_Parser_ToFixed( PS_Parser parser,
- FT_Int power_ten );
+ ps_parser_to_fixed( PS_Parser parser,
+ FT_Int power_ten );
FT_LOCAL( FT_Int )
- PS_Parser_ToCoordArray( PS_Parser parser,
- FT_Int max_coords,
- FT_Short* coords );
+ ps_parser_to_coord_array( PS_Parser parser,
+ FT_Int max_coords,
+ FT_Short* coords );
FT_LOCAL( FT_Int )
- PS_Parser_ToFixedArray( PS_Parser parser,
- FT_Int max_values,
- FT_Fixed* values,
- FT_Int power_ten );
+ ps_parser_to_fixed_array( PS_Parser parser,
+ FT_Int max_values,
+ FT_Fixed* values,
+ FT_Int power_ten );
FT_LOCAL( void )
- PS_Parser_Init( PS_Parser parser,
+ ps_parser_init( PS_Parser parser,
FT_Byte* base,
FT_Byte* limit,
FT_Memory memory );
FT_LOCAL( void )
- PS_Parser_Done( PS_Parser parser );
+ ps_parser_done( PS_Parser parser );
/*************************************************************************/
@@ -144,21 +144,21 @@ FT_BEGIN_HEADER
/*************************************************************************/
FT_LOCAL( void )
- T1_Builder_Init( T1_Builder builder,
+ t1_builder_init( T1_Builder builder,
FT_Face face,
FT_Size size,
FT_GlyphSlot glyph,
FT_Bool hinting );
FT_LOCAL( void )
- T1_Builder_Done( T1_Builder builder );
+ t1_builder_done( T1_Builder builder );
FT_LOCAL( FT_Error )
- T1_Builder_Check_Points( T1_Builder builder,
+ t1_builder_check_points( T1_Builder builder,
FT_Int count );
FT_LOCAL( void )
- T1_Builder_Add_Point( T1_Builder builder,
+ t1_builder_add_point( T1_Builder builder,
FT_Pos x,
FT_Pos y,
FT_Byte flag );
@@ -169,17 +169,17 @@ FT_BEGIN_HEADER
FT_Pos y );
FT_LOCAL( FT_Error )
- T1_Builder_Add_Contour( T1_Builder builder );
+ t1_builder_add_contour( T1_Builder builder );
FT_LOCAL( FT_Error )
- T1_Builder_Start_Point( T1_Builder builder,
+ t1_builder_start_point( T1_Builder builder,
FT_Pos x,
FT_Pos y );
FT_LOCAL( void )
- T1_Builder_Close_Contour( T1_Builder builder );
+ t1_builder_close_contour( T1_Builder builder );
/*************************************************************************/
@@ -191,7 +191,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
FT_LOCAL( void )
- T1_Decrypt( FT_Byte* buffer,
+ t1_decrypt( FT_Byte* buffer,
FT_Offset length,
FT_UShort seed );
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 9615e1b..5abc8cf 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -247,7 +247,7 @@
/* set up remaining glyph fields */
glyph->num_subglyphs = 2;
glyph->subglyphs = loader->base.subglyphs;
- glyph->format = ft_glyph_format_composite;
+ glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
loader->current.num_subglyphs = 2;
goto Exit;
@@ -258,7 +258,7 @@
FT_GlyphLoader_Prepare( decoder->builder.loader ); /* prepare loader */
- error = T1_Decoder_Parse_Glyph( decoder, bchar_index );
+ error = t1_decoder_parse_glyph( decoder, bchar_index );
if ( error )
goto Exit;
@@ -280,7 +280,7 @@
/* Now load `achar' on top of */
/* the base outline */
- error = T1_Decoder_Parse_Glyph( decoder, achar_index );
+ error = t1_decoder_parse_glyph( decoder, achar_index );
if ( error )
goto Exit;
@@ -316,7 +316,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* T1_Decoder_Parse_Charstrings */
+ /* t1_decoder_parse_charstrings */
/* */
/* <Description> */
/* Parses a given Type 1 charstrings program. */
@@ -332,7 +332,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- T1_Decoder_Parse_Charstrings( T1_Decoder decoder,
+ t1_decoder_parse_charstrings( T1_Decoder decoder,
FT_Byte* charstring_base,
FT_UInt charstring_len )
{
@@ -347,12 +347,12 @@
/* we don't want to touch the source code -- use macro trick */
-#define start_point T1_Builder_Start_Point
-#define check_points T1_Builder_Check_Points
-#define add_point T1_Builder_Add_Point
+#define start_point t1_builder_start_point
+#define check_points t1_builder_check_points
+#define add_point t1_builder_add_point
#define add_point1 T1_Builder_Add_Point1
-#define add_contour T1_Builder_Add_Contour
-#define close_contour T1_Builder_Close_Contour
+#define add_contour t1_builder_add_contour
+#define close_contour t1_builder_close_contour
/* First of all, initialize the decoder */
decoder->top = decoder->stack;
@@ -453,7 +453,7 @@
case 12:
if ( ip > limit )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid escape (12+EOF)\n" ));
goto Syntax_Error;
}
@@ -489,7 +489,7 @@
break;
default:
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid escape (12+%d)\n",
ip[-1] ));
goto Syntax_Error;
@@ -499,7 +499,7 @@
case 255: /* four bytes integer */
if ( ip + 4 > limit )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"unexpected EOF in integer\n" ));
goto Syntax_Error;
}
@@ -520,7 +520,7 @@
{
if ( ++ip > limit )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "unexpected EOF in integer\n" ));
goto Syntax_Error;
}
@@ -533,7 +533,7 @@
}
else
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid byte (%d)\n", ip[-1] ));
goto Syntax_Error;
}
@@ -548,7 +548,7 @@
{
if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: stack overflow!\n" ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: stack overflow!\n" ));
goto Syntax_Error;
}
@@ -605,7 +605,7 @@
if ( decoder->flex_state == 0 ||
decoder->num_flex_vectors != 7 )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"unexpected flex end\n" ));
goto Syntax_Error;
}
@@ -616,7 +616,7 @@
ip[2] != 12 || ip[3] != 17 || /* pop */
ip[4] != 12 || ip[5] != 33 ) /* setcurpoint */
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid flex charstring\n" ));
goto Syntax_Error;
}
@@ -632,14 +632,14 @@
/* eat the following `pop' */
if ( ip + 2 > limit )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid escape (12+%d)\n", ip[-1] ));
goto Syntax_Error;
}
if ( ip[0] != 12 || ip[1] != 17 )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "`pop' expected, found (%d %d)\n", ip[0], ip[1] ));
goto Syntax_Error;
}
@@ -670,7 +670,7 @@
if ( !blend )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "unexpected multiple masters operator!\n" ));
goto Syntax_Error;
}
@@ -678,7 +678,7 @@
num_points = top[1] - 13 + ( top[1] == 18 );
if ( top[0] != (FT_Int)( num_points * blend->num_designs ) )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "incorrect number of mm arguments\n" ));
goto Syntax_Error;
}
@@ -720,7 +720,7 @@
default:
Unexpected_OtherSubr:
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid othersubr [%d %d]!\n", top[0], top[1] ));
goto Syntax_Error;
}
@@ -933,7 +933,7 @@
}
else
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: division by 0\n" ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: division by 0\n" ));
goto Syntax_Error;
}
break;
@@ -948,14 +948,14 @@
idx = top[0];
if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invalid subrs index\n" ));
goto Syntax_Error;
}
if ( zone - decoder->zones >= T1_MAX_SUBRS_CALLS )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"too many nested subrs\n" ));
goto Syntax_Error;
}
@@ -983,7 +983,7 @@
if ( !zone->base )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"invoking empty subrs!\n" ));
goto Syntax_Error;
}
@@ -1006,7 +1006,7 @@
if ( zone <= decoder->zones )
{
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: unexpected return\n" ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: unexpected return\n" ));
goto Syntax_Error;
}
@@ -1073,12 +1073,12 @@
case op_setcurrentpoint:
FT_TRACE4(( " setcurrentpoint" ));
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+ FT_ERROR(( "t1_decoder_parse_charstrings: " ));
FT_ERROR(( "unexpected `setcurrentpoint'\n" ));
goto Syntax_Error;
default:
- FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+ FT_ERROR(( "t1_decoder_parse_charstrings: "
"unhandled opcode %d\n", op ));
goto Syntax_Error;
}
@@ -1106,7 +1106,7 @@
/* parse a single Type 1 glyph */
FT_LOCAL_DEF( FT_Error )
- T1_Decoder_Parse_Glyph( T1_Decoder decoder,
+ t1_decoder_parse_glyph( T1_Decoder decoder,
FT_UInt glyph )
{
return decoder->parse_callback( decoder, glyph );
@@ -1115,7 +1115,7 @@
/* initialize T1 decoder */
FT_LOCAL_DEF( FT_Error )
- T1_Decoder_Init( T1_Decoder decoder,
+ t1_decoder_init( T1_Decoder decoder,
FT_Face face,
FT_Size size,
FT_GlyphSlot slot,
@@ -1135,7 +1135,7 @@
FT_FACE_LIBRARY(face), "psnames" );
if ( !psnames )
{
- FT_ERROR(( "T1_Decoder_Init: " ));
+ FT_ERROR(( "t1_decoder_init: " ));
FT_ERROR(( "the `psnames' module is not available\n" ));
return PSaux_Err_Unimplemented_Feature;
}
@@ -1143,7 +1143,7 @@
decoder->psnames = psnames;
}
- T1_Builder_Init( &decoder->builder, face, size, slot, hinting );
+ t1_builder_init( &decoder->builder, face, size, slot, hinting );
decoder->num_glyphs = face->num_glyphs;
decoder->glyph_names = glyph_names;
@@ -1159,9 +1159,9 @@
/* finalize T1 decoder */
FT_LOCAL_DEF( void )
- T1_Decoder_Done( T1_Decoder decoder )
+ t1_decoder_done( T1_Decoder decoder )
{
- T1_Builder_Done( &decoder->builder );
+ t1_builder_done( &decoder->builder );
}
diff --git a/src/psaux/t1decode.h b/src/psaux/t1decode.h
index 70fe647..4540d4a 100644
--- a/src/psaux/t1decode.h
+++ b/src/psaux/t1decode.h
@@ -34,16 +34,16 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- T1_Decoder_Parse_Glyph( T1_Decoder decoder,
+ t1_decoder_parse_glyph( T1_Decoder decoder,
FT_UInt glyph_index );
FT_LOCAL( FT_Error )
- T1_Decoder_Parse_Charstrings( T1_Decoder decoder,
+ t1_decoder_parse_charstrings( T1_Decoder decoder,
FT_Byte* base,
FT_UInt len );
FT_LOCAL( FT_Error )
- T1_Decoder_Init( T1_Decoder decoder,
+ t1_decoder_init( T1_Decoder decoder,
FT_Face face,
FT_Size size,
FT_GlyphSlot slot,
@@ -53,7 +53,7 @@ FT_BEGIN_HEADER
T1_Decoder_Callback parse_glyph );
FT_LOCAL( void )
- T1_Decoder_Done( T1_Decoder decoder );
+ t1_decoder_done( T1_Decoder decoder );
FT_END_HEADER
diff --git a/src/pshinter/pshalgo2.c b/src/pshinter/pshalgo2.c
index 8de30a4..65ff454 100644
--- a/src/pshinter/pshalgo2.c
+++ b/src/pshinter/pshalgo2.c
@@ -927,7 +927,7 @@
FT_Pos dxi, dyi, dxo, dyo;
- if ( !( outline->tags[n] & FT_Curve_Tag_On ) )
+ if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) )
point->flags = PSH2_POINT_OFF;
dxi = vec[n].x - vec[n_prev].x;
diff --git a/src/pshinter/pshalgo3.c b/src/pshinter/pshalgo3.c
index 4bb4958..90009a5 100644
--- a/src/pshinter/pshalgo3.c
+++ b/src/pshinter/pshalgo3.c
@@ -968,7 +968,7 @@
FT_Pos dxi, dyi, dxo, dyo;
- if ( !( outline->tags[n] & FT_Curve_Tag_On ) )
+ if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) )
point->flags = PSH3_POINT_OFF;
dxi = vec[n].x - vec[n_prev].x;
@@ -1374,7 +1374,7 @@
{
FT_Pos delta;
-
+
if ( psh3_point_is_edge_min( point ) )
{
point->cur_u = hint->cur_pos;
@@ -1714,7 +1714,7 @@
{
/* load outline coordinates into glyph */
psh3_glyph_load_points( glyph, dimension );
-
+
/* compute local extrema */
psh3_glyph_compute_extrema( glyph );
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index a0e0386..758de2c 100644
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -37,7 +37,7 @@
/* the name, as in `A.swash' or `e.final', etc. */
/* */
static FT_ULong
- PS_Unicode_Value( const char* glyph_name )
+ ps_unicode_value( const char* glyph_name )
{
FT_Int n;
char first = glyph_name[0];
@@ -139,7 +139,7 @@
/* Builds a table that maps Unicode values to glyph indices */
static FT_Error
- PS_Build_Unicode_Table( FT_Memory memory,
+ ps_build_unicode_table( FT_Memory memory,
FT_UInt num_glyphs,
const char** glyph_names,
PS_Unicodes* table )
@@ -168,7 +168,7 @@
if ( gname )
{
- uni_char = PS_Unicode_Value( gname );
+ uni_char = ps_unicode_value( gname );
if ( uni_char != 0 && uni_char != 0xFFFF )
{
@@ -205,7 +205,7 @@
static FT_UInt
- PS_Lookup_Unicode( PS_Unicodes* table,
+ ps_lookup_unicode( PS_Unicodes* table,
FT_ULong unicode )
{
PS_UniMap *min, *max, *mid;
@@ -236,7 +236,7 @@
static FT_ULong
- PS_Next_Unicode( PS_Unicodes* table,
+ ps_next_unicode( PS_Unicodes* table,
FT_ULong unicode )
{
PS_UniMap *min, *max, *mid;
@@ -265,7 +265,7 @@
if ( max < table->maps )
max = table->maps;
-
+
while ( max < table->maps + table->num_maps )
{
if ( unicode < max->unicode )
@@ -281,7 +281,7 @@
static const char*
- PS_Macintosh_Name( FT_UInt name_index )
+ ps_get_macintosh_name( FT_UInt name_index )
{
if ( name_index >= 258 )
name_index = 0;
@@ -291,7 +291,7 @@
static const char*
- PS_Standard_Strings( FT_UInt sid )
+ ps_get_standard_strings( FT_UInt sid )
{
return ( sid < NUM_SID_GLYPHS ? sid_standard_names[sid] : 0 );
}
@@ -302,9 +302,9 @@
{
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- (PS_Unicode_Value_Func) PS_Unicode_Value,
- (PS_Build_Unicodes_Func) PS_Build_Unicode_Table,
- (PS_Lookup_Unicode_Func) PS_Lookup_Unicode,
+ (PS_Unicode_Value_Func) ps_unicode_value,
+ (PS_Build_Unicodes_Func) ps_build_unicode_table,
+ (PS_Lookup_Unicode_Func) ps_lookup_unicode,
#else
@@ -314,14 +314,14 @@
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
- (PS_Macintosh_Name_Func) PS_Macintosh_Name,
- (PS_Adobe_Std_Strings_Func)PS_Standard_Strings,
+ (PS_Macintosh_Name_Func) ps_get_macintosh_name,
+ (PS_Adobe_Std_Strings_Func) ps_get_standard_strings,
t1_standard_encoding,
t1_expert_encoding,
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- (PS_Next_Unicode_Func) PS_Next_Unicode
+ (PS_Next_Unicode_Func) ps_next_unicode
#else
0
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index a897b28..0967947 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -1635,14 +1635,14 @@
tag = FT_CURVE_TAG( tags[0] );
/* A contour cannot start with a cubic control point! */
- if ( tag == FT_Curve_Tag_Cubic )
+ if ( tag == FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
/* check first point to determine origin */
- if ( tag == FT_Curve_Tag_Conic )
+ if ( tag == FT_CURVE_TAG_CONIC )
{
/* first point is conic control. Yes, this happens. */
- if ( FT_CURVE_TAG( ras.outline.tags[last] ) == FT_Curve_Tag_On )
+ if ( FT_CURVE_TAG( ras.outline.tags[last] ) == FT_CURVE_TAG_ON )
{
/* start at last point if it is on the curve */
v_start = v_last;
@@ -1674,7 +1674,7 @@
switch ( tag )
{
- case FT_Curve_Tag_On: /* emit a single line_to */
+ case FT_CURVE_TAG_ON: /* emit a single line_to */
{
Long x, y;
@@ -1689,7 +1689,7 @@
continue;
}
- case FT_Curve_Tag_Conic: /* consume conic arcs */
+ case FT_CURVE_TAG_CONIC: /* consume conic arcs */
v_control.x = SCALED( point[0].x );
v_control.y = SCALED( point[0].y );
@@ -1713,14 +1713,14 @@
if ( flipped )
SWAP_( x, y );
- if ( tag == FT_Curve_Tag_On )
+ if ( tag == FT_CURVE_TAG_ON )
{
if ( Conic_To( RAS_VARS v_control.x, v_control.y, x, y ) )
goto Fail;
continue;
}
- if ( tag != FT_Curve_Tag_Conic )
+ if ( tag != FT_CURVE_TAG_CONIC )
goto Invalid_Outline;
v_middle.x = ( v_control.x + x ) / 2;
@@ -1742,13 +1742,13 @@
goto Close;
- default: /* FT_Curve_Tag_Cubic */
+ default: /* FT_CURVE_TAG_CUBIC */
{
Long x1, y1, x2, y2, x3, y3;
if ( point + 1 > limit ||
- FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+ FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
point += 2;
@@ -2972,11 +2972,11 @@
Set_High_Precision( RAS_VARS ras.outline.flags &
- ft_outline_high_precision );
+ FT_OUTLINE_HIGH_PRECISION );
ras.scale_shift = ras.precision_shift;
ras.dropOutControl = 2;
ras.second_pass = (FT_Byte)( !( ras.outline.flags &
- ft_outline_single_pass ) );
+ FT_OUTLINE_SINGLE_PASS ) );
/* Vertical Sweep */
ras.Proc_Sweep_Init = Vertical_Sweep_Init;
@@ -3036,10 +3036,10 @@
Set_High_Precision( RAS_VARS ras.outline.flags &
- ft_outline_high_precision );
+ FT_OUTLINE_HIGH_PRECISION );
ras.scale_shift = ras.precision_shift + 1;
ras.dropOutControl = 2;
- ras.second_pass = !( ras.outline.flags & ft_outline_single_pass );
+ ras.second_pass = !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS );
/* Vertical Sweep */
@@ -3259,7 +3259,7 @@
return Raster_Err_Invalid;
/* this version of the raster does not support direct rendering, sorry */
- if ( params->flags & ft_raster_flag_direct )
+ if ( params->flags & FT_RASTER_FLAG_DIRECT )
return Raster_Err_Unsupported;
if ( !target_map || !target_map->buffer )
@@ -3268,7 +3268,7 @@
ras.outline = *outline;
ras.target = *target_map;
- return ( ( params->flags & ft_raster_flag_aa )
+ return ( ( params->flags & FT_RASTER_FLAG_AA )
? Render_Gray_Glyph( raster )
: Render_Glyph( raster ) );
}
@@ -3276,7 +3276,7 @@
const FT_Raster_Funcs ft_standard_raster =
{
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
(FT_Raster_New_Func) ft_black_new,
(FT_Raster_Reset_Func) ft_black_reset,
(FT_Raster_Set_Mode_Func)ft_black_set_mode,
diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index 83c22d2..c375d58 100644
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -118,7 +118,7 @@
}
/* check rendering mode */
- if ( mode != ft_render_mode_mono )
+ if ( mode != FT_RENDER_MODE_MONO )
{
/* raster1 is only capable of producing monochrome bitmaps */
if ( render->clazz == &ft_raster1_renderer_class )
@@ -158,17 +158,17 @@
}
/* allocate new one, depends on pixel format */
- if ( !( mode & ft_render_mode_mono ) )
+ if ( !( mode & FT_RENDER_MODE_MONO ) )
{
/* we pad to 32 bits, only for backwards compatibility with FT 1.x */
pitch = ( width + 3 ) & -4;
- bitmap->pixel_mode = ft_pixel_mode_grays;
+ bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
bitmap->num_grays = 256;
}
else
{
pitch = ( ( width + 15 ) >> 4 ) << 1;
- bitmap->pixel_mode = ft_pixel_mode_mono;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
}
bitmap->width = width;
@@ -188,8 +188,8 @@
params.source = outline;
params.flags = 0;
- if ( bitmap->pixel_mode == ft_pixel_mode_grays )
- params.flags |= ft_raster_flag_aa;
+ if ( bitmap->pixel_mode == FT_PIXEL_MODE_GRAY )
+ params.flags |= FT_RASTER_FLAG_AA;
/* render outline into the bitmap */
error = render->raster_render( render->raster, ¶ms );
@@ -199,7 +199,7 @@
if ( error )
goto Exit;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
slot->bitmap_left = cbox.xMin >> 6;
slot->bitmap_top = cbox.yMax >> 6;
@@ -226,12 +226,12 @@
(FT_Module_Requester) 0
},
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
- (FTRenderer_render) ft_raster1_render,
- (FTRenderer_transform)ft_raster1_transform,
- (FTRenderer_getCBox) ft_raster1_get_cbox,
- (FTRenderer_setMode) ft_raster1_set_mode,
+ (FT_Renderer_RenderFunc) ft_raster1_render,
+ (FT_Renderer_TransformFunc)ft_raster1_transform,
+ (FT_Renderer_GetCBoxFunc) ft_raster1_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_raster1_set_mode,
(FT_Raster_Funcs*) &ft_standard_raster
};
@@ -259,12 +259,12 @@
(FT_Module_Requester) 0
},
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
- (FTRenderer_render) ft_raster1_render,
- (FTRenderer_transform)ft_raster1_transform,
- (FTRenderer_getCBox) ft_raster1_get_cbox,
- (FTRenderer_setMode) ft_raster1_set_mode,
+ (FT_Renderer_RenderFunc) ft_raster1_render,
+ (FT_Renderer_TransformFunc)ft_raster1_transform,
+ (FT_Renderer_GetCBoxFunc) ft_raster1_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_raster1_set_mode,
(FT_Raster_Funcs*) &ft_standard_raster
};
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 6411d91..f2fa7b4 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -92,7 +92,7 @@
FT_Error error;
- error = TT_Get_PS_Name( face, glyph_index, &gname );
+ error = tt_face_get_ps_name( face, glyph_index, &gname );
if ( !error && buffer_max > 0 )
{
FT_UInt len = (FT_UInt)( ft_strlen( gname ) );
@@ -220,7 +220,7 @@
FT_CALLBACK_DEF( FT_Module_Interface )
- SFNT_Get_Interface( FT_Module module,
+ sfnt_get_interface( FT_Module module,
const char* module_interface )
{
FT_UNUSED( module );
@@ -243,44 +243,44 @@
static
const SFNT_Interface sfnt_interface =
{
- TT_Goto_Table,
+ tt_face_goto_table,
- SFNT_Init_Face,
- SFNT_Load_Face,
- SFNT_Done_Face,
- SFNT_Get_Interface,
+ sfnt_init_face,
+ sfnt_load_face,
+ sfnt_done_face,
+ sfnt_get_interface,
- TT_Load_Any,
- TT_Load_SFNT_Header,
- TT_Load_Directory,
+ tt_face_load_any,
+ tt_face_load_sfnt_header,
+ tt_face_load_directory,
- TT_Load_Header,
- TT_Load_Metrics_Header,
- TT_Load_CMap,
- TT_Load_MaxProfile,
- TT_Load_OS2,
- TT_Load_PostScript,
+ tt_face_load_header,
+ tt_face_load_metrics_header,
+ tt_face_load_cmap,
+ tt_face_load_max_profile,
+ tt_face_load_os2,
+ tt_face_load_postscript,
- TT_Load_Names,
- TT_Free_Names,
+ tt_face_load_names,
+ tt_face_free_names,
- TT_Load_Hdmx,
- TT_Free_Hdmx,
+ tt_face_load_hdmx,
+ tt_face_free_hdmx,
- TT_Load_Kern,
- TT_Load_Gasp,
- TT_Load_PCLT,
+ tt_face_load_kern,
+ tt_face_load_gasp,
+ tt_face_load_pclt,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
/* see `ttload.h' */
- TT_Load_Bitmap_Header,
+ tt_face_load_bitmap_header,
/* see `ttsbit.h' */
- TT_Set_SBit_Strike,
- TT_Load_SBit_Strikes,
- TT_Load_SBit_Image,
- TT_Free_SBit_Strikes,
+ tt_face_set_sbit_strike,
+ tt_face_load_sbit_strikes,
+ tt_face_load_sbit_image,
+ tt_face_free_sbit_strikes,
#else /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -295,8 +295,8 @@
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/* see `ttpost.h' */
- TT_Get_PS_Name,
- TT_Free_Post_Names,
+ tt_face_get_ps_name,
+ tt_face_free_ps_names,
#else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
@@ -306,8 +306,8 @@
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
/* see `ttcmap.h' */
- TT_CharMap_Load,
- TT_CharMap_Free,
+ tt_face_load_charmap,
+ tt_face_free_charmap,
};
@@ -325,7 +325,7 @@
(FT_Module_Constructor)0,
(FT_Module_Destructor) 0,
- (FT_Module_Requester) SFNT_Get_Interface
+ (FT_Module_Requester) sfnt_get_interface
};
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index ff7a5d8..dac6c18 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -296,20 +296,20 @@
static
const TEncoding tt_encodings[] =
{
- { TT_PLATFORM_ISO, -1, ft_encoding_unicode },
+ { TT_PLATFORM_ISO, -1, FT_ENCODING_UNICODE },
- { TT_PLATFORM_APPLE_UNICODE, -1, ft_encoding_unicode },
+ { TT_PLATFORM_APPLE_UNICODE, -1, FT_ENCODING_UNICODE },
- { TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, ft_encoding_apple_roman },
+ { TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, FT_ENCODING_APPLE_ROMAN },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS, ft_encoding_symbol },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, ft_encoding_unicode },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, ft_encoding_unicode },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, ft_encoding_sjis },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, ft_encoding_gb2312 },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, ft_encoding_big5 },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, ft_encoding_wansung },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, ft_encoding_johab }
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS, FT_ENCODING_MS_SYMBOL },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, FT_ENCODING_UNICODE },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_MS_SJIS },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_MS_GB2312 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_MS_BIG5 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_MS_WANSUNG },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_MS_JOHAB }
};
const TEncoding *cur, *limit;
@@ -328,12 +328,12 @@
}
}
- return ft_encoding_none;
+ return FT_ENCODING_NONE;
}
FT_LOCAL_DEF( FT_Error )
- SFNT_Init_Face( FT_Stream stream,
+ sfnt_init_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -397,7 +397,7 @@
FT_LOCAL_DEF( FT_Error )
- SFNT_Load_Face( FT_Stream stream,
+ sfnt_load_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -434,11 +434,11 @@
/* do we have outlines in there? */
#ifdef FT_CONFIG_OPTION_INCREMENTAL
has_outline = FT_BOOL( face->root.internal->incremental_interface != 0 ||
- TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
- TT_LookUp_Table( face, TTAG_CFF ) != 0 );
+ tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
+ tt_face_lookup_table( face, TTAG_CFF ) != 0 );
#else
- has_outline = FT_BOOL( TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
- TT_LookUp_Table( face, TTAG_CFF ) != 0 );
+ has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
+ tt_face_lookup_table( face, TTAG_CFF ) != 0 );
#endif
is_apple_sbit = 0;
@@ -585,7 +585,7 @@
/* encoding ID of each charmap. */
/* */
- TT_Build_CMaps( face ); /* ignore errors */
+ tt_face_build_cmaps( face ); /* ignore errors */
/* set the encoding fields */
@@ -603,7 +603,7 @@
#if 0
if ( root->charmap == NULL &&
- charmap->encoding == ft_encoding_unicode )
+ charmap->encoding == FT_ENCODING_UNICODE )
{
/* set 'root->charmap' to the first Unicode encoding we find */
root->charmap = charmap;
@@ -753,7 +753,7 @@
FT_LOCAL_DEF( void )
- SFNT_Done_Face( TT_Face face )
+ sfnt_done_face( TT_Face face )
{
FT_Memory memory = face->root.memory;
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
diff --git a/src/sfnt/sfobjs.h b/src/sfnt/sfobjs.h
index f30c198..6241c93 100644
--- a/src/sfnt/sfobjs.h
+++ b/src/sfnt/sfobjs.h
@@ -29,21 +29,21 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- SFNT_Init_Face( FT_Stream stream,
+ sfnt_init_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params );
FT_LOCAL( FT_Error )
- SFNT_Load_Face( FT_Stream stream,
+ sfnt_load_face( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params );
FT_LOCAL( void )
- SFNT_Done_Face( TT_Face face );
+ sfnt_done_face( TT_Face face );
FT_END_HEADER
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 5d0a61a..a5f9cd1 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -86,7 +86,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_CharMap_Load */
+ /* tt_face_load_charmap */
/* */
/* <Description> */
/* Loads a given TrueType character map into memory. */
@@ -108,9 +108,9 @@
/* released. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_CharMap_Load( TT_Face face,
- TT_CMapTable cmap,
- FT_Stream stream )
+ tt_face_load_charmap( TT_Face face,
+ TT_CMapTable cmap,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory;
@@ -391,7 +391,7 @@
return SFNT_Err_Ok;
Fail:
- TT_CharMap_Free( face, cmap );
+ tt_face_free_charmap( face, cmap );
return error;
}
@@ -399,7 +399,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_CharMap_Free */
+ /* tt_face_free_charmap */
/* */
/* <Description> */
/* Destroys a character mapping table. */
@@ -413,8 +413,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_CharMap_Free( TT_Face face,
- TT_CMapTable cmap )
+ tt_face_free_charmap( TT_Face face,
+ TT_CMapTable cmap )
{
FT_Memory memory;
@@ -633,7 +633,7 @@
{
char_lo = (FT_UInt)( charCode & 0xFF );
char_hi = charCode >> 8;
-
+
if ( char_hi == 0 )
{
/* an 8-bit character code -- we use the subHeader 0 in this case */
@@ -655,16 +655,16 @@
continue;
}
}
-
+
sh2 = cmap2->subHeaders + index1;
char_lo -= sh2->firstCode;
-
+
if ( char_lo > (FT_UInt)sh2->entryCount )
{
charCode = ( char_hi + 1 ) << 8;
continue;
}
-
+
offset = sh2->idRangeOffset / 2 + char_lo;
if ( offset >= (FT_UInt)cmap2->numGlyphId ||
cmap2->glyphIdArray[offset] == 0 )
@@ -672,7 +672,7 @@
charCode++;
continue;
}
-
+
return charCode;
}
return 0;
@@ -813,7 +813,7 @@
if ( seg4->idRangeOffset == 0 )
return ( charCode );
-
+
while ( charCode <= (FT_UInt) seg4->endCount )
{
/* otherwise, we must use the glyphIdArray to do it */
@@ -890,12 +890,12 @@
charCode++;
-
+
cmap6 = &cmap->c.cmap6;
-
+
if ( charCode < (FT_ULong) cmap6->firstCode )
charCode = cmap6->firstCode;
-
+
charCode -= cmap6->firstCode;
while ( charCode < (FT_UInt)cmap6->entryCount )
@@ -1016,7 +1016,7 @@
Found:
if ( charCode < group->startCharCode )
charCode = group->startCharCode;
-
+
return charCode;
}
@@ -1085,10 +1085,10 @@
charCode++;
cmap10 = &cmap->c.cmap10;
-
+
if ( charCode < cmap10->startCharCode )
charCode = cmap10->startCharCode;
-
+
charCode -= cmap10->startCharCode;
/* the overflow trick for comparison works here also since the number */
diff --git a/src/sfnt/ttcmap.h b/src/sfnt/ttcmap.h
index 6ddb79e..cd19a6b 100644
--- a/src/sfnt/ttcmap.h
+++ b/src/sfnt/ttcmap.h
@@ -28,13 +28,13 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_CharMap_Load( TT_Face face,
- TT_CMapTable cmap,
- FT_Stream input );
+ tt_face_load_charmap( TT_Face face,
+ TT_CMapTable cmap,
+ FT_Stream input );
FT_LOCAL( FT_Error )
- TT_CharMap_Free( TT_Face face,
- TT_CMapTable cmap );
+ tt_face_free_charmap( TT_Face face,
+ TT_CMapTable cmap );
FT_END_HEADER
diff --git a/src/sfnt/ttcmap0.c b/src/sfnt/ttcmap0.c
index 2940ac3..3d0f0aa 100644
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -1666,7 +1666,7 @@
/* in the current face */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Build_CMaps( TT_Face face )
+ tt_face_build_cmaps( TT_Face face )
{
FT_Byte* table = face->cmap_table;
FT_Byte* limit = table + face->cmap_size;
@@ -1681,7 +1681,7 @@
if ( TT_NEXT_USHORT( p ) != 0 )
{
p -= 2;
- FT_ERROR(( "TT_Build_CMaps: unsupported `cmap' table format = %d\n",
+ FT_ERROR(( "tt_face_build_cmaps: unsupported `cmap' table format = %d\n",
TT_PEEK_USHORT( p ) ));
return FT_Err_Invalid_Table;
}
@@ -1697,7 +1697,7 @@
charmap.platform_id = TT_NEXT_USHORT( p );
charmap.encoding_id = TT_NEXT_USHORT( p );
charmap.face = FT_FACE( face );
- charmap.encoding = ft_encoding_none; /* will be filled later */
+ charmap.encoding = FT_ENCODING_NONE; /* will be filled later */
offset = TT_NEXT_ULONG( p );
if ( offset && table + offset + 2 < limit )
@@ -1731,7 +1731,7 @@
(void)FT_CMap_New( (FT_CMap_Class)clazz, cmap, &charmap, NULL );
else
{
- FT_ERROR(( "TT_Build_CMaps:" ));
+ FT_ERROR(( "tt_face_build_cmaps:" ));
FT_ERROR(( " broken cmap sub-table ignored!\n" ));
}
}
diff --git a/src/sfnt/ttcmap0.h b/src/sfnt/ttcmap0.h
index efead24..ff1276e 100644
--- a/src/sfnt/ttcmap0.h
+++ b/src/sfnt/ttcmap0.h
@@ -63,7 +63,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_Build_CMaps( TT_Face face );
+ tt_face_build_cmaps( TT_Face face );
FT_END_HEADER
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 3e39a49..5a828f0 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -40,7 +40,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_LookUp_Table */
+ /* tt_face_lookup_table */
/* */
/* <Description> */
/* Looks for a TrueType table by name. */
@@ -54,14 +54,14 @@
/* A pointer to the table directory entry. 0 if not found. */
/* */
FT_LOCAL_DEF( TT_Table )
- TT_LookUp_Table( TT_Face face,
- FT_ULong tag )
+ tt_face_lookup_table( TT_Face face,
+ FT_ULong tag )
{
TT_Table entry;
TT_Table limit;
- FT_TRACE3(( "TT_LookUp_Table: %08p, `%c%c%c%c' -- ",
+ FT_TRACE3(( "tt_face_lookup_table: %08p, `%c%c%c%c' -- ",
face,
(FT_Char)( tag >> 24 ),
(FT_Char)( tag >> 16 ),
@@ -90,7 +90,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Goto_Table */
+ /* tt_face_goto_table */
/* */
/* <Description> */
/* Looks for a TrueType table by name, then seek a stream to it. */
@@ -109,16 +109,16 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Goto_Table( TT_Face face,
- FT_ULong tag,
- FT_Stream stream,
- FT_ULong* length )
+ tt_face_goto_table( TT_Face face,
+ FT_ULong tag,
+ FT_Stream stream,
+ FT_ULong* length )
{
TT_Table table;
FT_Error error;
- table = TT_LookUp_Table( face, tag );
+ table = tt_face_lookup_table( face, tag );
if ( table )
{
if ( length )
@@ -239,7 +239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SFNT_Header */
+ /* tt_face_load_sfnt_header */
/* */
/* <Description> */
/* Loads the header of a SFNT font file. Supports collections. */
@@ -267,10 +267,10 @@
/* values of `search_range', `entry_selector', and `range_shift'. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SFNT_Header( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header sfnt )
+ tt_face_load_sfnt_header( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header sfnt )
{
FT_Error error;
FT_ULong format_tag, offset;
@@ -301,7 +301,7 @@
};
- FT_TRACE2(( "TT_Load_SFNT_Header: %08p, %ld\n",
+ FT_TRACE2(( "tt_face_load_sfnt_header: %08p, %ld\n",
face, face_index ));
face->ttc_header.tag = 0;
@@ -324,7 +324,7 @@
FT_Int n;
- FT_TRACE3(( "TT_Load_SFNT_Header: file is a collection\n" ));
+ FT_TRACE3(( "tt_face_load_sfnt_header: file is a collection\n" ));
/* It is a TrueType collection, i.e. a file containing several */
/* font files. Read the font directory now */
@@ -367,7 +367,7 @@
error = sfnt_dir_check( stream, offset, sfnt->num_tables );
if ( error )
{
- FT_TRACE2(( "TT_Load_SFNT_Header: file is not SFNT!\n" ));
+ FT_TRACE2(( "tt_face_load_sfnt_header: file is not SFNT!\n" ));
error = SFNT_Err_Unknown_File_Format;
}
@@ -379,7 +379,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Directory */
+ /* tt_face_load_directory */
/* */
/* <Description> */
/* Loads the table directory into a face object. */
@@ -399,9 +399,9 @@
/* The stream cursor must be at the font file's origin. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Directory( TT_Face face,
- FT_Stream stream,
- SFNT_Header sfnt )
+ tt_face_load_directory( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header sfnt )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -409,7 +409,7 @@
TT_TableRec *entry, *limit;
- FT_TRACE2(( "TT_Load_Directory: %08p\n", face ));
+ FT_TRACE2(( "tt_face_load_directory: %08p\n", face ));
FT_TRACE2(( "-- Tables count: %12u\n", sfnt->num_tables ));
FT_TRACE2(( "-- Format version: %08lx\n", sfnt->format_tag ));
@@ -454,7 +454,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Any */
+ /* tt_face_load_any */
/* */
/* <Description> */
/* Loads any font table into client memory. */
@@ -492,11 +492,11 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Any( TT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length )
+ tt_face_load_any( TT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length )
{
FT_Error error;
FT_Stream stream;
@@ -507,7 +507,7 @@
if ( tag != 0 )
{
/* look for tag in font directory */
- table = TT_LookUp_Table( face, tag );
+ table = tt_face_lookup_table( face, tag );
if ( !table )
{
error = SFNT_Err_Table_Missing;
@@ -544,7 +544,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Generic_Header */
+ /* tt_face_load_generic_header */
/* */
/* <Description> */
/* Loads the TrueType table `head' or `bhed'. */
@@ -558,7 +558,7 @@
/* FreeType error code. 0 means success. */
/* */
static FT_Error
- TT_Load_Generic_Header( TT_Face face,
+ tt_face_load_generic_header( TT_Face face,
FT_Stream stream,
FT_ULong tag )
{
@@ -594,7 +594,7 @@
};
- FT_TRACE2(( "TT_Load_Generic_Header: "
+ FT_TRACE2(( "tt_face_load_generic_header: "
"%08p, looking up font table `%c%c%c%c'.\n",
face,
(FT_Char)( tag >> 24 ),
@@ -605,7 +605,7 @@
error = face->goto_table( face, tag, stream, 0 );
if ( error )
{
- FT_TRACE2(( "TT_Load_Generic_Header: Font table is missing!\n" ));
+ FT_TRACE2(( "tt_face_load_generic_header: Font table is missing!\n" ));
goto Exit;
}
@@ -616,7 +616,7 @@
FT_TRACE2(( " Units per EM: %8u\n", header->Units_Per_EM ));
FT_TRACE2(( " IndexToLoc: %8d\n", header->Index_To_Loc_Format ));
- FT_TRACE2(( "TT_Load_Generic_Header: Font table loaded.\n" ));
+ FT_TRACE2(( "tt_face_load_generic_header: Font table loaded.\n" ));
Exit:
return error;
@@ -624,20 +624,20 @@
FT_LOCAL_DEF( FT_Error )
- TT_Load_Header( TT_Face face,
- FT_Stream stream )
+ tt_face_load_header( TT_Face face,
+ FT_Stream stream )
{
- return TT_Load_Generic_Header( face, stream, TTAG_head );
+ return tt_face_load_generic_header( face, stream, TTAG_head );
}
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
FT_LOCAL_DEF( FT_Error )
- TT_Load_Bitmap_Header( TT_Face face,
- FT_Stream stream )
+ tt_face_load_bitmap_header( TT_Face face,
+ FT_Stream stream )
{
- return TT_Load_Generic_Header( face, stream, TTAG_bhed );
+ return tt_face_load_generic_header( face, stream, TTAG_bhed );
}
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -646,7 +646,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_MaxProfile */
+ /* tt_face_load_max_profile */
/* */
/* <Description> */
/* Loads the maximum profile into a face object. */
@@ -660,8 +660,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_MaxProfile( TT_Face face,
- FT_Stream stream )
+ tt_face_load_max_profile( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_MaxProfile* maxProfile = &face->max_profile;
@@ -768,7 +768,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Metrics */
+ /* tt_face_load_metrics */
/* */
/* <Description> */
/* Loads the horizontal or vertical metrics table into a face object. */
@@ -784,9 +784,9 @@
/* FreeType error code. 0 means success. */
/* */
static FT_Error
- TT_Load_Metrics( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical )
+ tt_face_load_metrics( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -911,7 +911,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Metrics_Header */
+ /* tt_face_load_metrics_header */
/* */
/* <Description> */
/* Loads the horizontal or vertical header in a face object. */
@@ -927,9 +927,9 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Metrics_Header( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical )
+ tt_face_load_metrics_header( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical )
{
FT_Error error;
TT_HoriHeader* header;
@@ -1003,7 +1003,7 @@
/* Now try to load the corresponding metrics */
- error = TT_Load_Metrics( face, stream, vertical );
+ error = tt_face_load_metrics( face, stream, vertical );
Exit:
return error;
@@ -1013,7 +1013,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Names */
+ /* tt_face_load_names */
/* */
/* <Description> */
/* Loads the name records. */
@@ -1027,8 +1027,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Names( TT_Face face,
- FT_Stream stream )
+ tt_face_load_names( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1097,7 +1097,7 @@
if ( storage_start > storage_limit )
{
- FT_ERROR(( "TT_Load_Names: invalid `name' table\n" ));
+ FT_ERROR(( "tt_face_load_names: invalid `name' table\n" ));
error = SFNT_Err_Name_Table_Missing;
goto Exit;
}
@@ -1157,7 +1157,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_Names */
+ /* tt_face_free_names */
/* */
/* <Description> */
/* Frees the name records. */
@@ -1166,7 +1166,7 @@
/* face :: A handle to the target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_Names( TT_Face face )
+ tt_face_free_names( TT_Face face )
{
FT_Memory memory = face->root.driver->root.memory;
TT_NameTable table = &face->name_table;
@@ -1192,7 +1192,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_CMap */
+ /* tt_face_load_cmap */
/* */
/* <Description> */
/* Loads the cmap directory in a face object. The cmaps itselves are */
@@ -1208,8 +1208,8 @@
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_CMap( TT_Face face,
- FT_Stream stream )
+ tt_face_load_cmap( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
@@ -1239,7 +1239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_OS2 */
+ /* tt_face_load_os2 */
/* */
/* <Description> */
/* Loads the OS2 table. */
@@ -1253,8 +1253,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_OS2( TT_Face face,
- FT_Stream stream )
+ tt_face_load_os2( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_OS2* os2;
@@ -1382,7 +1382,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Postscript */
+ /* tt_face_load_postscript */
/* */
/* <Description> */
/* Loads the Postscript table. */
@@ -1396,8 +1396,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_PostScript( TT_Face face,
- FT_Stream stream )
+ tt_face_load_postscript( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
TT_Postscript* post = &face->postscript;
@@ -1441,7 +1441,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_PCLT */
+ /* tt_face_load_pclt */
/* */
/* <Description> */
/* Loads the PCL 5 Table. */
@@ -1455,8 +1455,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_PCLT( TT_Face face,
- FT_Stream stream )
+ tt_face_load_pclt( TT_Face face,
+ FT_Stream stream )
{
static const FT_Frame_Field pclt_fields[] =
{
@@ -1509,7 +1509,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Gasp */
+ /* tt_face_load_gasp */
/* */
/* <Description> */
/* Loads the `gasp' table into a face object. */
@@ -1523,8 +1523,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Gasp( TT_Face face,
- FT_Stream stream )
+ tt_face_load_gasp( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1533,7 +1533,7 @@
TT_GaspRange gaspranges;
- FT_TRACE2(( "TT_Load_Gasp: %08p\n", face ));
+ FT_TRACE2(( "tt_face_load_gasp: %08p\n", face ));
/* the gasp table is optional */
error = face->goto_table( face, TTAG_gasp, stream, 0 );
@@ -1584,7 +1584,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Kern */
+ /* tt_face_load_kern */
/* */
/* <Description> */
/* Loads the first kerning table with format 0 in the font. Only */
@@ -1601,8 +1601,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Kern( TT_Face face,
- FT_Stream stream )
+ tt_face_load_kern( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1737,7 +1737,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Hdmx */
+ /* tt_face_load_hdmx */
/* */
/* <Description> */
/* Loads the horizontal device metrics table. */
@@ -1751,8 +1751,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Hdmx( TT_Face face,
- FT_Stream stream )
+ tt_face_load_hdmx( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1820,7 +1820,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_Hdmx */
+ /* tt_face_free_hdmx */
/* */
/* <Description> */
/* Frees the horizontal device metrics table. */
@@ -1829,7 +1829,7 @@
/* face :: A handle to the target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_Hdmx( TT_Face face )
+ tt_face_free_hdmx( TT_Face face )
{
if ( face )
{
diff --git a/src/sfnt/ttload.h b/src/sfnt/ttload.h
index ca38f6c..27c41b5 100644
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -30,101 +30,101 @@ FT_BEGIN_HEADER
FT_LOCAL( TT_Table )
- TT_LookUp_Table( TT_Face face,
- FT_ULong tag );
+ tt_face_lookup_table( TT_Face face,
+ FT_ULong tag );
FT_LOCAL( FT_Error )
- TT_Goto_Table( TT_Face face,
- FT_ULong tag,
- FT_Stream stream,
- FT_ULong* length );
+ tt_face_goto_table( TT_Face face,
+ FT_ULong tag,
+ FT_Stream stream,
+ FT_ULong* length );
FT_LOCAL( FT_Error )
- TT_Load_SFNT_Header( TT_Face face,
- FT_Stream stream,
- FT_Long face_index,
- SFNT_Header sfnt );
+ tt_face_load_sfnt_header( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header sfnt );
FT_LOCAL( FT_Error )
- TT_Load_Directory( TT_Face face,
- FT_Stream stream,
- SFNT_Header sfnt );
+ tt_face_load_directory( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header sfnt );
FT_LOCAL( FT_Error )
- TT_Load_Any( TT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length );
+ tt_face_load_any( TT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length );
FT_LOCAL( FT_Error )
- TT_Load_Header( TT_Face face,
- FT_Stream stream );
+ tt_face_load_header( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Metrics_Header( TT_Face face,
- FT_Stream stream,
- FT_Bool vertical );
+ tt_face_load_metrics_header( TT_Face face,
+ FT_Stream stream,
+ FT_Bool vertical );
FT_LOCAL( FT_Error )
- TT_Load_CMap( TT_Face face,
- FT_Stream stream );
+ tt_face_load_cmap( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_MaxProfile( TT_Face face,
- FT_Stream stream );
+ tt_face_load_max_profile( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Names( TT_Face face,
- FT_Stream stream );
+ tt_face_load_names( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_OS2( TT_Face face,
- FT_Stream stream );
+ tt_face_load_os2( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_PostScript( TT_Face face,
- FT_Stream stream );
+ tt_face_load_postscript( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Hdmx( TT_Face face,
- FT_Stream stream );
+ tt_face_load_hdmx( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_PCLT( TT_Face face,
- FT_Stream stream );
+ tt_face_load_pclt( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( void )
- TT_Free_Names( TT_Face face );
+ tt_face_free_names( TT_Face face );
FT_LOCAL( void )
- TT_Free_Hdmx ( TT_Face face );
+ tt_face_free_hdmx ( TT_Face face );
FT_LOCAL( FT_Error )
- TT_Load_Kern( TT_Face face,
- FT_Stream stream );
+ tt_face_load_kern( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Gasp( TT_Face face,
- FT_Stream stream );
+ tt_face_load_gasp( TT_Face face,
+ FT_Stream stream );
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
FT_LOCAL( FT_Error )
- TT_Load_Bitmap_Header( TT_Face face,
- FT_Stream stream );
+ tt_face_load_bitmap_header( TT_Face face,
+ FT_Stream stream );
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index 686a987..a548849 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -62,11 +62,11 @@
/* table of Mac names. Thus, it is possible to build a version of */
/* FreeType without the Type 1 driver & PSNames module. */
-#define MAC_NAME( x ) TT_Post_Default_Names[x]
+#define MAC_NAME( x ) tt_post_default_names[x]
/* the 258 default Mac PS glyph names */
- FT_String* TT_Post_Default_Names[258] =
+ static const FT_String* tt_post_default_names[258] =
{
/* 0 */
".notdef", ".null", "CR", "space", "exclam",
@@ -153,7 +153,7 @@
static FT_Error
- Load_Format_20( TT_Face face,
+ load_format_20( TT_Face face,
FT_Stream stream )
{
FT_Memory memory = stream->memory;
@@ -271,7 +271,7 @@
static FT_Error
- Load_Format_25( TT_Face face,
+ load_format_25( TT_Face face,
FT_Stream stream )
{
FT_Memory memory = stream->memory;
@@ -334,7 +334,7 @@
static FT_Error
- Load_Post_Names( TT_Face face )
+ load_post_names( TT_Face face )
{
FT_Stream stream;
FT_Error error;
@@ -359,11 +359,11 @@
switch ( format )
{
case 0x00020000L:
- error = Load_Format_20( face, stream );
+ error = load_format_20( face, stream );
break;
case 0x00028000L:
- error = Load_Format_25( face, stream );
+ error = load_format_25( face, stream );
break;
default:
@@ -378,7 +378,7 @@
FT_LOCAL_DEF( void )
- TT_Free_Post_Names( TT_Face face )
+ tt_face_free_ps_names( TT_Face face )
{
FT_Memory memory = face->root.memory;
TT_Post_Names names = &face->postscript_names;
@@ -423,7 +423,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Get_PS_Name */
+ /* tt_face_get_ps_name */
/* */
/* <Description> */
/* Gets the PostScript glyph name of a glyph. */
@@ -442,9 +442,9 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Get_PS_Name( TT_Face face,
- FT_UInt idx,
- FT_String** PSname )
+ tt_face_get_ps_name( TT_Face face,
+ FT_UInt idx,
+ FT_String** PSname )
{
FT_Error error;
TT_Post_Names names;
@@ -485,7 +485,7 @@
if ( !names->loaded )
{
- error = Load_Post_Names( face );
+ error = load_post_names( face );
if ( error )
break;
}
@@ -510,7 +510,7 @@
if ( !names->loaded )
{
- error = Load_Post_Names( face );
+ error = load_post_names( face );
if ( error )
break;
}
diff --git a/src/sfnt/ttpost.h b/src/sfnt/ttpost.h
index 57b1c8c..6f06d75 100644
--- a/src/sfnt/ttpost.h
+++ b/src/sfnt/ttpost.h
@@ -30,12 +30,12 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_Get_PS_Name( TT_Face face,
- FT_UInt idx,
- FT_String** PSname );
+ tt_face_get_ps_name( TT_Face face,
+ FT_UInt idx,
+ FT_String** PSname );
FT_LOCAL( void )
- TT_Free_Post_Names( TT_Face face );
+ tt_face_free_ps_names( TT_Face face );
FT_END_HEADER
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index d72c83d..695105e 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -377,7 +377,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SBit_Strikes */
+ /* tt_face_load_sbit_strikes */
/* */
/* <Description> */
/* Loads the table of embedded bitmap sizes for this face. */
@@ -391,8 +391,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SBit_Strikes( TT_Face face,
- FT_Stream stream )
+ tt_face_load_sbit_strikes( TT_Face face,
+ FT_Stream stream )
{
FT_Error error = 0;
FT_Memory memory = stream->memory;
@@ -471,7 +471,7 @@
if ( version != 0x00020000L ||
num_strikes >= 0x10000L )
{
- FT_ERROR(( "TT_Load_SBit_Strikes: invalid table version!\n" ));
+ FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version!\n" ));
error = SFNT_Err_Invalid_File_Format;
goto Exit;
@@ -577,7 +577,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Free_SBit_Strikes */
+ /* tt_face_free_sbit_strikes */
/* */
/* <Description> */
/* Releases the embedded bitmap tables. */
@@ -586,7 +586,7 @@
/* face :: The target face object. */
/* */
FT_LOCAL_DEF( void )
- TT_Free_SBit_Strikes( TT_Face face )
+ tt_face_free_sbit_strikes( TT_Face face )
{
FT_Memory memory = face->root.memory;
TT_SBit_Strike strike = face->sbit_strikes;
@@ -621,7 +621,7 @@
FT_LOCAL_DEF( FT_Error )
- TT_Set_SBit_Strike( TT_Face face,
+ tt_face_set_sbit_strike( TT_Face face,
FT_Int x_ppem,
FT_Int y_ppem,
FT_ULong *astrike_index )
@@ -651,7 +651,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Find_SBit_Range */
+ /* find_sbit_range */
/* */
/* <Description> */
/* Scans a given strike's ranges and return, for a given glyph */
@@ -671,7 +671,7 @@
/* FreeType error code. 0 means the glyph index was found. */
/* */
static FT_Error
- Find_SBit_Range( FT_UInt glyph_index,
+ find_sbit_range( FT_UInt glyph_index,
TT_SBit_Strike strike,
TT_SBit_Range *arange,
FT_ULong *aglyph_offset )
@@ -754,7 +754,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Find_SBit_Image */
+ /* find_sbit_image */
/* */
/* <Description> */
/* Checks whether an embedded bitmap (an `sbit') exists for a given */
@@ -780,7 +780,7 @@
/* glyph. */
/* */
static FT_Error
- Find_SBit_Image( TT_Face face,
+ find_sbit_image( TT_Face face,
FT_UInt glyph_index,
FT_ULong strike_index,
TT_SBit_Range *arange,
@@ -797,7 +797,7 @@
strike = &face->sbit_strikes[strike_index];
- error = Find_SBit_Range( glyph_index, strike,
+ error = find_sbit_range( glyph_index, strike,
arange, aglyph_offset );
if ( error )
goto Fail;
@@ -819,7 +819,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Load_SBit_Metrics */
+ /* load_sbit_metrics */
/* */
/* <Description> */
/* Gets the big metrics for a given SBit. */
@@ -844,7 +844,7 @@
/* function exit. */
/* */
static FT_Error
- Load_SBit_Metrics( FT_Stream stream,
+ load_sbit_metrics( FT_Stream stream,
TT_SBit_Range range,
TT_SBit_Metrics metrics )
{
@@ -918,7 +918,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Crop_Bitmap */
+ /* crop_bitmap */
/* */
/* <Description> */
/* Crops a bitmap to its tightest bounding box, and adjusts its */
@@ -930,7 +930,7 @@
/* metrics :: The corresponding metrics structure. */
/* */
static void
- Crop_Bitmap( FT_Bitmap* map,
+ crop_bitmap( FT_Bitmap* map,
TT_SBit_Metrics metrics )
{
/***********************************************************************/
@@ -1116,7 +1116,7 @@
map->width = 0;
map->rows = 0;
map->pitch = 0;
- map->pixel_mode = ft_pixel_mode_mono;
+ map->pixel_mode = FT_PIXEL_MODE_MONO;
}
@@ -1226,7 +1226,7 @@
if ( FT_STREAM_SEEK( ebdt_pos + glyph_offset ) )
goto Exit;
- error = Load_SBit_Metrics( stream, range, metrics );
+ error = load_sbit_metrics( stream, range, metrics );
if ( error )
goto Exit;
@@ -1245,22 +1245,22 @@
switch ( strike->bit_depth )
{
case 1:
- map->pixel_mode = ft_pixel_mode_mono;
+ map->pixel_mode = FT_PIXEL_MODE_MONO;
map->pitch = ( map->width + 7 ) >> 3;
break;
case 2:
- map->pixel_mode = ft_pixel_mode_pal2;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY2;
map->pitch = ( map->width + 3 ) >> 2;
break;
case 4:
- map->pixel_mode = ft_pixel_mode_pal4;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY4;
map->pitch = ( map->width + 1 ) >> 1;
break;
case 8:
- map->pixel_mode = ft_pixel_mode_grays;
+ map->pixel_mode = FT_PIXEL_MODE_GRAY;
map->pitch = map->width;
break;
@@ -1336,7 +1336,7 @@
/* find the range for this element */
- error = Find_SBit_Range( comp->glyph_code,
+ error = find_sbit_range( comp->glyph_code,
strike,
&elem_range,
&elem_offset );
@@ -1369,7 +1369,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_SBit_Image */
+ /* tt_face_load_sbit_image */
/* */
/* <Description> */
/* Loads a given glyph sbit image from the font resource. This also */
@@ -1400,13 +1400,13 @@
/* The `map.buffer' field is always freed before the glyph is loaded. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_SBit_Image( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *map,
- TT_SBit_MetricsRec *metrics )
+ tt_face_load_sbit_image( TT_Face face,
+ FT_ULong strike_index,
+ FT_UInt glyph_index,
+ FT_UInt load_flags,
+ FT_Stream stream,
+ FT_Bitmap *map,
+ TT_SBit_MetricsRec *metrics )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -1417,7 +1417,7 @@
/* Check whether there is a glyph sbit for the current index */
- error = Find_SBit_Image( face, glyph_index, strike_index,
+ error = find_sbit_image( face, glyph_index, strike_index,
&range, &strike, &glyph_offset );
if ( error )
goto Exit;
@@ -1464,7 +1464,7 @@
/* Crop the bitmap now, unless specified otherwise */
if ( load_flags & FT_LOAD_CROP_BITMAP )
- Crop_Bitmap( map, metrics );
+ crop_bitmap( map, metrics );
Exit:
return error;
diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h
index f38123d..edc858a 100644
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -28,27 +28,27 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_Load_SBit_Strikes( TT_Face face,
- FT_Stream stream );
+ tt_face_load_sbit_strikes( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( void )
- TT_Free_SBit_Strikes( TT_Face face );
+ tt_face_free_sbit_strikes( TT_Face face );
FT_LOCAL( FT_Error )
- TT_Set_SBit_Strike( TT_Face face,
- FT_Int x_ppem,
- FT_Int y_ppem,
- FT_ULong *astrike_index );
+ tt_face_set_sbit_strike( TT_Face face,
+ FT_Int x_ppem,
+ FT_Int y_ppem,
+ FT_ULong *astrike_index );
FT_LOCAL( FT_Error )
- TT_Load_SBit_Image( TT_Face face,
- FT_ULong strike_index,
- FT_UInt glyph_index,
- FT_UInt load_flags,
- FT_Stream stream,
- FT_Bitmap *map,
- TT_SBit_MetricsRec *metrics );
+ tt_face_load_sbit_image( TT_Face face,
+ FT_ULong strike_index,
+ FT_UInt glyph_index,
+ FT_UInt load_flags,
+ FT_Stream stream,
+ FT_Bitmap *map,
+ TT_SBit_MetricsRec *metrics );
FT_END_HEADER
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 08edd20..3d6dad8 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1357,7 +1357,7 @@
if ( coverage < 0 )
coverage = -coverage;
- if ( ras.outline.flags & ft_outline_even_odd_fill )
+ if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL )
{
coverage &= 511;
@@ -1618,14 +1618,14 @@
tag = FT_CURVE_TAG( tags[0] );
/* A contour cannot start with a cubic control point! */
- if ( tag == FT_Curve_Tag_Cubic )
+ if ( tag == FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
/* check first point to determine origin */
- if ( tag == FT_Curve_Tag_Conic )
+ if ( tag == FT_CURVE_TAG_CONIC )
{
/* first point is conic control. Yes, this happens. */
- if ( FT_CURVE_TAG( outline->tags[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;
@@ -1657,7 +1657,7 @@
tag = FT_CURVE_TAG( tags[0] );
switch ( tag )
{
- case FT_Curve_Tag_On: /* emit a single line_to */
+ case FT_CURVE_TAG_ON: /* emit a single line_to */
{
FT_Vector vec;
@@ -1671,7 +1671,7 @@
continue;
}
- case FT_Curve_Tag_Conic: /* consume conic arcs */
+ case FT_CURVE_TAG_CONIC: /* consume conic arcs */
{
v_control.x = SCALED( point->x );
v_control.y = SCALED( point->y );
@@ -1690,7 +1690,7 @@
vec.x = SCALED( point->x );
vec.y = SCALED( point->y );
- if ( tag == FT_Curve_Tag_On )
+ if ( tag == FT_CURVE_TAG_ON )
{
error = func_interface->conic_to( &v_control, &vec, user );
if ( error )
@@ -1698,7 +1698,7 @@
continue;
}
- if ( tag != FT_Curve_Tag_Conic )
+ if ( tag != FT_CURVE_TAG_CONIC )
goto Invalid_Outline;
v_middle.x = ( v_control.x + vec.x ) / 2;
@@ -1716,13 +1716,13 @@
goto Close;
}
- default: /* FT_Curve_Tag_Cubic */
+ default: /* FT_CURVE_TAG_CUBIC */
{
FT_Vector vec1, vec2;
if ( point + 1 > limit ||
- FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+ FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
goto Invalid_Outline;
point += 2;
@@ -1969,16 +1969,16 @@
return ErrRaster_Invalid_Outline;
/* if direct mode is not set, we must have a target bitmap */
- if ( ( params->flags & ft_raster_flag_direct ) == 0 &&
+ if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 &&
( !target_map || !target_map->buffer ) )
return -1;
/* this version does not support monochrome rendering */
- if ( !( params->flags & ft_raster_flag_aa ) )
+ if ( !( params->flags & FT_RASTER_FLAG_AA ) )
return ErrRaster_Invalid_Mode;
/* compute clipping box */
- if ( ( params->flags & ft_raster_flag_direct ) == 0 )
+ if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 )
{
/* compute clip box from target pixmap */
ras.clip_box.xMin = 0;
@@ -1986,7 +1986,7 @@
ras.clip_box.xMax = target_map->width;
ras.clip_box.yMax = target_map->rows;
}
- else if ( params->flags & ft_raster_flag_clip )
+ else if ( params->flags & FT_RASTER_FLAG_CLIP )
{
ras.clip_box = params->clip_box;
}
@@ -2008,7 +2008,7 @@
ras.render_span = (FT_Raster_Span_Func)gray_render_span;
ras.render_span_data = &ras;
- if ( params->flags & ft_raster_flag_direct )
+ if ( params->flags & FT_RASTER_FLAG_DIRECT )
{
ras.render_span = (FT_Raster_Span_Func)params->gray_spans;
ras.render_span_data = params->user;
@@ -2133,7 +2133,7 @@
const FT_Raster_Funcs ft_grays_raster =
{
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
(FT_Raster_New_Func) gray_raster_new,
(FT_Raster_Reset_Func) gray_raster_reset,
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index 85a4b86..f827da7 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -94,10 +94,13 @@
/* convert a slot's glyph image into a bitmap */
static FT_Error
- ft_smooth_render( FT_Renderer render,
- FT_GlyphSlot slot,
- FT_UInt mode,
- FT_Vector* origin )
+ ft_smooth_render_generic( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin,
+ FT_UInt required_mode,
+ FT_Int hmul,
+ FT_Int vmul )
{
FT_Error error;
FT_Outline* outline = NULL;
@@ -117,7 +120,7 @@
}
/* check mode */
- if ( mode != ft_render_mode_normal )
+ if ( mode != required_mode )
return Smooth_Err_Cannot_Render_Glyph;
outline = &slot->outline;
@@ -148,7 +151,16 @@
/* allocate new one, depends on pixel format */
pitch = width;
- bitmap->pixel_mode = ft_pixel_mode_grays;
+ if ( hmul )
+ {
+ width = width*hmul;
+ pitch = ( width + 3 ) & -4;
+ }
+
+ if ( vmul )
+ height *= vmul;
+
+ bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
bitmap->num_grays = 256;
bitmap->width = width;
bitmap->rows = height;
@@ -165,17 +177,46 @@
/* set up parameters */
params.target = bitmap;
params.source = outline;
- params.flags = ft_raster_flag_aa;
+ params.flags = FT_RASTER_FLAG_AA;
+
+ /* implode outline if needed */
+ {
+ FT_Int n;
+ FT_Vector* vec;
+
+ if ( hmul )
+ for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+ vec->x *= hmul;
+
+ if ( vmul )
+ for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+ vec->y *= vmul;
+ }
/* render outline into the bitmap */
error = render->raster_render( render->raster, ¶ms );
-
+
+ /* deflate outline if needed */
+ {
+ FT_Int n;
+ FT_Vector* vec;
+
+ if ( hmul )
+ for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+ vec->x /= hmul;
+
+ if ( vmul )
+ for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+ vec->y /= vmul;
+ }
+
+
FT_Outline_Translate( outline, cbox.xMin, cbox.yMin );
if ( error )
goto Exit;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
slot->bitmap_left = cbox.xMin >> 6;
slot->bitmap_top = cbox.yMax >> 6;
@@ -187,6 +228,47 @@
}
+
+ /* convert a slot's glyph image into a bitmap */
+ static FT_Error
+ ft_smooth_render( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin )
+ {
+ return ft_smooth_render_generic( render, slot, mode, origin,
+ FT_RENDER_MODE_NORMAL,
+ 0, 0 );
+ }
+
+
+ /* convert a slot's glyph image into a horizontal LCD bitmap */
+ static FT_Error
+ ft_smooth_render_lcd( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin )
+ {
+ return ft_smooth_render_generic( render, slot, mode, origin,
+ FT_RENDER_MODE_LCD,
+ 3, 0 );
+ }
+
+
+ /* convert a slot's glyph image into a vertical LCD bitmap */
+ static FT_Error
+ ft_smooth_render_lcd_v( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin )
+ {
+ return ft_smooth_render_generic( render, slot, mode, origin,
+ FT_RENDER_MODE_LCD_V,
+ 0, 3 );
+ }
+
+
+
FT_CALLBACK_TABLE_DEF
const FT_Renderer_Class ft_smooth_renderer_class =
{
@@ -205,12 +287,71 @@
(FT_Module_Requester) 0
},
- ft_glyph_format_outline,
+ FT_GLYPH_FORMAT_OUTLINE,
+
+ (FT_Renderer_RenderFunc) ft_smooth_render,
+ (FT_Renderer_TransformFunc)ft_smooth_transform,
+ (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_smooth_set_mode,
+
+ (FT_Raster_Funcs*) &ft_grays_raster
+ };
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FT_Renderer_Class ft_smooth_lcd_renderer_class =
+ {
+ {
+ ft_module_renderer,
+ sizeof( FT_RendererRec ),
+
+ "smooth-lcd",
+ 0x10000L,
+ 0x20000L,
+
+ 0, /* module specific interface */
+
+ (FT_Module_Constructor)ft_smooth_init,
+ (FT_Module_Destructor) 0,
+ (FT_Module_Requester) 0
+ },
+
+ FT_GLYPH_FORMAT_OUTLINE,
+
+ (FT_Renderer_RenderFunc) ft_smooth_render_lcd,
+ (FT_Renderer_TransformFunc)ft_smooth_transform,
+ (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_smooth_set_mode,
+
+ (FT_Raster_Funcs*) &ft_grays_raster
+ };
+
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FT_Renderer_Class ft_smooth_lcdv_renderer_class =
+ {
+ {
+ ft_module_renderer,
+ sizeof( FT_RendererRec ),
+
+ "smooth-lcdv",
+ 0x10000L,
+ 0x20000L,
+
+ 0, /* module specific interface */
+
+ (FT_Module_Constructor)ft_smooth_init,
+ (FT_Module_Destructor) 0,
+ (FT_Module_Requester) 0
+ },
+
+ FT_GLYPH_FORMAT_OUTLINE,
- (FTRenderer_render) ft_smooth_render,
- (FTRenderer_transform)ft_smooth_transform,
- (FTRenderer_getCBox) ft_smooth_get_cbox,
- (FTRenderer_setMode) ft_smooth_set_mode,
+ (FT_Renderer_RenderFunc) ft_smooth_render_lcd_v,
+ (FT_Renderer_TransformFunc)ft_smooth_transform,
+ (FT_Renderer_GetCBoxFunc) ft_smooth_get_cbox,
+ (FT_Renderer_SetModeFunc) ft_smooth_set_mode,
(FT_Raster_Funcs*) &ft_grays_raster
};
diff --git a/src/smooth/ftsmooth.h b/src/smooth/ftsmooth.h
index ec01121..62cced4 100644
--- a/src/smooth/ftsmooth.h
+++ b/src/smooth/ftsmooth.h
@@ -33,9 +33,14 @@ FT_BEGIN_HEADER
#ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER
FT_EXPORT_VAR( const FT_Renderer_Class ) ft_smooth_renderer_class;
+
+ FT_EXPORT_VAR( const FT_Renderer_Class ) ft_smooth_lcd_renderer_class;
+
+ FT_EXPORT_VAR( const FT_Renderer_Class ) ft_smooth_lcd_v_renderer_class;
#endif
+
FT_END_HEADER
#endif /* __FTSMOOTH_H__ */
diff --git a/src/tools/test_bbox.c b/src/tools/test_bbox.c
index 5ac9894..e085c5b 100644
--- a/src/tools/test_bbox.c
+++ b/src/tools/test_bbox.c
@@ -46,10 +46,10 @@
static char dummy_tag_1[4] =
{
- FT_Curve_Tag_On,
- FT_Curve_Tag_Cubic,
- FT_Curve_Tag_Cubic,
- FT_Curve_Tag_On
+ FT_CURVE_TAG_ON,
+ FT_CURVE_TAG_CUBIC,
+ FT_CURVE_TAG_CUBIC,
+ FT_CURVE_TAG_ON
};
static short dummy_contour_1[1] =
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index d07427d..1e7bf31 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -222,7 +222,7 @@
size->strike_index = 0xFFFF;
#endif
- return TT_Size_Reset( size );
+ return tt_size_reset( size );
}
@@ -261,7 +261,7 @@
size->strike_index = 0xFFFF;
#endif
- return TT_Size_Reset( size );
+ return tt_size_reset( size );
}
@@ -319,7 +319,7 @@
if ( !size->ttmetrics.valid )
{
- if ( FT_SET_ERROR( TT_Size_Reset( size ) ) )
+ if ( FT_SET_ERROR( tt_size_reset( size ) ) )
return error;
}
}
@@ -390,8 +390,8 @@
(void*)0, /* driver specific interface */
- (FT_Module_Constructor)TT_Driver_Init,
- (FT_Module_Destructor) TT_Driver_Done,
+ (FT_Module_Constructor)tt_driver_init,
+ (FT_Module_Destructor) tt_driver_done,
(FT_Module_Requester) tt_get_interface,
},
@@ -400,10 +400,10 @@
sizeof ( FT_GlyphSlotRec ),
- (FT_Face_InitFunc) TT_Face_Init,
- (FT_Face_DoneFunc) TT_Face_Done,
- (FT_Size_InitFunc) TT_Size_Init,
- (FT_Size_DoneFunc) TT_Size_Done,
+ (FT_Face_InitFunc) tt_face_init,
+ (FT_Face_DoneFunc) tt_face_done,
+ (FT_Size_InitFunc) tt_size_init,
+ (FT_Size_DoneFunc) tt_size_done,
(FT_Slot_InitFunc) 0,
(FT_Slot_DoneFunc) 0,
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 526dbbc..5eff015 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -458,7 +458,7 @@
/* clear the touch tags */
for ( n = 0; n < n_points; n++ )
- outline->tags[n] &= FT_Curve_Tag_On;
+ outline->tags[n] &= FT_CURVE_TAG_ON;
outline->n_points = (FT_UShort)n_points;
outline->n_contours = (FT_Short) n_contours;
@@ -1021,7 +1021,7 @@
FT_GlyphLoader_Add( gloader );
glyph->num_subglyphs = gloader->base.num_subglyphs;
- glyph->format = ft_glyph_format_composite;
+ glyph->format = FT_GLYPH_FORMAT_COMPOSITE;
glyph->subglyphs = gloader->base.subglyphs;
goto Exit;
@@ -1299,7 +1299,7 @@
for ( k = 0; k < num_points; k++ )
- pts->tags[k] &= FT_Curve_Tag_On;
+ pts->tags[k] &= FT_CURVE_TAG_ON;
}
cur_to_org( num_points + 2, pts );
@@ -1363,9 +1363,9 @@
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
y_scale = size->root.metrics.y_scale;
- if ( glyph->format != ft_glyph_format_composite )
+ if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE )
{
- glyph->outline.flags &= ~ft_outline_single_pass;
+ glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
/* copy outline to our glyph slot */
FT_GlyphLoader_CopyPoints( glyph->internal->loader, loader->gloader );
@@ -1647,7 +1647,7 @@
glyph->metrics.vertBearingY = (FT_Pos)metrics.vertBearingY << 6;
glyph->metrics.vertAdvance = (FT_Pos)metrics.vertAdvance << 6;
- glyph->format = ft_glyph_format_bitmap;
+ glyph->format = FT_GLYPH_FORMAT_BITMAP;
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
{
glyph->bitmap_left = metrics.vertBearingX;
@@ -1754,7 +1754,7 @@
#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
/* Main loading loop */
- glyph->format = ft_glyph_format_outline;
+ glyph->format = FT_GLYPH_FORMAT_OUTLINE;
glyph->num_subglyphs = 0;
error = load_truetype_glyph( &loader, glyph_index );
@@ -1773,7 +1773,7 @@
/* TrueType glyphs at all sizes using the bytecode interpreter. */
/* */
if ( size && size->root.metrics.y_ppem < 24 )
- glyph->outline.flags |= ft_outline_high_precision;
+ glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
Exit:
return error;
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 28587e6..cee0f78 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -1175,15 +1175,15 @@
{
FT_Int32 m, s, hi;
FT_UInt32 l, lo;
-
+
/* compute ax*bx as 64-bit value */
l = (FT_UInt32)( ( a & 0xFFFFU ) * b );
m = ( a >> 16 ) * b;
-
+
lo = l + (FT_UInt32)( m << 16 );
hi = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo < l );
-
+
/* divide the result by 2^14 with rounding */
s = hi >> 31;
l = lo + (FT_UInt32)s;
@@ -1192,7 +1192,7 @@
l = lo + 0x2000U;
hi += (l < lo);
-
+
return ( hi << 18 ) | ( l >> 14 );
}
@@ -1206,26 +1206,26 @@
{
FT_Int32 m, s, hi1, hi2, hi;
FT_UInt32 l, lo1, lo2, lo;
-
+
/* compute ax*bx as 64-bit value */
l = (FT_UInt32)( ( ax & 0xFFFFU ) * bx );
m = ( ax >> 16 ) * bx;
-
+
lo1 = l + (FT_UInt32)( m << 16 );
hi1 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo1 < l );
-
+
/* compute ay*by as 64-bit value */
l = (FT_UInt32)( ( ay & 0xFFFFU ) * by );
m = ( ay >> 16 ) * by;
-
+
lo2 = l + (FT_UInt32)( m << 16 );
hi2 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo2 < l );
-
+
/* add them */
lo = lo1 + lo2;
hi = hi1 + hi2 + ( lo < lo1 );
-
+
/* divide the result by 2^14 with rounding */
s = hi >> 31;
l = lo + (FT_UInt32)s;
@@ -1234,7 +1234,7 @@
l = lo + 0x2000U;
hi += ( l < lo );
-
+
return ( hi << 18 ) | ( l >> 14 );
}
@@ -1250,33 +1250,33 @@
FT_Int32 m, hi1, hi2, hi;
FT_UInt32 l, lo1, lo2, lo;
-
+
/* compute x*x as 64-bit value */
lo = (FT_UInt32)( x & 0xFFFFU );
hi = x >> 16;
-
+
l = lo * lo;
m = hi * lo;
hi = hi * hi;
-
+
lo1 = l + (FT_UInt32)( m << 17 );
hi1 = hi + ( m >> 15 ) + ( lo1 < l );
-
+
/* compute y*y as 64-bit value */
lo = (FT_UInt32)( y & 0xFFFFU );
hi = y >> 16;
-
+
l = lo * lo;
m = hi * lo;
hi = hi * hi;
-
+
lo2 = l + (FT_UInt32)( m << 17 );
hi2 = hi + ( m >> 15 ) + ( lo2 < l );
-
+
/* add them to get 'x*x+y*y' as 64-bit value */
lo = lo1 + lo2;
hi = hi1 + hi2 + ( lo < lo1 );
-
+
/* compute the square root of this value */
{
FT_UInt32 root, rem, test_div;
@@ -1303,13 +1303,13 @@
}
} while ( --count );
}
-
+
return (FT_Int32)root;
}
}
#else
-
+
/* this version uses FT_Vector_Length which computes the same value */
/* much, much faster.. */
/* */
@@ -1325,7 +1325,7 @@
return FT_Vector_Length( &v );
}
-
+
#endif
@@ -1550,7 +1550,7 @@
#endif
- zone->tags[point] |= FT_Curve_Tag_Touch_X;
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
v = CUR.GS.freeVector.y;
@@ -1571,7 +1571,7 @@
#endif
- zone->tags[point] |= FT_Curve_Tag_Touch_Y;
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
}
@@ -1594,7 +1594,7 @@
FT_UNUSED_EXEC;
zone->cur[point].x += distance;
- zone->tags[point] |= FT_Curve_Tag_Touch_X;
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
@@ -1606,7 +1606,7 @@
FT_UNUSED_EXEC;
zone->cur[point].y += distance;
- zone->tags[point] |= FT_Curve_Tag_Touch_Y;
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
@@ -5023,7 +5023,7 @@
}
}
else
- CUR.pts.tags[point] ^= FT_Curve_Tag_On;
+ CUR.pts.tags[point] ^= FT_CURVE_TAG_ON;
CUR.GS.loop--;
}
@@ -5057,7 +5057,7 @@
}
for ( I = L; I <= K; I++ )
- CUR.pts.tags[I] |= FT_Curve_Tag_On;
+ CUR.pts.tags[I] |= FT_CURVE_TAG_ON;
}
@@ -5085,7 +5085,7 @@
}
for ( I = L; I <= K; I++ )
- CUR.pts.tags[I] &= ~FT_Curve_Tag_On;
+ CUR.pts.tags[I] &= ~FT_CURVE_TAG_ON;
}
@@ -5153,14 +5153,14 @@
{
CUR.zp2.cur[point].x += dx;
if ( touch )
- CUR.zp2.tags[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.tags[point] |= FT_Curve_Tag_Touch_Y;
+ CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
}
}
@@ -5828,7 +5828,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.tags[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 );
@@ -6006,10 +6006,10 @@
mask = 0xFF;
if ( CUR.GS.freeVector.x != 0 )
- mask &= ~FT_Curve_Tag_Touch_X;
+ mask &= ~FT_CURVE_TAG_TOUCH_X;
if ( CUR.GS.freeVector.y != 0 )
- mask &= ~FT_Curve_Tag_Touch_Y;
+ mask &= ~FT_CURVE_TAG_TOUCH_Y;
CUR.zp0.tags[point] &= mask;
}
@@ -6149,13 +6149,13 @@
if ( CUR.opcode & 1 )
{
- mask = FT_Curve_Tag_Touch_X;
+ mask = FT_CURVE_TAG_TOUCH_X;
V.orgs = CUR.pts.org;
V.curs = CUR.pts.cur;
}
else
{
- mask = FT_Curve_Tag_Touch_Y;
+ mask = FT_CURVE_TAG_TOUCH_Y;
V.orgs = (FT_Vector*)( (FT_Pos*)CUR.pts.org + 1 );
V.curs = (FT_Vector*)( (FT_Pos*)CUR.pts.cur + 1 );
}
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 39653e1..e982c53 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -57,7 +57,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Done_GlyphZone */
+ /* tt_glyphzone_done */
/* */
/* <Description> */
/* Deallocates a glyph zone. */
@@ -66,7 +66,7 @@
/* zone :: A pointer to the target glyph zone. */
/* */
FT_LOCAL_DEF( void )
- TT_Done_GlyphZone( TT_GlyphZone zone )
+ tt_glyphzone_done( TT_GlyphZone zone )
{
FT_Memory memory = zone->memory;
@@ -84,7 +84,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_New_GlyphZone */
+ /* tt_glyphzone_new */
/* */
/* <Description> */
/* Allocates a new glyph zone. */
@@ -103,7 +103,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_New_GlyphZone( FT_Memory memory,
+ tt_glyphzone_new( FT_Memory memory,
FT_UShort maxPoints,
FT_Short maxContours,
TT_GlyphZone zone )
@@ -122,7 +122,7 @@
FT_NEW_ARRAY( zone->tags, maxPoints ) ||
FT_NEW_ARRAY( zone->contours, maxContours ) )
{
- TT_Done_GlyphZone( zone );
+ tt_glyphzone_done( zone );
}
return error;
@@ -133,7 +133,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Face_Init */
+ /* tt_face_init */
/* */
/* <Description> */
/* Initializes a given TrueType face object. */
@@ -154,7 +154,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Face_Init( FT_Stream stream,
+ tt_face_init( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
@@ -202,17 +202,17 @@
#ifdef FT_CONFIG_OPTION_INCREMENTAL
if ( !face->root.internal->incremental_interface )
- error = TT_Load_Locations( face, stream );
+ error = tt_face_load_loca( face, stream );
if ( !error )
- error = TT_Load_CVT ( face, stream ) ||
- TT_Load_Programs ( face, stream );
+ error = tt_face_load_cvt ( face, stream ) ||
+ tt_face_load_fpgm ( face, stream );
#else
if ( !error )
- error = TT_Load_Locations( face, stream ) ||
- TT_Load_CVT ( face, stream ) ||
- TT_Load_Programs ( face, stream );
+ error = tt_face_load_loca( face, stream ) ||
+ tt_face_load_cvt ( face, stream ) ||
+ tt_face_load_fpgm ( face, stream );
#endif
@@ -233,7 +233,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Face_Done */
+ /* tt_face_done */
/* */
/* <Description> */
/* Finalizes a given face object. */
@@ -242,7 +242,7 @@
/* face :: A pointer to the face object to destroy. */
/* */
FT_LOCAL_DEF( void )
- TT_Face_Done( TT_Face face )
+ tt_face_done( TT_Face face )
{
FT_Memory memory = face->root.memory;
FT_Stream stream = face->root.stream;
@@ -283,7 +283,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Size_Init */
+ /* tt_size_init */
/* */
/* <Description> */
/* Initializes a new TrueType size object. */
@@ -295,7 +295,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Size_Init( TT_Size size )
+ tt_size_init( TT_Size size )
{
FT_Error error = TT_Err_Ok;
@@ -352,7 +352,7 @@
/* reserve twilight zone */
n_twilight = maxp->maxTwilightPoints;
- error = TT_New_GlyphZone( memory, n_twilight, 0, &size->twilight );
+ error = tt_glyphzone_new( memory, n_twilight, 0, &size->twilight );
if ( error )
goto Fail_Memory;
@@ -453,7 +453,7 @@
Fail_Memory:
- TT_Size_Done( size );
+ tt_size_done( size );
return error;
#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
@@ -464,7 +464,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Size_Done */
+ /* tt_size_done */
/* */
/* <Description> */
/* The TrueType size object finalizer. */
@@ -473,7 +473,7 @@
/* size :: A handle to the target size object. */
/* */
FT_LOCAL_DEF( void )
- TT_Size_Done( TT_Size size )
+ tt_size_done( TT_Size size )
{
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
@@ -496,7 +496,7 @@
size->storage_size = 0;
/* twilight zone */
- TT_Done_GlyphZone( &size->twilight );
+ tt_glyphzone_done( &size->twilight );
FT_FREE( size->function_defs );
FT_FREE( size->instruction_defs );
@@ -755,7 +755,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Size_Reset */
+ /* tt_size_reset */
/* */
/* <Description> */
/* Resets a TrueType size when resolutions and character dimensions */
@@ -765,7 +765,7 @@
/* size :: A handle to the target size object. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Size_Reset( TT_Size size )
+ tt_size_reset( TT_Size size )
{
FT_Face face;
FT_Error error = TT_Err_Ok;
@@ -805,7 +805,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Driver_Init */
+ /* tt_driver_init */
/* */
/* <Description> */
/* Initializes a given TrueType driver object. */
@@ -817,7 +817,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Driver_Init( TT_Driver driver )
+ tt_driver_init( TT_Driver driver )
{
FT_Error error;
@@ -832,7 +832,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Driver_Done */
+ /* tt_driver_done */
/* */
/* <Description> */
/* Finalizes a given TrueType driver. */
@@ -841,7 +841,7 @@
/* driver :: A handle to the target TrueType driver. */
/* */
FT_LOCAL_DEF( void )
- TT_Driver_Done( TT_Driver driver )
+ tt_driver_done( TT_Driver driver )
{
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index 4fb48d0..28bcdc4 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -108,10 +108,10 @@ FT_BEGIN_HEADER
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
FT_LOCAL( void )
- TT_Done_GlyphZone( TT_GlyphZone zone );
+ tt_glyphzone_done( TT_GlyphZone zone );
FT_LOCAL( FT_Error )
- TT_New_GlyphZone( FT_Memory memory,
+ tt_glyphzone_new( FT_Memory memory,
FT_UShort maxPoints,
FT_Short maxContours,
TT_GlyphZone zone );
@@ -379,14 +379,14 @@ FT_BEGIN_HEADER
/* Face functions */
/* */
FT_LOCAL( FT_Error )
- TT_Face_Init( FT_Stream stream,
+ tt_face_init( FT_Stream stream,
TT_Face face,
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params );
FT_LOCAL( void )
- TT_Face_Done( TT_Face face );
+ tt_face_done( TT_Face face );
/*************************************************************************/
@@ -394,13 +394,13 @@ FT_BEGIN_HEADER
/* Size functions */
/* */
FT_LOCAL( FT_Error )
- TT_Size_Init( TT_Size size );
+ tt_size_init( TT_Size size );
FT_LOCAL( void )
- TT_Size_Done( TT_Size size );
+ tt_size_done( TT_Size size );
FT_LOCAL( FT_Error )
- TT_Size_Reset( TT_Size size );
+ tt_size_reset( TT_Size size );
/*************************************************************************/
@@ -408,10 +408,10 @@ FT_BEGIN_HEADER
/* Driver functions */
/* */
FT_LOCAL( FT_Error )
- TT_Driver_Init( TT_Driver driver );
+ tt_driver_init( TT_Driver driver );
FT_LOCAL( void )
- TT_Driver_Done( TT_Driver driver );
+ tt_driver_done( TT_Driver driver );
FT_END_HEADER
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index 19bd0f8..4066cd7 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -40,7 +40,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Locations */
+ /* tt_face_load_loca */
/* */
/* <Description> */
/* Loads the locations table. */
@@ -55,7 +55,7 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Locations( TT_Face face,
+ tt_face_load_loca( TT_Face face,
FT_Stream stream )
{
FT_Error error;
@@ -129,7 +129,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_CVT */
+ /* tt_face_load_cvt */
/* */
/* <Description> */
/* Loads the control value table into a face object. */
@@ -144,8 +144,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_CVT( TT_Face face,
- FT_Stream stream )
+ tt_face_load_cvt( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_Memory memory = stream->memory;
@@ -194,7 +194,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* TT_Load_Progams */
+ /* tt_face_load_fpgm */
/* */
/* <Description> */
/* Loads the font program and the cvt program. */
@@ -209,8 +209,8 @@
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- TT_Load_Programs( TT_Face face,
- FT_Stream stream )
+ tt_face_load_fpgm( TT_Face face,
+ FT_Stream stream )
{
FT_Error error;
FT_ULong table_len;
diff --git a/src/truetype/ttpload.h b/src/truetype/ttpload.h
index c83b2f2..3f8cd64 100644
--- a/src/truetype/ttpload.h
+++ b/src/truetype/ttpload.h
@@ -28,16 +28,16 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
- TT_Load_Locations( TT_Face face,
+ tt_face_load_loca( TT_Face face,
FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_CVT( TT_Face face,
- FT_Stream stream );
+ tt_face_load_cvt( TT_Face face,
+ FT_Stream stream );
FT_LOCAL( FT_Error )
- TT_Load_Programs( TT_Face face,
- FT_Stream stream );
+ tt_face_load_fpgm( TT_Face face,
+ FT_Stream stream );
FT_END_HEADER
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 0625caf..ecf85f6 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -242,7 +242,7 @@
hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
( load_flags & FT_LOAD_NO_HINTING ) == 0 );
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
error = decoder_funcs->init( &decoder,
(FT_Face)face,
@@ -280,8 +280,8 @@
/* bearing the yMax */
if ( !error )
{
- glyph->root.outline.flags &= ft_outline_owner;
- glyph->root.outline.flags |= ft_outline_reverse_fill;
+ glyph->root.outline.flags &= FT_OUTLINE_OWNER;
+ glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
/* for composite glyphs, return only left side bearing and */
/* advance width */
@@ -314,10 +314,10 @@
glyph->root.linearVertAdvance = 0;
- glyph->root.format = ft_glyph_format_outline;
+ glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
if ( size && size->root.metrics.y_ppem < 24 )
- glyph->root.outline.flags |= ft_outline_high_precision;
+ glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
#if 1
/* apply the font matrix, if any */
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 51131ff..59e7cb6 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -443,7 +443,7 @@
/* first of all, try to synthetize a Unicode charmap */
charmap.platform_id = 3;
charmap.encoding_id = 1;
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
@@ -454,25 +454,25 @@
switch ( face->type1.encoding_type )
{
case T1_ENCODING_TYPE_STANDARD:
- charmap.encoding = ft_encoding_adobe_standard;
+ charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
charmap.encoding_id = 0;
clazz = cmap_classes->standard;
break;
case T1_ENCODING_TYPE_EXPERT:
- charmap.encoding = ft_encoding_adobe_expert;
+ charmap.encoding = FT_ENCODING_ADOBE_EXPERT;
charmap.encoding_id = 1;
clazz = cmap_classes->expert;
break;
case T1_ENCODING_TYPE_ARRAY:
- charmap.encoding = ft_encoding_adobe_custom;
+ charmap.encoding = FT_ENCODING_ADOBE_CUSTOM;
charmap.encoding_id = 2;
clazz = cmap_classes->custom;
break;
case T1_ENCODING_TYPE_ISOLATIN1:
- charmap.encoding = ft_encoding_latin_1;
+ charmap.encoding = FT_ENCODING_ADOBE_LATIN_1;
charmap.encoding_id = 3;
clazz = cmap_classes->unicode;
break;
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index ae1d542..d3abb38 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -296,7 +296,7 @@
/* first of all, try to synthetize a Unicode charmap */
charmap.platform_id = 3;
charmap.encoding_id = 1;
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
@@ -307,25 +307,25 @@
switch ( face->type1.encoding_type )
{
case T1_ENCODING_TYPE_STANDARD:
- charmap.encoding = ft_encoding_adobe_standard;
+ charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
charmap.encoding_id = 0;
clazz = cmap_classes->standard;
break;
case T1_ENCODING_TYPE_EXPERT:
- charmap.encoding = ft_encoding_adobe_expert;
+ charmap.encoding = FT_ENCODING_ADOBE_EXPERT;
charmap.encoding_id = 1;
clazz = cmap_classes->expert;
break;
case T1_ENCODING_TYPE_ARRAY:
- charmap.encoding = ft_encoding_adobe_custom;
+ charmap.encoding = FT_ENCODING_ADOBE_CUSTOM;
charmap.encoding_id = 2;
clazz = cmap_classes->custom;
break;
case T1_ENCODING_TYPE_ISOLATIN1:
- charmap.encoding = ft_encoding_latin_1;
+ charmap.encoding = FT_ENCODING_ADOBE_LATIN_1;
charmap.encoding_id = 3;
clazz = cmap_classes->unicode;
break;
@@ -584,7 +584,7 @@
slot->control_data = 0;
slot->control_len = 0;
slot->other = 0;
- slot->format = ft_glyph_format_none;
+ slot->format = FT_GLYPH_FORMAT_NONE;
slot->linearHoriAdvance = 0;
slot->linearVertAdvance = 0;
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 48153a4..d54eecc 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -484,7 +484,7 @@
{
FT_CharMapRec charmap;
- charmap.encoding = ft_encoding_unicode;
+ charmap.encoding = FT_ENCODING_UNICODE;
charmap.platform_id = 3;
charmap.encoding_id = 1;
charmap.face = root;
@@ -614,7 +614,7 @@
bitmap->pitch = pitch;
bitmap->rows = font->header.pixel_height;
- bitmap->pixel_mode = ft_pixel_mode_mono;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
if ( FT_ALLOC( bitmap->buffer, pitch * bitmap->rows ) )
goto Exit;
@@ -634,7 +634,7 @@
slot->flags = FT_GLYPH_OWN_BITMAP;
slot->bitmap_left = 0;
slot->bitmap_top = font->header.ascent;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
/* now set up metrics */
slot->metrics.horiAdvance = bitmap->width << 6;
@@ -642,7 +642,7 @@
slot->metrics.horiBearingY = slot->bitmap_top << 6;
slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
- slot->format = ft_glyph_format_bitmap;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
Exit:
return error;
diff --git a/tests/gview.c b/tests/gview.c
index 36d10e4..0e76e19 100644
--- a/tests/gview.c
+++ b/tests/gview.c
@@ -853,15 +853,15 @@ ah_draw_smooth_points( void )
{
if ( ah_debug_hinter && option_show_smooth )
{
- AH_Outline* glyph = ah_debug_hinter->glyph;
+ AH_Outline glyph = ah_debug_hinter->glyph;
FT_UInt count = glyph->num_points;
- AH_Point* point = glyph->points;
+ AH_Point point = glyph->points;
nv_painter_set_color( painter, SMOOTH_COLOR, 256 );
for ( ; count > 0; count--, point++ )
{
- if ( !( point->flags & ah_flag_weak_interpolation ) )
+ if ( !( point->flags & AH_FLAG_WEAK_INTERPOLATION ) )
{
NV_Transform transform, *trans = &transform;
NV_Vector vec;
@@ -883,9 +883,9 @@ ah_draw_edges( void )
{
if ( ah_debug_hinter )
{
- AH_Outline* glyph = ah_debug_hinter->glyph;
+ AH_Outline glyph = ah_debug_hinter->glyph;
FT_UInt count;
- AH_Edge* edge;
+ AH_Edge edge;
FT_Pos pp1 = ah_debug_hinter->pp1.x;
nv_painter_set_color( painter, EDGE_COLOR, 256 );
@@ -938,12 +938,12 @@ ah_draw_edges( void )
/* draw vertical segments */
if ( option_show_vert_hints )
{
- AH_Segment* seg = glyph->vert_segments;
+ AH_Segment seg = glyph->vert_segments;
FT_UInt count = glyph->num_vsegments;
for ( ; count > 0; count--, seg++ )
{
- AH_Point *first, *last;
+ AH_PointRec *first, *last;
NV_Vector v1, v2;
NV_Pos y1, y2, x;
@@ -977,12 +977,12 @@ ah_draw_edges( void )
/* draw horizontal segments */
if ( option_show_horz_hints )
{
- AH_Segment* seg = glyph->horz_segments;
+ AH_Segment seg = glyph->horz_segments;
FT_UInt count = glyph->num_hsegments;
for ( ; count > 0; count--, seg++ )
{
- AH_Point *first, *last;
+ AH_PointRec *first, *last;
NV_Vector v1, v2;
NV_Pos y1, y2, x;
@@ -1016,12 +1016,12 @@ ah_draw_edges( void )
if ( option_show_vert_hints && option_show_links )
{
- AH_Segment* seg = glyph->vert_segments;
+ AH_Segment seg = glyph->vert_segments;
FT_UInt count = glyph->num_vsegments;
for ( ; count > 0; count--, seg++ )
{
- AH_Segment* seg2 = NULL;
+ AH_Segment seg2 = NULL;
NV_Path link;
NV_Vector v1, v2;
@@ -1052,12 +1052,12 @@ ah_draw_edges( void )
if ( option_show_horz_hints && option_show_links )
{
- AH_Segment* seg = glyph->horz_segments;
+ AH_Segment seg = glyph->horz_segments;
FT_UInt count = glyph->num_hsegments;
for ( ; count > 0; count--, seg++ )
{
- AH_Segment* seg2 = NULL;
+ AH_Segment seg2 = NULL;
NV_Path link;
NV_Vector v1, v2;
@@ -1113,7 +1113,7 @@ draw_glyph( int glyph_index )
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_BITMAP );
if (error) Panic( "could not load glyph" );
- if ( face->glyph->format != ft_glyph_format_outline )
+ if ( face->glyph->format != FT_GLYPH_FORMAT_OUTLINE )
Panic( "could not load glyph outline" );
error = nv_path_new_from_outline( renderer,
@@ -1167,7 +1167,7 @@ draw_glyph( int glyph_index )
for ( m = first; m <= last; m++ )
{
- color = (out.tags[m] & FT_Curve_Tag_On)
+ color = (out.tags[m] & FT_CURVE_TAG_ON)
? ON_COLOR
: OFF_COLOR;