* src/base/fttrigon.c, src/base/ftgloadr.c: Inlude FT_INTERNAL_OBJECTS_H. * src/base/ftstroke.c (FT_Outline_GetInsideBorder, FT_Outline_GetOutsideBorder): s/or/o/ to make it compile with C++ compilers. * src/cache/ftcmru.c, include/freetype/cache/ftcmru.h: s/select/selection/ to avoid compiler warning. * src/cff/cffload.h: s/select/ftselect/ to avoid potential compiler warning. Formatting.
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
diff --git a/ChangeLog b/ChangeLog
index c2bb7fc..8cf5a1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2003-12-25 Werner Lemberg <wl@gnu.org>
+
+ * src/base/fttrigon.c, src/base/ftgloadr.c: Inlude
+ FT_INTERNAL_OBJECTS_H.
+
+ * src/base/ftstroke.c (FT_Outline_GetInsideBorder,
+ FT_Outline_GetOutsideBorder): s/or/o/ to make it compile with
+ C++ compilers.
+
+ * src/cache/ftcmru.c, include/freetype/cache/ftcmru.h:
+ s/select/selection/ to avoid compiler warning.
+ * src/cff/cffload.h: s/select/ftselect/ to avoid potential
+ compiler warning.
+
2003-12-24 Werner Lemberg <wl@gnu.org>
* src/cache/ftcsbits.c (FTC_SNode_Weight):
@@ -25,8 +39,14 @@
`(x) & ~63' instead!
Updated all related code.
- * include/freetype/ftstroke.h, src/base/ftstroke.c: Added support
- for extraction of "inside" and "outside" borders.
+ Add support for extraction of `inside' and `outside' borders.
+
+ * src/base/ftstroke.c (FT_StrokerBorder): New enumeration.
+ (FT_Outline_GetInsideBorder, FT_Outline_GetOutsideBorder,
+ FT_Stroker_GetBorderCounts, FT_Stroker_ExportBorder): New functions.
+ (FT_StrokeBorderRec): New boolean member `valid'.
+ (ft_stroke_border_get_counts): Updated.
+ * include/freetype/ftstroke.h: Updated.
2003-12-22 Werner Lemberg <wl@gnu.org>
@@ -61,11 +81,11 @@
src/cache/ftcbasic.c (added),
src/cache/ftclru.c (removed):
- *Complete* rewrite of the cache sub-system to "solve" the
+ *Complete* rewrite of the cache sub-system to `solve' the
following points:
- all public APIs have been moved to FT_CACHE_H, everything
- under "include/freetype/cache" is only needed by client
+ under `include/freetype/cache' is only needed by client
applications that want to implement their own caches
- a new function named FTC_Manager_RemoveFaceID to deal
@@ -2292,8 +2312,8 @@
(not defined, but in comments) for the unpatented hinting system.
* include/freetype/internal/tttypes.h (TT_FaceRec)
- [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: New element "FT_Bool
- unpatented_hinting".
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: New element `FT_Bool
+ unpatented_hinting'.
* src/truetype/ttinterp.c (NO_APPLE_PATENT, APPLE_THRESHOLD):
Removed.
@@ -2359,8 +2379,8 @@
* src/pcf/pcfread.c (pcf_load_font): Fixed the computation of
face->num_glyphs. We must increase the value by 1 to respect the
- convention that glyph index 0 always corresponds to the "missing
- glyph".
+ convention that glyph index 0 always corresponds to the `missing
+ glyph'.
2003-04-24 Werner Lemberg <wl@gnu.org>
@@ -2456,7 +2476,7 @@
2003-04-09 Torrey Lyons <torrey@mrcla.com>
* src/base/ftmac.c (open_face_from_buffer): Removed a double-free
- bug that had nasty consequences when trying to open an "invalid"
+ bug that had nasty consequences when trying to open an `invalid'
font on a Mac.
2003-04-09 Mike Fabian <mfabian@suse.de>
@@ -2475,7 +2495,7 @@
2003-04-03 Martin Muskens <mmuskens@aurelon.com>
* src/type1/t1load.c (T1_Open_Face): Fixed the code to make it
- handle special cases where a font only contains a ".notdef" glyph
+ handle special cases where a font only contains a `.notdef' glyph
(happens in PDF-embedded fonts). Otherwise, FT_Panic was called.
2003-03-27 David Turner <david@freetype.org>
@@ -2584,8 +2604,8 @@
2003-03-13 David Turner <david@freetype.org>
Added new environment variables to control memory debugging with
- FreeType. See the description of "FT2_DEBUG_MEMORY",
- "FT2_ALLOC_TOTAL_MAX" and "FT2_ALLOC_COUNT_MAX" in DEBUG.TXT.
+ FreeType. See the description of `FT2_DEBUG_MEMORY',
+ `FT2_ALLOC_TOTAL_MAX' and `FT2_ALLOC_COUNT_MAX' in DEBUG.TXT.
* src/base/ftdbgmem.c (FT_MemTableRec): Add `alloc_count',
`bound_total', `alloc_total_max', `bound_count', `alloc_count_max'.
@@ -2630,7 +2650,7 @@
(ftc_cmap_family_init): The cmap cache now
supports UCS-4 charmaps when available in Asian fonts.
- * src/sfnt/ttload.c, src/base/ftobjs.c: Changed "asian" to "Asian"
+ * src/sfnt/ttload.c, src/base/ftobjs.c: Changed `asian' to `Asian'
in comments.
2003-02-25 David Turner <david@freetype.org>
@@ -2651,7 +2671,7 @@
- The table loaded now scans for *undocumented* elements of a
physical font's auxiliary data record. This is necessary to
- retrieve the "real" family and style names.
+ retrieve the `real' family and style names.
NOTE THAT THESE CHANGES THE FAMILY NAME OF MANY PFR FONTS!
@@ -2697,7 +2717,7 @@
`exec->metrics'.
* src/autohint/ahhint.c (ah_hinter_load): Disabled the advance width
- "correction" which seemed to provide more trouble than benefits.
+ `correction' which seemed to provide more trouble than benefits.
2003-02-13 Graham Asher <graham.asher@btinternet.com>
@@ -2738,7 +2758,7 @@
* src/pfr/pfrsbit.c: Removed compiler warnings.
* src/cache/ftccmap.c (ftc_cmap_family_init): Changed an FT_ERROR
- into an FT_TRACE1 since it caused "ftview" and others to dump too
+ into an FT_TRACE1 since it caused `ftview' and others to dump too
much junk when trying to display a waterfall with a font without a
Unicode charmap (e.g. SYMBOL.TTF).
@@ -2802,9 +2822,9 @@
(pcf_find_property): Decorate it with FT_LOCAL_DEF.
* src/pcf/pcfread.h: New file, providing `pcf_find_property'.
- * src/sfnt/ttload.c (sfnt_dir_check): Relaxed the "head" table size
+ * src/sfnt/ttload.c (sfnt_dir_check): Relaxed the `head' table size
verification to accept a few broken fonts who pad the size
- incorrectly (the table should be padded, but its "size" field
+ incorrectly (the table should be padded, but its `size' field
shouldn't according to the specification).
2003-01-18 Werner Lemberg <wl@gnu.org>
@@ -2870,9 +2890,9 @@
Patches to the auto-hinter in order to slightly improve the output.
Note that everything is controlled through the new
- FT_CONFIG_OPTION_CHESTER_HINTS defined in "ftoption.h". There are
+ FT_CONFIG_OPTION_CHESTER_HINTS defined in `ftoption.h'. There are
also individual FT_CONFIG_CHESTER_XXX macros to control individual
- "features".
+ `features'.
Note that all improvements are enabled by default, but can be
tweaked for optimization and testing purposes. The configuration
@@ -2914,11 +2934,11 @@
2003-01-08 Huw Dawies <huw@codeweavers.com>
* src/winfonts/winfnt.c (winfnt_header_fields): Read 16 bytes into
- "reserved2", not "reserved".
+ `reserved2', not `reserved'.
* src/base/ftobjs.c (find_unicode_charmap): Fixed the error code
returned when the font doesn't contain a Unicode charmap. This
- allows FT2 to load "symbol.ttf" and a few others correctly since the
+ allows FT2 to load `symbol.ttf' and a few others correctly since the
last release.
(open_face): Fix return value.
@@ -2971,7 +2991,7 @@
assertion, and changing code to avoid hash table size contraction.
* src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: Adding
- "ftstroker" to default build, as optional component.
+ `ftstroker' to default build, as optional component.
2002-12-26 David Turner <david@freetype.org>
@@ -3102,7 +3122,7 @@
configuration (typically by adding -D flags at compile time).
* src/sfnt/ttcmap0.c (tt_face_build_cmaps): Removed compiler
- warnings in optimized mode relative to the "volatile" local
+ warnings in optimized mode relative to the `volatile' local
variables. This was not a compiler bug after all, but the fact that
a pointer to a volatile variable is not the same as a volatile
pointer to a variable :-)
@@ -3234,8 +3254,8 @@
src/tools/docmaker/tohtml.py: Fixing a few nasty bugs.
* src/sfnt/ttcmap0.c (tt_cmap4_validate): The validator for format 4
- sub-tables is now capable of dealing with invalid "length" fields at
- the start of the sub-table. This allows fonts like "mg______.ttf"
+ sub-tables is now capable of dealing with invalid `length' fields at
+ the start of the sub-table. This allows fonts like `mg______.ttf'
(i.e. Marriage) to return accurate charmaps.
* docs/CHANGES: Updated.
@@ -3499,7 +3519,7 @@
Removed conditional code. This fixes a bug that prevented
compilation in debug mode of template instantiation.
- * include/freetype/ftimage.h: Removed incorrect "zft_" definitions
+ * include/freetype/ftimage.h: Removed incorrect `zft_' definitions
and updated constants documentation comments.
* src/cff/cffparse.c (cff_parser_run): Fixed the CFF table loader.
@@ -3507,7 +3527,7 @@
certain fonts.
* include/freetype/freetype.h (FT_FaceRec): Updating documentation
- comment. The "descender" value is always *negative*, not positive.
+ comment. The `descender' value is always *negative*, not positive.
2002-09-09 Owen Taylor <owen@redhat.com>
@@ -3811,7 +3831,7 @@
The automatic and Postscript hinter now automatically detect
inflection points in glyph outlines and treats them specially. This
is very useful to prevent nasty effect like the disappearing
- diagonals of "S" and "s" in many, many fonts.
+ diagonals of `S' and `s' in many, many fonts.
* src/autohint/ahtypes.h (ah_flag_inflection): New macro.
* src/autohint/ahangles.c (ah_angle_diff): New function.
@@ -3825,8 +3845,8 @@
* src/tools/docmaker/docmaker.py, src/tools/docmaker/utils.py,
src/tools/docmaker/tohtml.py: Updating the DocMaker tool.
- * include/freetype/freetype.h: Changing the type of the "load_flags"
- parameter from "FT_Int" to "FT_Int32", this in order to support more
+ * include/freetype/freetype.h: Changing the type of the `load_flags'
+ parameter from `FT_Int' to `FT_Int32', this in order to support more
options. This should only break binary and/or source compatibility
on 16-bit platforms (Atari?).
(FT_LOAD_NO_AUTOHINT): New macro.
@@ -3995,7 +4015,7 @@
2002-07-30 David Turner <david@freetype.org>
* include/freetype/ftincrem.h: Adding new experimental header file
- to demonstrate a "cleaner" API to support incremental font loading.
+ to demonstrate a `cleaner' API to support incremental font loading.
* include/freetype/config/ftheader.h (FT_INCREMENTAL_H): New macro.
@@ -4031,10 +4051,10 @@
2002-07-24 Graham Asher <graham.asher@btinternet.com>
* src/truetype/ttobjs.c: Fix for bug reported by Sven Neumann
- [sven@gimp.org] on the FreeType development forum: "If
+ [sven@gimp.org] on the FreeType development forum: `If
FT_CONFIG_OPTION_INCREMENTAL is undefined (this is the default), the
TrueType loader crashes in line 852 of src/truetype/ttgload.c when
- it tries to access face->glyph_locations."
+ it tries to access face->glyph_locations.'
2002-07-18 Graham Asher <graham.asher@btinternet.com>
@@ -4137,8 +4157,8 @@
2002-07-11 David Turner <david@freetype.org>
Changing the SFNT loader to check for SFNT-based font files
- differently. We now ignore the range "helper" fields and check the
- "head" table's magic number instead.
+ differently. We now ignore the range `helper' fields and check the
+ `head' table's magic number instead.
* include/freetype/internal/tttypes.h (SFNT_HeaderRec): Add `offset'
field.
@@ -4655,7 +4675,7 @@
2002-06-07 David Turner <david@freetype.org>
Fixed the bug that prevented the correct display of fonts with
- "ftview".
+ `ftview'.
* src/type42/t42drivr.c: Split into...
* src/type42/t42drivr.h, src/type42/t42parse.c,
@@ -4761,8 +4781,8 @@
* include/freetype/t1tables.h: Updated.
* src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms:
- Updating build control files for the new files "ftxf86.c" and
- "fttype1.c" in src/base.
+ Updating build control files for the new files `ftxf86.c' and
+ `fttype1.c' in src/base.
* src/pshinter/pshglob.c (psh_blues_scale_zones): Fixed a bug that
prevented family blue zones substitution from hapenning correctly.
@@ -4784,7 +4804,7 @@
Fixing the SFNT name table loader to support various buggy fonts.
It now ignores empty name entries, entries with invalid pointer
Offsets and certain fonts containing tables with broken
- "storageOffset" fields.
+ `storageOffset' fields.
Name strings are now loaded on demand, which reduces the memory
requirements for a given FT_Face tremendously (for example, the name
@@ -4838,7 +4858,7 @@
2002-05-21 David Turner <david@freetype.org>
* src/bdf/bdflib.c: Removed compiler warning, and changed all tables
- to the "static const" storage specifier (instead of simply
+ to the `static const' storage specifier (instead of simply
`static').
* src/type42/t42drivr.c (hexval): Use more efficient code.
@@ -4849,7 +4869,7 @@
src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk
(FT_Get_BDF_Charset_ID): New API to retrieve BDF-specific strings
from a face. This is much cleaner than accessing the internal types
- "BDF_Public_Face" defined in FT_INTERNAL_BDF_TYPES_H.
+ `BDF_Public_Face' defined in FT_INTERNAL_BDF_TYPES_H.
2002-05-21 Werner Lemberg <wl@gnu.org>
@@ -5003,11 +5023,11 @@
2002-05-01 David Turner <david@freetype.org>
* src/sfnt/sfobjs.c (tt_face_get_name): Fixing a bug that caused
- FreeType to crash when certain broken fonts (e.g. "hya6gb.ttf")
+ FreeType to crash when certain broken fonts (e.g. `hya6gb.ttf')
were opened.
* src/sfnt/ttload.c (TT_Load_Names): Applied a small work-around to
- manage fonts containing a broken name table (e.g. "hya6gb.ttf").
+ manage fonts containing a broken name table (e.g. `hya6gb.ttf').
* src/sfnt/ttcmap0.c (tt_cmap4_validate): Fixed over-restrictive
validation test. The charmap validator now accepts overlapping
@@ -5174,8 +5194,8 @@
* src/base/ftobjs.c, builds/win32/ftdebug.c,
builds/amiga/src/base/ftdebug.c: Version 2.1.0 couldn't be linked
against applications in Win32 and Amiga builds due to changes to
- "src/base/ftdebug.c" that were not properly propagated to
- "builds/win32" and "builds/amiga". This has been fixed.
+ `src/base/ftdebug.c' that were not properly propagated to
+ `builds/win32' and `builds/amiga'. This has been fixed.
* include/freetype/internal/ftobject.h,
include/freetype/internal/ftexcept.h, include/freetype/ftsysmem.h,
@@ -5262,7 +5282,7 @@
builds/amiga/src/base/ftdebug.c:
- Added the new configuration file "ftstdlib.h" used to define
+ Added the new configuration file `ftstdlib.h' used to define
aliases for all ISO C library functions used by the engine
(e.g. strlen, qsort, setjmp, etc.).
@@ -5503,7 +5523,7 @@
* src/psaux/t1cmap.h, src/psaux/t1cmap.c, src/type1/t1cmap.h,
src/type1/t1cmap.c: Updating and moving the Type 1 FT_CMap support
- from "src/type1" to "src/psaux" since it is going to be shared by
+ from `src/type1' to `src/psaux' since it is going to be shared by
the Type 1 and CID font drivers.
* src/psaux/Jamfile, src/psaux/psaux.c, src/psaux/psauxmod.c,
@@ -5713,11 +5733,11 @@
* src/cid/cidriver.c (cid_get_postscript_name): Fixed a bug that
caused the CID driver to return Postscript font names with a leading
- slash ("/") as in "/MOEKai-Regular".
+ slash (`/') as in `/MOEKai-Regular'.
* src/sfnt/ttload.c (TT_Load_Names), src/sfnt/sfobjs.c (Get_Name),
src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fixed the loader so
- that it accepts broken fonts like "foxjump.ttf", which made FreeType
+ that it accepts broken fonts like `foxjump.ttf', which made FreeType
crash when trying to load them.
Also improved the name table parser to be able to load
@@ -5777,7 +5797,7 @@
* src/sfnt/ttload.c (TT_Load_Names): Simplifying and securing the
names table loader. Invalid individual name entries are now handled
correctly. This allows the loading of very buggy fonts like
- "foxjump.ttf" without allocating tons of memory and causing crashes.
+ `foxjump.ttf' without allocating tons of memory and causing crashes.
* src/otlayout/otlcommon.h, src/otlayout/otlcommon.c: Adding (still
experimental) code for OpenType Layout tables validation and
@@ -5824,14 +5844,14 @@
ft_io_stream => ft_ansi_stream_io (in base/ftsystem.c only)
* src/base/ftutil.c: New file. Contains all memory and list
- management code (previously in "ftobjs.c" and "ftlist.c",
+ management code (previously in `ftobjs.c' and `ftlist.c',
respectively).
* include/freetype/internal/ftobjs.h: Moving all code related to
glyph loaders to ...
- * include/freetype/"internal/ftgloadr.h: This new file.
- "FT_GlyphLoader" is now a pointer to the structure
- "FT_GlyphLoaderRec".
+ * include/freetype/internal/ftgloadr.h: This new file.
+ `FT_GlyphLoader' is now a pointer to the structure
+ `FT_GlyphLoaderRec'.
(ft_glyph_own_bitmap): Renamed to ...
(FT_GLYPH_OWN_BITMAP): This.
* src/base/ftobjs.c: Moving all code related to glyph loaders
@@ -5846,8 +5866,8 @@
2002-02-21 David Turner <david@freetype.org>
Modified the debug sub-system initialization. Trace levels can now
- be specified within the "FT2_DEBUG" environment variable. See the
- comments within "ftdebug.c" for more details.
+ be specified within the `FT2_DEBUG' environment variable. See the
+ comments within `ftdebug.c' for more details.
* src/base/ftdebug.c: (FT_SetTraceLevel): Removed.
(ft_debug_init): New function.
@@ -5872,8 +5892,8 @@
Removed. Both files are now completely obsolete.
* src/base/Jamfile, src/base/rules.mk: Updated.
- * include/freetype/fterrors.h: Adding "#undef FT_ERR_CAT" and
- `#undef FT_ERR_XCAT" to avoid warnings with certain compilers (like
+ * include/freetype/fterrors.h: Adding `#undef FT_ERR_CAT' and
+ `#undef FT_ERR_XCAT' to avoid warnings with certain compilers (like
LCC).
* src/pshinter/pshalgo2.c (print_zone): Renamed to ...
@@ -5885,7 +5905,7 @@
2002-02-20 David Turner <david@freetype.org>
- * README: Adding "devel@freetype.org" address for bug reports.
+ * README: Adding `devel@freetype.org' address for bug reports.
2002-02-20 Werner Lemberg <wl@gnu.org>
@@ -6013,7 +6033,7 @@
* src/pcf/pcfdriver.c (FT_Done_Face): Fixed small memory leak.
- * src/pcf/pcfread.c (pcf_load_font): Now handles the "AVERAGE_WIDTH"
+ * src/pcf/pcfread.c (pcf_load_font): Now handles the `AVERAGE_WIDTH'
property to return correct character pixel (width/height) pairs for
embedded bitmaps.
@@ -6079,7 +6099,7 @@
2002-01-30 David Turner <david@freetype.org>
* INSTALL: Moved to ...
- * docs/INSTALL: Here to avoid conflicts with the "install" script on
+ * docs/INSTALL: Here to avoid conflicts with the `install' script on
Windows, where the filesystem doesn't preserve case.
2002-01-29 David Turner <david@freetype.org>
@@ -6089,7 +6109,7 @@
./configure --disable-shared --disable-nls
- the "--disable-nls" was incorrectly sent to the "make" program.
+ the `--disable-nls' was incorrectly sent to the `make' program.
2002-01-29 Werner Lemberg <wl@gnu.org>
@@ -6136,7 +6156,7 @@
2002-01-21 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
- * docs/PATENTS: Typo fixed (thanks to Detlef "Hawkeye" Würkner) in
+ * docs/PATENTS: Typo fixed (thanks to Detlef `Hawkeye' Würkner) in
the URL for the online resource.
2002-01-18 Ian Brown <ian.brown@printsoft.de>
@@ -6211,7 +6231,7 @@
* src/autohint/ahhint.c (ah_align_linked_edge): Modified computation
of auto-hinted stem widths; this avoids color fringes in
- "ClearType-like" rendering.
+ `ClearType-like' rendering.
* src/truetype/ttgload.c (TT_Load_Glyph_Header,
TT_Load_Simple_Glyph, TT_Load_Composite_Glyph, load_truetype_glyph):
@@ -6238,22 +6258,22 @@
2002-01-03 Keith Packard <keithp@keithp.com>
* builds/unix/ftsystem.c (FT_New_Stream): Added a fix to ensure that
- all FreeType input streams are closed in child processes of a "fork"
+ all FreeType input streams are closed in child processes of a `fork'
on Unix systems. This is important to avoid (potential) access
control issues.
2002-01-03 David Turner <david@freetype.org>
* src/type1/t1objs.c (T1_Face_Init): Fixed a bug that crashed the
- library when dealing with certain weird fonts like "Stalingrad", in
- "sadn.pfb" (this font has no full font name entry).
+ library when dealing with certain weird fonts like `Stalingrad', in
+ `sadn.pfb' (this font has no full font name entry).
* src/base/ftoutln.c, include/freetype/ftoutln.h (FT_Outline_Check):
New function to check the consistency of outline data.
* src/base/ftobjs.c (FT_Load_Glyph): Use `FT_Outline_Check' to
ensure that loaded glyphs are valid. This allows certain fonts like
- "tt1095m_.ttf" to be loaded even though it appears they contain
+ `tt1095m_.ttf' to be loaded even though it appears they contain
really funky glyphs.
There still is a bug there, though.
@@ -6304,8 +6324,8 @@
2001-12-21 David Turner <david@freetype.org>
* src/pshinter/pshrec.c (ps_hints_t2mask, ps_hints_t2counter):
- Ignore invalid "hintmask" and "cntrmask" operators (instead of
- returning an error). Glyph 2028 of the CFF font "MSung-Light-Acro"
+ Ignore invalid `hintmask' and `cntrmask' operators (instead of
+ returning an error). Glyph 2028 of the CFF font `MSung-Light-Acro'
couldn't be rendered otherwise (it seems its charstring is buggy,
though this requires more analysis).
(FT_COMPONENT): Define.
@@ -6401,12 +6421,12 @@
routines were never released when CID faces were destroyed.
* src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: Updated
- to move the definition of encoding tables back within "cffload.c"
+ to move the definition of encoding tables back within `cffload.c'
instead of making them part of a shared header (causing problems in
- "multi" builds). This reverts change 2001-08-08.
+ `multi' builds). This reverts change 2001-08-08.
* docs/CHANGES: Updated for 2.0.6 release.
- * docs/TODO: Added "stem3 and counter hints support" to the TODO
+ * docs/TODO: Added `stem3 and counter hints support' to the TODO
list for the Postscript hinter.
* docs/BUGS: Closed the AUTOHINT-NO-SBITS bug.
@@ -6420,12 +6440,12 @@
that prevented composites from loading correctly, due to missing
parentheses around macro parameters.
- * src/sfnt/sfobjs.c (SFNT_Load_Face): Make the "post" and "name"
+ * src/sfnt/sfobjs.c (SFNT_Load_Face): Make the `post' and `name'
tables optional to load PCL fonts properly.
* src/truetype/ttgload.c (TT_Load_Glyph), src/base/ftobjs.c
(FT_Load_Glyph), include/freetype/freetype.h (FT_LOAD_SBITS_ONLY):
- "Fixed" the bug that prevented embedded bitmaps to be loaded when
+ `Fixed' the bug that prevented embedded bitmaps to be loaded when
the auto-hinter is used. This actually is a hack but will be enough
until the internal re-design scheduled for FreeType 2.1.
@@ -6514,9 +6534,9 @@
2001-12-11 David Turner <david@freetype.org>
* builds/unix/freetype-config.in: Modified the script to prevent
- passing "-L/usr/lib" to gcc.
+ passing `-L/usr/lib' to gcc.
- * docs/FTL.TXT: Simple fix (change "LICENSE.TXT" to "FTL.TXT").
+ * docs/FTL.TXT: Simple fix (change `LICENSE.TXT' to `FTL.TXT').
* builds/unix/freetype2.m4: New file for checking configure paths.
We need to install it in $(prefix)/share/aclocal/freetype2.m4 but I
@@ -6537,7 +6557,7 @@
2001-12-10 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
* src/pcf/pcfdriver.c (PCF_Init_Face): Allow Xft to use PCF fonts
- by setting the "face->metrics.max_advance" correctly.
+ by setting the `face->metrics.max_advance' correctly.
2001-12-07 David Turner <david@freetype.org>
@@ -6636,8 +6656,8 @@
* include/freetype/ttnameid.h: Added some new Microsoft language
codes and LCIDs as found in MSDN (Passport SDK). Also added
comments about the meaning of bit 57 of the `OS/2' table
- (TT_UCR_SURROGATES) which (with OpenType v.1.3) now means "there is
- a character beyond 0xFFFF in this font". Thanks to Detlef Würkner
+ (TT_UCR_SURROGATES) which (with OpenType v.1.3) now means `there is
+ a character beyond 0xFFFF in this font'. Thanks to Detlef Würkner
<TetiSoft@apg.lahn.de> for noticing this.
2001-11-20 David Turner <david@freetype.org>
@@ -6684,7 +6704,7 @@
Fix typos.
* tests/gview.c: Updated the debugging glyph viewer to show the
- hints generated by the "autohint" module.
+ hints generated by the `autohint' module.
2001-10-27 David Turner <david@freetype.org>
@@ -6695,7 +6715,7 @@
* include/freetype/ftcache.h, include/freetype/cache/*.h,
src/cache/*.c: Major re-design of the cache sub-system to provide
- better performance as well as an "Acquire"/"Release" API. Seems to
+ better performance as well as an `Acquire'/`Release' API. Seems to
work well here, but probably needs a bit more testing.
2001-10-26 Leonard Rosenthol <leonardr@lazerware.com>
@@ -6763,7 +6783,7 @@
the source file.
* src/base/ftdbgmem.c: New debugging memory manager. You must
- define the FT_DEBUG_MEMORY macro in "ftoption.h" to enable it. It
+ define the FT_DEBUG_MEMORY macro in `ftoption.h' to enable it. It
will record every memory block allocated and report simple errors
like memory leaks and double deletes.
@@ -6817,7 +6837,7 @@
compiler warnings.
* src/pshinter/module.mk, src/pshinter/rules.mk: Adding control
- files to build the PostScript hinter with the "old" build system.
+ files to build the PostScript hinter with the `old' build system.
2001-10-19 Jacob Jansen <joukj@hrem.stm.tudelft.nl>
@@ -6827,7 +6847,7 @@
2001-10-18 David Turner <david@freetype.org>
* src/psnames/pstables.h, src/tools/glnames.py: Rewrote the
- "glnames.py" script used to generate the "pstables.h" header file.
+ `glnames.py' script used to generate the `pstables.h' header file.
The old one contained a serious bug that made FreeType return
incorrect glyph names for certain glyphs.
@@ -6869,7 +6889,7 @@
* tests/Jamfile, tests/gview.c: Adding a new glyph hinting
viewer/debugger to the source tree. Note that you will _not_ be
able to compile it since it depends on an unavailable graphics
- library named "Nirvana" to render vector images.
+ library named `Nirvana' to render vector images.
2001-10-17 David Turner <david@freetype.org>
@@ -6991,7 +7011,7 @@
in PDF documents that were automatically generated from TrueType
ones).
- * src/type1/t1load.c (is_alpha): Now supports "+" in font names;
+ * src/type1/t1load.c (is_alpha): Now supports `+' in font names;
this is used in embedded fonts.
* src/psaux/psobjs.c (PS_Table_Add): Fixed a reallocation bug that
@@ -7073,7 +7093,7 @@
(cff_get_glyph_index): Minor documentation change.
* src/type1/t1driver.c (t1_get_name_index): New function used in
- Get_Interface as the function returned when the "name_index"
+ Get_Interface as the function returned when the `name_index'
function is requested.
(get_t1_glyph_name): Renamed to t1_get_glyph_name for consistency.
@@ -7090,10 +7110,10 @@
* src/cff/cffdrivr.c (cff_get_name_index): New function, returned
when `cff_get_interface' is called with a request for the
- "name_index" function.
+ `name_index' function.
(cff_get_interface): Modified so that it returns the function
- `cff_get_name_index' when the "name_index" function is requested.
+ `cff_get_name_index' when the `name_index' function is requested.
* src/base/ftobjs.c (FT_Get_Name_Index): New function, used to
return a glyph index for a given glyph name only if the driver
@@ -7239,7 +7259,7 @@
Removing _lots_ of compiler warnings when the most pedantic warning
levels of Visual C++ and Borland C++ are used. Too many files to be
listed here, but FT2 now compiles without warnings with VC++ and the
- "/W4" warning level (lint-style).
+ `/W4' warning level (lint-style).
* include/freetype/freetype.h (FT_New_Memory_Face): Updated
documentation.
@@ -7313,9 +7333,9 @@
2001-06-14 David Turner <david@freetype.org>
Modified the TrueType interpreter to let it use the new
- trigonometric functions provided in "fttrigon.h". This gets rid of
+ trigonometric functions provided in `fttrigon.h'. This gets rid of
some old 64-bit computation routines, as well as many warnings when
- compiling the library with the "long long" 64-bit integer type.
+ compiling the library with the `long long' 64-bit integer type.
* include/freetype/config/ftoption.h: Undefine
FT_CONFIG_OPTION_OLD_CALCS.
@@ -7437,7 +7457,7 @@
2001-05-25 David Turner <david@freetype.org>
- Moved several documents from the top-level to the "docs" directory.
+ Moved several documents from the top-level to the `docs' directory.
* src/base/ftcalc.c (FT_DivFix): Small fix to return value.
@@ -7491,9 +7511,9 @@
* builds/newline: New file.
* builds/top_level.mk, builds/detect.mk: Use it. This fixes
- problems with Make on Windows 2000, as well as problems when "make
- distclean" is invoked on a non-Unix platform when there is no
- "config.mk" in the current directory.
+ problems with Make on Windows 2000, as well as problems when `make
+ distclean' is invoked on a non-Unix platform when there is no
+ `config.mk' in the current directory.
* builds/freetype.mk: Fixed a problem with object deletions under
Dos/Windows/OS/2 systems.
@@ -7545,7 +7565,7 @@
* src/base/ftcalc.c (FT_MulDiv, FT_MulFix, FT_DivFix): Various tiny
fixes related to rounding in 64-bits routines and
- pseudo-"optimizations".
+ pseudo-`optimizations'.
2001-04-27 David Turner <david@freetype.org>
@@ -7572,7 +7592,7 @@
fixed-point square root computation. It is now used even with
64-bits integers, as it is _much_ faster than calling FT_Sqrt64 :-)
- * src/base/ftbbox.c: Removed invalid "#include FT_BEZIER_H" line.
+ * src/base/ftbbox.c: Removed invalid `#include FT_BEZIER_H' line.
2001-04-25 David Turner <david@freetype.org>
@@ -7590,7 +7610,7 @@
2001-04-20 David Turner <david@freetype.org>
- * ftconfig.h, ftoption.h: Updated "ftconfig.h" to detect 64-bit int
+ * ftconfig.h, ftoption.h: Updated `ftconfig.h' to detect 64-bit int
types on platforms where Autoconf is not available). Also removed
FTCALC_USE_LONG_LONG and replaced it with
FT_CONFIG_OPTION_FORCE_INT64.
@@ -7707,7 +7727,7 @@
2001-03-20 David Turner <david.turner@freetype.org>
* include/freetype/config/ftheader.h, include/freetype/ftsnames.h:
- Renamed "ftnames.h" to "ftsnames.h", and FT_NAMES_H to
+ Renamed `ftnames.h' to `ftsnames.h', and FT_NAMES_H to
FT_SFNT_NAMES_H.
* docs/docmaker.py: Added generation of INDEX link in table of
@@ -7717,8 +7737,8 @@
compilation process has changed slightly (no more `src' required in
the include path).
- * builds/*/*-def.mk: Changed the objects directory from "obj" to
- "objs".
+ * builds/*/*-def.mk: Changed the objects directory from `obj' to
+ `objs'.
* include/freetype/config/ftheader.h: Removed obsolete macros like
FT_SOURCE_FILE, etc. and added cache-specific macro definitions that
@@ -7727,7 +7747,7 @@
* src/*/*: Removed the use of FT_SOURCE_FILE, etc. Now, each
component needs to add its own directory to the include path at
- compile time. Modified all "rules.mk" and "descrip.mms"
+ compile time. Modified all `rules.mk' and `descrip.mms'
accordingly.
2001-03-20 Werner Lemberg <wl@gnu.org>
@@ -7753,7 +7773,7 @@
compiler warnings in pedantic modes.
* include/config/ft2build.h, include/config/ftheader.h: The file
- "ft2build.h" was renamed to "ftheader.h" to avoid conflicts with the
+ `ft2build.h' was renamed to `ftheader.h' to avoid conflicts with the
top-level <ft2build.h>.
* include/config/ftheader.h: Added new section describing the #include
@@ -7775,7 +7795,7 @@
via FT_Get_Glyph_Name().
(cff_get_interface): Added support for getting a glyph name via the
- "glyph_name" module interface. Uses the new function
+ `glyph_name' module interface. Uses the new function
get_cff_glyph_name().
Submitted by Sander van der Wal <svdwal@xs4all.nl>.
@@ -7786,7 +7806,7 @@
Submitted by Sander van der Wal <svdwal@xs4all.nl>.
* src/cff/cffgload.c (CFF_Parse_CharStrings): Added support for
- deprecated operator "dotsection".
+ deprecated operator `dotsection'.
Submitted by Sander van der Wal <svdwal@xs4all.nl>.
2001-03-12 Werner Lemberg <wl@gnu.org>
@@ -7972,7 +7992,7 @@
2001-02-01 David Turner <david.turner@freetype.org>
* docs/docmaker.py: Improved the index sorting routine to place
- capital letters before small ones. Added the "<order>" marker to
+ capital letters before small ones. Added the `<order>' marker to
section blocks in order to give the order of blocks.
2001-01-30 Antoine Leca <Antoine.Leca@renault.fr>
@@ -8179,7 +8199,7 @@
* src/smooth/ftgrays.c (grays_convert_glyph): Implement it.
* INSTALL: Updated installation instructions on Win32, listing the
- new "make setup list" target used to list supported
+ new `make setup list' target used to list supported
compilers/targets.
* src/raster/ftraster.c (ft_black_render): Test for unsupported
@@ -8197,7 +8217,7 @@
* builds/win32/detect.mk: Added support for the Intel C/C++
compiler, as well as _preliminary_ (read: doesn't work!) support for
- Watcom. Also added a new setup target. Type "make setup list" for
+ Watcom. Also added a new setup target. Type `make setup list' for
a list of supported command-line compilers on Win32.
* src/base/ftdebug.c: Added dummy symbol to avoid empty file if
@@ -8298,16 +8318,16 @@
pointer).
* src/base/ftsystem.c (FT_Done_Memory): Fixed an obvious bug:
- The ANSI "free()" function was called instead of "memory->free()".
+ The ANSI `free()' function was called instead of `memory->free()'.
* docs/docmaker.py: Added section filtering, multi-page generation
(index page generation is still missing though).
2000-12-04 David Turner <david.turner@freetype.org>
- * builds/unix/install.mk, builds/unix/ft2unix.h: The file "ft2unix.h"
+ * builds/unix/install.mk, builds/unix/ft2unix.h: The file `ft2unix.h'
is now installed as <ft2build.h> for Unix systems. Note that we
- still use the "freetype2/freetype" installation path for now.
+ still use the `freetype2/freetype' installation path for now.
* */*.[ch]: Now using <ft2build.h> as the default build and setup
configuration file in all public headers. Internal source files
@@ -8319,7 +8339,7 @@
* builds/win32/detect.mk, builds/win32/w32-bccd.mk,
builds/win32/w32-dev.mk: Changed the developer build targets to
- "devel-gcc" and "devel-bcc" in order to be able to develop with the
+ `devel-gcc' and `devel-bcc' in order to be able to develop with the
Borland C++ compiler.
2000-12-01 David Turner <david.turner@freetype.org>
@@ -8331,7 +8351,7 @@
* builds/unix/configure.in, builds/unix/configure,
builds/cygwin/configure.in, builds/cygwin/configure: Setting
- "version_info" to 6:1:0 for the 2.0.1 release.
+ `version_info' to 6:1:0 for the 2.0.1 release.
* CHANGES: Added a summary of changes between 2.0.1 and 2.0.
@@ -8358,13 +8378,13 @@
2000-11-30 David Turner <david.turner@freetype.ogr>
* INSTALL: Slightly updated the quick starter documentation to
- include IDE compilation, prevent against BSD Make, and specify "make
- setup" instead of a single "make" for build configuration.
+ include IDE compilation, prevent against BSD Make, and specify `make
+ setup' instead of a single `make' for build configuration.
* include/config/ftbuild.h, include/internal/internal.h: Added new
configuration files used to determine the location of all public,
configuration, and internal header files for FreeType 2. Modified
- all headers under "include/freetype" to reflect this change. Note
+ all headers under `include/freetype' to reflect this change. Note
that we still need to change the library source files themselves
though.
@@ -8372,7 +8392,7 @@
builds/win32/w32-bcc.mk, builds/win32/w32-bccd.mk,
builds/win32/detect.mk: Added new files to support compilation with
the free Borland C++ command-line compiler. Modified the detection
- rules to recognize the new "bcc32" target in "make setup bcc32".
+ rules to recognize the new `bcc32' target in `make setup bcc32'.
* src/sfnt/ttcmap.c, src/sfnt/ttpost.c, src/sfnt/ttsbit.c,
src/truetype/ttobjs.c, src/truetype/ttgload.c,
diff --git a/docs/CHANGES b/docs/CHANGES
index 5e5c1ea..2e3061a 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -10,18 +10,18 @@ LATEST CHANGES BETWEEN 2.1.8 and 2.1.7
rounded, making them virtually unusable if not loaded with
FT_LOAD_LINEAR_DESIGN.
- - Indexing CID-keyed CFF fonts is now working: The glyph index is
- correctly treated as a CID, similar to FreeType's CID driver
+ - Indexing CID-keyed CFF fonts is now working: The glyph index is
+ correctly treated as a CID, similar to FreeType's CID driver
module. Note that CID CMaps support is still missing.
- The FT_FACE_FLAGS_GLYPH_NAMES is now set correctly for all font
formats.
- - Some subsetted Type 1 fonts weren't parsed correctly. This bug
+ - Some subsetted Type 1 fonts weren't parsed correctly. This bug
has been introduced in 2.1.7.
- The WinFNT driver now correctly reports FT_ENCODING_NONE for all
- but one encoding. Use the new FT_WinFNT_ID_XXX values together
+ but one encoding. Use the new FT_WinFNT_ID_XXX values together
with FT_Get_WinFNT_Header() to get the WinFNT charset ID.
@@ -35,6 +35,70 @@ LATEST CHANGES BETWEEN 2.1.8 and 2.1.7
`tttables.h') is available to get the language ID of a
TrueType/SFNT cmap.
+ - The cache sub-system has been rewritten.
+
+ - There is now support for deinstallation of faces.
+
+ - A new API function `FTC_Manager_RemoveFaceID' has been added
+ to delete all `idle' nodes that correspond to a given
+ FTC_FaceID. All `locked' nodes (i.e., those with a reference
+ count > 0), will be modified to prevent them from appearing in
+ further lookups (they will be cleaned normally when their
+ reference count reaches 0).
+
+ - There is now support for point scaling (i.e., providing
+ character sizes in points + dpis, instead of pixels).
+
+ - Three abstract cache classes are now available:
+
+ FTC_GCache: Used to store one glyph item per cache node,
+ with the ability to group common attributes into
+ `families'. This replaces the old
+ FTC_GlyphCache class.
+
+ FTC_ICache: Used to store one FT_Glyph per cache node. This
+ extends FTC_GCache. Family definition, family
+ comparison, and glyph loading are however left
+ to sub-classes.
+
+ FTC_SCache: Used to store up to 16 small bitmaps per cache
+ node. This extends FTC_GCache. Family
+ definition, family comparison and glyph loading
+ are however left to sub-classes.
+
+ - The file `src/cache/ftcbasic.c' implements:
+
+ FTC_ImageCache: Extends FTC_ICache; implements family
+ definitions and glyph loading similar to the
+ old API.
+
+ FTC_SBitCache: Extends FTC_SCache, implements family
+ definitions and glyph loading similar to the
+ old API
+
+ Client applications should be able to extend FTC_GCache,
+ FTC_ICache, or FTC_SCache much more easily (i.e., less code to
+ write, and less callbacks). For example, one could envision
+ caches that are capable of storing transformed (obliqued),
+ stroked, emboldened, or colored glyph images. Use
+ `ftcbasic.c' as an example.
+
+ - All public APIs are now in `include/freetype/ftcache.h', (to
+ be accessed as `FT_CACHE_H'). The contents of
+ `include/freetype/cache/' is only needed by applications that
+ wish to implement their own caches.
+
+ - There were some major performance improvements through the use
+ of various programming tricks. Cache hits are up to 70%
+ faster than in the old code.
+
+ - The FTC_CMapCache has been simplied. Charmaps can only be
+ accessed by index right now. There is also a new API named
+ `FT_Charmap_GetIndex' for this purpose.
+
+ - The demo programs have been updated to the new code. The
+ previous versions will not work with the current one.
+
III. MISCELLANEOUS
diff --git a/include/freetype/cache/ftccache.h b/include/freetype/cache/ftccache.h
index 2c86e88..98db284 100644
--- a/include/freetype/cache/ftccache.h
+++ b/include/freetype/cache/ftccache.h
@@ -4,7 +4,7 @@
/* */
/* FreeType internal cache interface (specification). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,6 +30,7 @@ FT_BEGIN_HEADER
/* handle to cache class */
typedef const struct FTC_CacheClassRec_* FTC_CacheClass;
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -68,6 +69,7 @@ FT_BEGIN_HEADER
#define FTC_NODE__NEXT(x) FTC_NODE( (x)->mru.next )
#define FTC_NODE__PREV(x) FTC_NODE( (x)->mru.prev )
+
/*************************************************************************/
/* */
/* These functions are exported so that they can be called from */
@@ -81,7 +83,6 @@ FT_BEGIN_HEADER
FTC_Manager manager );
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -91,56 +92,63 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* initialize a new cache node */
- typedef FT_Error (*FTC_Node_NewFunc)( FTC_Node *pnode,
- FT_Pointer query,
- FTC_Cache cache );
+ typedef FT_Error
+ (*FTC_Node_NewFunc)( FTC_Node *pnode,
+ FT_Pointer query,
+ FTC_Cache cache );
- typedef FT_ULong (*FTC_Node_WeightFunc)( FTC_Node node,
- FTC_Cache cache );
+ typedef FT_ULong
+ (*FTC_Node_WeightFunc)( FTC_Node node,
+ FTC_Cache cache );
/* compare a node to a given key pair */
- typedef FT_Bool (*FTC_Node_CompareFunc)( FTC_Node node,
- FT_Pointer key,
- FTC_Cache cache );
+ typedef FT_Bool
+ (*FTC_Node_CompareFunc)( FTC_Node node,
+ FT_Pointer key,
+ FTC_Cache cache );
- typedef void (*FTC_Node_FreeFunc)( FTC_Node node,
- FTC_Cache cache );
+ typedef void
+ (*FTC_Node_FreeFunc)( FTC_Node node,
+ FTC_Cache cache );
- typedef FT_Error (*FTC_Cache_InitFunc)( FTC_Cache cache );
+ typedef FT_Error
+ (*FTC_Cache_InitFunc)( FTC_Cache cache );
- typedef void (*FTC_Cache_DoneFunc)( FTC_Cache cache );
+ typedef void
+ (*FTC_Cache_DoneFunc)( FTC_Cache cache );
- typedef struct FTC_CacheClassRec_
+ typedef struct FTC_CacheClassRec_
{
- FTC_Node_NewFunc node_new;
- FTC_Node_WeightFunc node_weight;
- FTC_Node_CompareFunc node_compare;
- FTC_Node_CompareFunc node_remove_faceid;
- FTC_Node_FreeFunc node_free;
+ FTC_Node_NewFunc node_new;
+ FTC_Node_WeightFunc node_weight;
+ FTC_Node_CompareFunc node_compare;
+ FTC_Node_CompareFunc node_remove_faceid;
+ FTC_Node_FreeFunc node_free;
- FT_UInt cache_size;
- FTC_Cache_InitFunc cache_init;
- FTC_Cache_DoneFunc cache_done;
+ FT_UInt cache_size;
+ FTC_Cache_InitFunc cache_init;
+ FTC_Cache_DoneFunc cache_done;
} FTC_CacheClassRec;
+
/* each cache really implements a dynamic hash table to manage its nodes */
typedef struct FTC_CacheRec_
{
- FT_UFast p;
- FT_UFast mask;
- FT_Long slack;
- FTC_Node* buckets;
+ FT_UFast p;
+ FT_UFast mask;
+ FT_Long slack;
+ FTC_Node* buckets;
- FTC_CacheClassRec clazz; /* local copy, for speed */
+ FTC_CacheClassRec clazz; /* local copy, for speed */
- FTC_Manager manager;
- FT_Memory memory;
- FT_UInt index; /* in manager's table */
+ FTC_Manager manager;
+ FT_Memory memory;
+ FT_UInt index; /* in manager's table */
- FTC_CacheClass org_class; /* original class pointer */
+ FTC_CacheClass org_class; /* original class pointer */
} FTC_CacheRec;
@@ -149,19 +157,19 @@ FT_BEGIN_HEADER
#define FTC_CACHE_P( x ) ( (FTC_Cache*)(x) )
- /* default cache initialize */
+ /* default cache initialize */
FT_EXPORT( FT_Error )
- FTC_Cache_Init( FTC_Cache cache );
+ FTC_Cache_Init( FTC_Cache cache );
- /* default cache finalizer */
+ /* default cache finalizer */
FT_EXPORT( void )
FTC_Cache_Done( FTC_Cache cache );
- /* call this function to lookup the cache. if no corresponding
- * node is found, a new one is automatically created. This function
- * is capable of flushing the cache adequately to make room for the
- * new cache object.
- */
+ /* Call this function to lookup the cache. If no corresponding
+ * node is found, a new one is automatically created. This function
+ * is capable of flushing the cache adequately to make room for the
+ * new cache object.
+ */
FT_EXPORT( FT_Error )
FTC_Cache_Lookup( FTC_Cache cache,
FT_UInt32 hash,
@@ -174,29 +182,30 @@ FT_BEGIN_HEADER
FT_Pointer query,
FTC_Node *anode );
- /* remove all nodes that relate to a given face_id. This is useful
- * when un-installing fonts. Note that if a cache node relates to
- * the face_id, but is locked (i.e. has 'ref_count > 0'), the node
- * will _not_ be destroyed, but its internal face_id reference will
- * be modified.
- *
- * the end result will be that the node will never come back
- * in further lookup requests, and will be flushed on demand from
- * the cache normally when its reference count reaches 0
- */
+ /* Remove all nodes that relate to a given face_id. This is useful
+ * when un-installing fonts. Note that if a cache node relates to
+ * the face_id, but is locked (i.e., has 'ref_count > 0'), the node
+ * will _not_ be destroyed, but its internal face_id reference will
+ * be modified.
+ *
+ * The final result will be that the node will never come back
+ * in further lookup requests, and will be flushed on demand from
+ * the cache normally when its reference count reaches 0.
+ */
FT_EXPORT( void )
- FTC_Cache_RemoveFaceID( FTC_Cache cache,
- FTC_FaceID face_id );
+ FTC_Cache_RemoveFaceID( FTC_Cache cache,
+ FTC_FaceID face_id );
-#define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \
+#define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \
FT_BEGIN_STMNT \
- FTC_Node *_bucket, *_pnode, _node; \
- FTC_Cache _cache = FTC_CACHE(cache); \
- FT_UInt32 _hash = (FT_UInt32)(hash); \
+ FTC_Node *_bucket, *_pnode, _node; \
+ FTC_Cache _cache = FTC_CACHE(cache); \
+ FT_UInt32 _hash = (FT_UInt32)(hash); \
FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \
- FT_UInt _idx; \
+ FT_UInt _idx; \
+ \
\
error = 0; \
_idx = _hash & _cache->mask; \
@@ -208,7 +217,7 @@ FT_BEGIN_HEADER
{ \
_node = *_pnode; \
if ( _node == NULL ) \
- goto _NewNode; \
+ goto _NewNode; \
\
if ( _node->hash == _hash && _nodcomp( _node, query, _cache ) ) \
break; \
@@ -226,6 +235,7 @@ FT_BEGIN_HEADER
{ \
FTC_Manager _manager = _cache->manager; \
\
+ \
if ( _node != _manager->nodes_list ) \
FTC_MruNode_Up( (FTC_MruNode*)&_manager->nodes_list, \
(FTC_MruNode)_node ); \
diff --git a/include/freetype/cache/ftcglyph.h b/include/freetype/cache/ftcglyph.h
index 436c8fc..866fab5 100644
--- a/include/freetype/cache/ftcglyph.h
+++ b/include/freetype/cache/ftcglyph.h
@@ -19,51 +19,50 @@
/*
*
* FTC_GCache is an _abstract_ cache object optimized to store glyph
- * data. It works as follows:
+ * data. It works as follows:
*
- * - it manages FTC_GNode objects. Each one of them can hold one or more
- * glyph "items". Item types are not specified in the FTC_GCache but in
- * classes that extend it
+ * - It manages FTC_GNode objects. Each one of them can hold one or more
+ * glyph `items'. Item types are not specified in the FTC_GCache but
+ * in classes that extend it.
*
- * - glyph attributes, like face_id, character size, render mode, etc..
- * can be grouped in abstract "glyph families". This avoids storing
+ * - Glyph attributes, like face ID, character size, render mode, etc.,
+ * can be grouped into abstract `glyph families'. This avoids storing
* the attributes within the FTC_GCache, since it is likely that many
- * FTC_GNodes will belong to the same family in typical uses
+ * FTC_GNodes will belong to the same family in typical uses.
*
- * - each FTC_GNode is thus a FTC_Node with two additionnal fields:
+ * - Each FTC_GNode is thus an FTC_Node with two additional fields:
*
- * * gindex :: a glyph index, or the first index in a glyph range
- * * family :: a pointer to a glyph "family"
+ * * gindex: A glyph index, or the first index in a glyph range.
+ * * family: A pointer to a glyph `family'.
*
* - Family types are not fully specific in the FTC_Family type, but
* by classes that extend it.
*
- * Note that both FTC_ImageCache and FTC_SBitCache extend FTC_GCache. They
- * share an FTC_Family sub-class called FTC_BasicFamily which is used to
- * store the following data: face_id, pixel/point sizes, load flags.
- * for more details, see the file "src/cache/ftcbasic.c"
+ * Note that both FTC_ImageCache and FTC_SBitCache extend FTC_GCache.
+ * They share an FTC_Family sub-class called FTC_BasicFamily which is
+ * used to store the following data: face ID, pixel/point sizes, load
+ * flags. For more details see the file `src/cache/ftcbasic.c'.
*
* Client applications can extend FTC_GNode with their own FTC_GNode
- * and FTC_Family sub-classes to implement more complex caches (e.g.
- * handling automatic synthetis, like obliquing & emboldening, colored
- * glyphs, etc...)
+ * and FTC_Family sub-classes to implement more complex caches (e.g.,
+ * handling automatic synthesis, like obliquing & emboldening, colored
+ * glyphs, etc.).
*
- * See also the FTC_ICache & FTC_SCache classes in "ftcimage.h" and
- * "ftcsbits.h", which both extend FTC_GCache with additionnal
+ * See also the FTC_ICache & FTC_SCache classes in `ftcimage.h' and
+ * `ftcsbits.h', which both extend FTC_GCache with additional
* optimizations.
*
+ * A typical FTC_GCache implementation must provide at least the
+ * following:
*
- * a typical FTC_GCache implementation must provide at least the following:
+ * - FTC_GNode sub-class, e.g. MyNode, with relevant methods:
+ * my_node_new (must call FTC_GNode_Init)
+ * my_node_free (must call FTC_GNode_Done)
+ * my_node_compare (must call FTC_GNode_Compare)
+ * my_node_remove_faceid (must call ftc_gnode_unselect in case
+ * of match)
*
- * - FTC_GNode sub-class, e.g. MyNode, with relevant methods, i.e:
- * my_node_new ( must call FTC_GNode_Init )
- * my_node_free ( must call FTC_GNode_Done )
- * my_node_compare ( must call FTC_GNode_Compare )
- * my_node_remove_faceid ( must call ftc_gnode_unselect in case
- * of match )
- *
- *
- * - FTC_Family sub-class, e.g. MyFamily, with relevant methods, e.g.:
+ * - FTC_Family sub-class, e.g. MyFamily, with relevant methods:
* my_family_compare
* my_family_init
* my_family_reset (optional)
@@ -72,23 +71,24 @@
* - FTC_GQuery sub-class, e.g. MyQuery, to hold cache-specific query
* data.
*
- * - provide constant structures for a FTC_GNodeClass
+ * - Constant structures for a FTC_GNodeClass.
*
* - MyCacheNew() can be implemented easily as a call to the convenience
- * function FTC_GCache_New
+ * function FTC_GCache_New.
*
- * - implement MyCacheLookup with a call to FTC_GCache_Lookup. This
- * function will automatically:
+ * - MyCacheLookup with a call to FTC_GCache_Lookup. This function will
+ * automatically:
*
- * - search for the corresponding family in the cache, or create
- * a new one if necessary. put it in FTC_GQUERY(myquery).family
+ * - Search for the corresponding family in the cache, or create
+ * a new one if necessary. Put it in FTC_GQUERY(myquery).family
*
- * - call FTC_Cache_Lookup
+ * - Call FTC_Cache_Lookup.
*
- * if it returns NULL, you should create a new node, then call
+ * If it returns NULL, you should create a new node, then call
* ftc_cache_add as usual.
*/
+
/*************************************************************************/
/* */
/* Important: The functions defined in this file are only used to */
@@ -125,16 +125,17 @@ FT_BEGIN_HEADER
/*
- * we can group glyph in "families". Each family correspond to a
- * given face id, character size, transform, etc...
+ * We can group glyphs into `families'. Each family correspond to a
+ * given face ID, character size, transform, etc.
*
- * families are implemented as MRU list nodes. They are reference-counted
+ * Families are implemented as MRU list nodes. They are
+ * reference-counted.
*/
typedef struct FTC_FamilyRec_
{
FTC_MruNodeRec mrunode;
- FT_UInt num_nodes; /* current number of nodes in this family */
+ FT_UInt num_nodes; /* current number of nodes in this family */
FTC_Cache cache;
FTC_MruListClass clazz;
@@ -166,8 +167,6 @@ FT_BEGIN_HEADER
#define FTC_GQUERY( x ) ( (FTC_GQuery)(x) )
-
-
/*************************************************************************/
/* */
/* These functions are exported so that they can be called from */
@@ -177,9 +176,9 @@ FT_BEGIN_HEADER
/* must be called by derived FTC_Node_InitFunc routines */
FT_EXPORT( void )
- FTC_GNode_Init( FTC_GNode node,
- FT_UInt gindex, /* glyph index for node */
- FTC_Family family );
+ FTC_GNode_Init( FTC_GNode node,
+ FT_UInt gindex, /* glyph index for node */
+ FTC_Family family );
/* returns TRUE iff the query's glyph index correspond to the node; */
/* this assumes that the "family" and "hash" fields of the query are */
@@ -188,17 +187,16 @@ FT_BEGIN_HEADER
FTC_GNode_Compare( FTC_GNode gnode,
FTC_GQuery gquery );
- /* call this function to clear a node's family. this is necessary
- * to implement the "node_remove_faceid" cache method correctly
- */
+ /* call this function to clear a node's family -- this is necessary */
+ /* to implement the `node_remove_faceid' cache method correctly */
FT_EXPORT( void )
- FTC_GNode_UnselectFamily( FTC_GNode gnode,
- FTC_Cache cache );
+ FTC_GNode_UnselectFamily( FTC_GNode gnode,
+ FTC_Cache cache );
/* must be called by derived FTC_Node_DoneFunc routines */
FT_EXPORT( void )
FTC_GNode_Done( FTC_GNode node,
- FTC_Cache cache );
+ FTC_Cache cache );
FT_EXPORT( void )
@@ -207,27 +205,26 @@ FT_BEGIN_HEADER
typedef struct FTC_GCacheRec_
{
- FTC_CacheRec cache;
- FTC_MruListRec families;
+ FTC_CacheRec cache;
+ FTC_MruListRec families;
} FTC_GCacheRec, *FTC_GCache;
-
-#define FTC_GCACHE(x) ((FTC_GCache)(x))
+#define FTC_GCACHE( x ) ((FTC_GCache)(x))
- /* can be used as @FTC_Cache_InitFunc */
+ /* can be used as @FTC_Cache_InitFunc */
FT_EXPORT( FT_Error )
- FTC_GCache_Init( FTC_GCache cache );
+ FTC_GCache_Init( FTC_GCache cache );
- /* can be used as @FTC_Cache_DoneFunc */
+ /* can be used as @FTC_Cache_DoneFunc */
FT_EXPORT( void )
FTC_GCache_Done( FTC_GCache cache );
- /* the glyph cache class adds fields for the family implementation */
- typedef struct FTC_GCacheClassRec_
+ /* the glyph cache class adds fields for the family implementation */
+ typedef struct FTC_GCacheClassRec_
{
FTC_CacheClassRec clazz;
FTC_MruListClass family_class;
@@ -236,13 +233,15 @@ FT_BEGIN_HEADER
typedef const FTC_GCacheClassRec* FTC_GCacheClass;
-#define FTC_GCACHE_CLASS(x) ((FTC_GCacheClass)(x))
+#define FTC_GCACHE_CLASS( x ) ((FTC_GCacheClass)(x))
-#define FTC_CACHE__GCACHE_CLASS(x) FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class )
-#define FTC_CACHE__FAMILY_CLASS(x) ((FTC_MruListClass) FTC_CACHE__GCACHE_CLASS(x)->family_class)
+#define FTC_CACHE__GCACHE_CLASS( x ) \
+ FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class )
+#define FTC_CACHE__FAMILY_CLASS( x ) \
+ ((FTC_MruListClass) FTC_CACHE__GCACHE_CLASS(x)->family_class)
- /* convenience function. use instead of FTC_Manager_Register_Cache */
+ /* convenience function; use it instead of FTC_Manager_Register_Cache */
FT_EXPORT( FT_Error )
FTC_GCache_New( FTC_Manager manager,
FTC_GCacheClass clazz,
@@ -256,33 +255,35 @@ FT_BEGIN_HEADER
FTC_Node *anode );
-#define FTC_GCACHE_LOOKUP_CMP( cache, famcmp, nodecmp, hash, gindex, query, node, error ) \
- FT_BEGIN_STMNT \
- FTC_GCache _gcache = FTC_GCACHE( cache ); \
- FTC_Family _family; \
- FTC_GQuery _gquery = (FTC_GQuery)( query ); \
- FTC_MruNode_CompareFunc _fcompare = (FTC_MruNode_CompareFunc)(famcmp); \
- \
- _gquery->gindex = (gindex); \
- \
- FTC_MRULIST_LOOP( &_gcache->families, _family ) \
- { \
- if ( _fcompare( (FTC_MruNode)_family, _gquery ) ) \
- { \
- _gquery->family = _family; \
- goto _FamilyFound; \
- } \
- } \
- FTC_MRULIST_LOOP_END(); \
- \
- error = FTC_MruList_New( &_gcache->families, \
- _gquery, \
- (FTC_MruNode*)&_gquery->family ); \
- if ( !error ) \
- { \
- _FamilyFound: \
- FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ); \
- } \
+#define FTC_GCACHE_LOOKUP_CMP( cache, famcmp, nodecmp, hash, \
+ gindex, query, node, error ) \
+ FT_BEGIN_STMNT \
+ FTC_GCache _gcache = FTC_GCACHE( cache ); \
+ FTC_Family _family; \
+ FTC_GQuery _gquery = (FTC_GQuery)( query ); \
+ FTC_MruNode_CompareFunc _fcompare = (FTC_MruNode_CompareFunc)(famcmp); \
+ \
+ \
+ _gquery->gindex = (gindex); \
+ \
+ FTC_MRULIST_LOOP( &_gcache->families, _family ) \
+ { \
+ if ( _fcompare( (FTC_MruNode)_family, _gquery ) ) \
+ { \
+ _gquery->family = _family; \
+ goto _FamilyFound; \
+ } \
+ } \
+ FTC_MRULIST_LOOP_END(); \
+ \
+ error = FTC_MruList_New( &_gcache->families, \
+ _gquery, \
+ (FTC_MruNode*)&_gquery->family ); \
+ if ( !error ) \
+ { \
+ _FamilyFound: \
+ FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ); \
+ } \
FT_END_STMNT
/* */
diff --git a/include/freetype/cache/ftcimage.h b/include/freetype/cache/ftcimage.h
index 69ed9e5..1bf12db 100644
--- a/include/freetype/cache/ftcimage.h
+++ b/include/freetype/cache/ftcimage.h
@@ -20,11 +20,11 @@
* FTC_ICache is an _abstract_ cache used to store a single FT_Glyph
* image per cache node.
*
- * FTC_ICache extends FTC_GCache. For an implementation example,
- * see FTC_ImageCache in "src/cache/ftbasic.c"
- *
+ * FTC_ICache extends FTC_GCache. For an implementation example,
+ * see FTC_ImageCache in `src/cache/ftbasic.c'.
*/
+
/*************************************************************************/
/* */
/* Each image cache really manages FT_Glyph objects. */
@@ -55,12 +55,13 @@ FT_BEGIN_HEADER
#define FTC_INODE_GINDEX( x ) FTC_GNODE(x)->gindex
#define FTC_INODE_FAMILY( x ) FTC_GNODE(x)->family
- typedef FT_Error (*FTC_IFamily_LoadGlyphFunc)( FTC_Family family,
- FT_UInt gindex,
- FTC_Cache cache,
- FT_Glyph *aglyph );
+ typedef FT_Error
+ (*FTC_IFamily_LoadGlyphFunc)( FTC_Family family,
+ FT_UInt gindex,
+ FTC_Cache cache,
+ FT_Glyph *aglyph );
- typedef struct FTC_IFamilyClassRec_
+ typedef struct FTC_IFamilyClassRec_
{
FTC_MruListClassRec clazz;
FTC_IFamily_LoadGlyphFunc family_load_glyph;
@@ -69,26 +70,27 @@ FT_BEGIN_HEADER
typedef const FTC_IFamilyClassRec* FTC_IFamilyClass;
-#define FTC_IFAMILY_CLASS(x) ((FTC_IFamilyClass)(x))
+#define FTC_IFAMILY_CLASS( x ) ((FTC_IFamilyClass)(x))
-#define FTC_CACHE__IFAMILY_CLASS(x) \
- FTC_IFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS(x)->family_class )
+#define FTC_CACHE__IFAMILY_CLASS( x ) \
+ FTC_IFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS(x)->family_class )
- /* can be used as a @FTC_Node_FreeFunc */
+
+ /* can be used as a @FTC_Node_FreeFunc */
FT_EXPORT( void )
FTC_INode_Free( FTC_INode inode,
FTC_Cache cache );
- /* can be used as @FTC_Node_NewFunc. "gquery.index" & "gquery.family" must
- * be set correctly. this function will call the 'family_load_glyph' method
- * to load the FT_Glyph into the cache node
- */
+ /* Can be used as @FTC_Node_NewFunc. `gquery.index' and `gquery.family'
+ * must be set correctly. This function will call the `family_load_glyph'
+ * method to load the FT_Glyph into the cache node.
+ */
FT_EXPORT( FT_Error )
FTC_INode_New( FTC_INode *pinode,
FTC_GQuery gquery,
FTC_Cache cache );
- /* can be used as @FTC_Node_WeightFunc */
+ /* can be used as @FTC_Node_WeightFunc */
FT_EXPORT( FT_ULong )
FTC_INode_Weight( FTC_INode inode );
diff --git a/include/freetype/cache/ftcmanag.h b/include/freetype/cache/ftcmanag.h
index 71ff2ef..ba86800 100644
--- a/include/freetype/cache/ftcmanag.h
+++ b/include/freetype/cache/ftcmanag.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (specification). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -80,13 +80,14 @@ FT_BEGIN_HEADER
/*************************************************************************/
-#define FTC_MAX_FACES_DEFAULT 2
-#define FTC_MAX_SIZES_DEFAULT 4
-#define FTC_MAX_BYTES_DEFAULT 200000L /* ~200kByte by default */
+#define FTC_MAX_FACES_DEFAULT 2
+#define FTC_MAX_SIZES_DEFAULT 4
+#define FTC_MAX_BYTES_DEFAULT 200000L /* ~200kByte by default */
/* maximum number of caches registered in a single manager */
#define FTC_MAX_CACHES 16
+
typedef struct FTC_ManagerRec_
{
FT_Library library;
@@ -97,7 +98,7 @@ FT_BEGIN_HEADER
FT_ULong cur_weight;
FT_UInt num_nodes;
- FTC_Cache caches[ FTC_MAX_CACHES ];
+ FTC_Cache caches[FTC_MAX_CACHES];
FT_UInt num_caches;
FTC_MruListRec faces;
@@ -134,12 +135,12 @@ FT_BEGIN_HEADER
FTC_Manager_Compress( FTC_Manager manager );
- /* try to flush "count" old nodes from the cache. return the number
- * of really flushed nodes
- */
+ /* try to flush `count' old nodes from the cache; return the number
+ * of really flushed nodes
+ */
FT_EXPORT( FT_UInt )
FTC_Manager_FlushN( FTC_Manager manager,
- FT_UInt count );
+ FT_UInt count );
/* this must be used internally for the moment */
@@ -150,19 +151,19 @@ FT_BEGIN_HEADER
/* */
- typedef struct FTC_ScalerRec_
+ typedef struct FTC_ScalerRec_
{
- FTC_FaceID face_id;
- FT_UInt width;
- FT_UInt height;
- FT_Int pixel;
- FT_UInt x_res;
- FT_UInt y_res;
+ FTC_FaceID face_id;
+ FT_UInt width;
+ FT_UInt height;
+ FT_Int pixel;
+ FT_UInt x_res;
+ FT_UInt y_res;
} FTC_ScalerRec, *FTC_Scaler;
-#define FTC_SCALER_COMPARE(a,b) \
+#define FTC_SCALER_COMPARE( a, b ) \
( (a)->face_id == (b)->face_id && \
(a)->width == (b)->width && \
(a)->height == (b)->height && \
@@ -171,16 +172,16 @@ FT_BEGIN_HEADER
( (a)->x_res == (b)->x_res && \
(a)->y_res == (b)->y_res ) ) )
-#define FTC_SCALER_HASH(q) \
- ( FTC_FACE_ID_HASH((q)->face_id) + \
+#define FTC_SCALER_HASH( q ) \
+ ( FTC_FACE_ID_HASH( (q)->face_id ) + \
(q)->width + (q)->height*7 + \
( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )
FT_EXPORT( FT_Error )
- FTC_Manager_LookupSize( FTC_Manager manager,
- FTC_Scaler scaler,
- FT_Size *asize );
+ FTC_Manager_LookupSize( FTC_Manager manager,
+ FTC_Scaler scaler,
+ FT_Size *asize );
/* */
diff --git a/include/freetype/cache/ftcmru.h b/include/freetype/cache/ftcmru.h
index 80bffcb..cd2a654 100644
--- a/include/freetype/cache/ftcmru.h
+++ b/include/freetype/cache/ftcmru.h
@@ -58,15 +58,16 @@
FT_BEGIN_HEADER
- typedef struct FTC_MruNodeRec_* FTC_MruNode;
+ typedef struct FTC_MruNodeRec_* FTC_MruNode;
- typedef struct FTC_MruNodeRec_
+ typedef struct FTC_MruNodeRec_
{
- FTC_MruNode next;
- FTC_MruNode prev;
+ FTC_MruNode next;
+ FTC_MruNode prev;
} FTC_MruNodeRec;
+
FT_EXPORT( void )
FTC_MruNode_Prepend( FTC_MruNode *plist,
FTC_MruNode node );
@@ -79,42 +80,49 @@ FT_BEGIN_HEADER
FTC_MruNode_Remove( FTC_MruNode *plist,
FTC_MruNode node );
+
typedef struct FTC_MruListRec_* FTC_MruList;
typedef struct FTC_MruListClassRec_ const * FTC_MruListClass;
- typedef FT_Int (*FTC_MruNode_CompareFunc)( FTC_MruNode node,
- FT_Pointer key );
- typedef FT_Error (*FTC_MruNode_InitFunc)( FTC_MruNode node,
- FT_Pointer key,
- FT_Pointer data );
+ typedef FT_Int
+ (*FTC_MruNode_CompareFunc)( FTC_MruNode node,
+ FT_Pointer key );
+
+ typedef FT_Error
+ (*FTC_MruNode_InitFunc)( FTC_MruNode node,
+ FT_Pointer key,
+ FT_Pointer data );
- typedef FT_Error (*FTC_MruNode_ResetFunc)( FTC_MruNode node,
- FT_Pointer key,
- FT_Pointer data );
+ typedef FT_Error
+ (*FTC_MruNode_ResetFunc)( FTC_MruNode node,
+ FT_Pointer key,
+ FT_Pointer data );
- typedef void (*FTC_MruNode_DoneFunc)( FTC_MruNode node,
- FT_Pointer data );
+ typedef void
+ (*FTC_MruNode_DoneFunc)( FTC_MruNode node,
+ FT_Pointer data );
- typedef struct FTC_MruListClassRec_
+
+ typedef struct FTC_MruListClassRec_
{
- FT_UInt node_size;
- FTC_MruNode_CompareFunc node_compare;
- FTC_MruNode_InitFunc node_init;
- FTC_MruNode_ResetFunc node_reset;
- FTC_MruNode_DoneFunc node_done;
+ FT_UInt node_size;
+ FTC_MruNode_CompareFunc node_compare;
+ FTC_MruNode_InitFunc node_init;
+ FTC_MruNode_ResetFunc node_reset;
+ FTC_MruNode_DoneFunc node_done;
} FTC_MruListClassRec;
- typedef struct FTC_MruListRec_
+ typedef struct FTC_MruListRec_
{
- FT_UInt num_nodes;
- FT_UInt max_nodes;
- FTC_MruNode nodes;
- FT_Pointer data;
- FTC_MruListClassRec clazz;
- FT_Memory memory;
+ FT_UInt num_nodes;
+ FT_UInt max_nodes;
+ FTC_MruNode nodes;
+ FT_Pointer data;
+ FTC_MruListClassRec clazz;
+ FT_Memory memory;
} FTC_MruListRec;
@@ -135,12 +143,12 @@ FT_BEGIN_HEADER
FT_EXPORT( FTC_MruNode )
FTC_MruList_Find( FTC_MruList list,
- FT_Pointer key );
+ FT_Pointer key );
FT_EXPORT( FT_Error )
- FTC_MruList_New( FTC_MruList list,
- FT_Pointer key,
- FTC_MruNode *anode );
+ FTC_MruList_New( FTC_MruList list,
+ FT_Pointer key,
+ FTC_MruNode *anode );
FT_EXPORT( FT_Error )
FTC_MruList_Lookup( FTC_MruList list,
@@ -154,17 +162,18 @@ FT_BEGIN_HEADER
FT_EXPORT( void )
FTC_MruList_RemoveSelection( FTC_MruList list,
- FTC_MruNode_CompareFunc select,
+ FTC_MruNode_CompareFunc selection,
FT_Pointer key );
#ifdef FTC_INLINE
-#define FTC_MRULIST_LOOKUP( list, key, node, error ) \
+#define FTC_MRULIST_LOOKUP( list, key, node, error ) \
FT_BEGIN_STMNT \
FTC_MruNode_CompareFunc _compare = (list)->clazz.node_compare; \
FTC_MruNode _first, _node; \
\
+ \
error = 0; \
_first = (list)->nodes; \
_node = NULL; \
@@ -180,8 +189,8 @@ FT_BEGIN_HEADER
goto _Ok; \
} \
_node = _node->next; \
- } \
- while ( _node != _first) ; \
+ \
+ } while ( _node != _first) ; \
} \
\
error = FTC_MruList_New( (list), (key), (FTC_MruNode*)&(node) ); \
@@ -191,28 +200,31 @@ FT_BEGIN_HEADER
#else /* !FTC_INLINE */
-#define FTC_MRULIST_LOOKUP_CMP( list, key, node, error ) \
+#define FTC_MRULIST_LOOKUP_CMP( list, key, node, error ) \
error = FTC_MruList_Lookup( (list), (key), (FTC_MruNode*)&(node) )
#endif /* !FTC_INLINE */
-#define FTC_MRULIST_LOOP( list, node ) \
+#define FTC_MRULIST_LOOP( list, node ) \
FT_BEGIN_STMNT \
- FTC_MruNode _first = (list)->nodes; \
+ FTC_MruNode _first = (list)->nodes; \
+ \
\
if ( _first ) \
{ \
FTC_MruNode _node = _first; \
+ \
+ \
do \
{ \
*(FTC_MruNode*)&(node) = _node;
-#define FTC_MRULIST_LOOP_END() \
+#define FTC_MRULIST_LOOP_END() \
_node = _node->next; \
- } \
- while ( _node != _first ); \
+ \
+ } while ( _node != _first ); \
} \
FT_END_STMNT
diff --git a/include/freetype/cache/ftcsbits.h b/include/freetype/cache/ftcsbits.h
index e79543a..b2ef0f1 100644
--- a/include/freetype/cache/ftcsbits.h
+++ b/include/freetype/cache/ftcsbits.h
@@ -4,7 +4,7 @@
/* */
/* A small-bitmap cache (specification). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,24 +33,26 @@ FT_BEGIN_HEADER
{
FTC_GNodeRec gnode;
FT_UInt count;
- FTC_SBitRec sbits[ FTC_SBIT_ITEMS_PER_NODE ];
+ FTC_SBitRec sbits[FTC_SBIT_ITEMS_PER_NODE];
} FTC_SNodeRec, *FTC_SNode;
-#define FTC_SNODE( x ) ( (FTC_SNode)( x ) )
-#define FTC_SNODE_GINDEX( x ) FTC_GNODE(x)->gindex
-#define FTC_SNODE_FAMILY( x ) FTC_GNODE(x)->family
+#define FTC_SNODE( x ) ( (FTC_SNode)( x ) )
+#define FTC_SNODE_GINDEX( x ) FTC_GNODE( x )->gindex
+#define FTC_SNODE_FAMILY( x ) FTC_GNODE( x )->family
- typedef FT_UInt (*FTC_SFamily_GetCountFunc)( FTC_Family family,
- FTC_Manager manager );
+ typedef FT_UInt
+ (*FTC_SFamily_GetCountFunc)( FTC_Family family,
+ FTC_Manager manager );
- typedef FT_Error (*FTC_SFamily_LoadGlyphFunc)( FTC_Family family,
- FT_UInt gindex,
- FTC_Manager manager,
- FT_Face *aface );
+ typedef FT_Error
+ (*FTC_SFamily_LoadGlyphFunc)( FTC_Family family,
+ FT_UInt gindex,
+ FTC_Manager manager,
+ FT_Face *aface );
- typedef struct FTC_SFamilyClassRec_
+ typedef struct FTC_SFamilyClassRec_
{
FTC_MruListClassRec clazz;
FTC_SFamily_GetCountFunc family_get_count;
@@ -60,10 +62,11 @@ FT_BEGIN_HEADER
typedef const FTC_SFamilyClassRec* FTC_SFamilyClass;
-#define FTC_SFAMILY_CLASS(x) ((FTC_SFamilyClass)(x))
+#define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x))
+
+#define FTC_CACHE__SFAMILY_CLASS( x ) \
+ FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS( x )->family_class )
-#define FTC_CACHE__SFAMILY_CLASS(x) \
- FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS(x)->family_class )
FT_EXPORT( void )
FTC_SNode_Free( FTC_SNode snode,
diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
index da20a33..52d1819 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -433,10 +433,10 @@
/* see the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need */
/* to store small glyph bitmaps, as it will use less memory. */
/* */
- /* this macro is *DEPRECATED*, simply include @FT_CACHE_H and you'll */
- /* have all glyph image-related cache declarations */
+ /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
+ /* glyph image-related cache declarations. */
/* */
-#define FT_CACHE_IMAGE_H FT_CACHE_H
+#define FT_CACHE_IMAGE_H FT_CACHE_H
/*************************************************************************/
@@ -453,8 +453,8 @@
/* in @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, */
/* including scalable outlines. */
/* */
- /* this macro is *DEPRECATED*, simply include @FT_CACHE_H and you'll */
- /* have all small bitmaps-related cache declarations */
+ /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
+ /* small bitmaps-related cache declarations. */
/* */
#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
@@ -468,8 +468,8 @@
/* A macro used in #include statements to name the file containing */
/* the `charmap' API of the FreeType 2 cache sub-system. */
/* */
- /* this macro is *DEPRECATED*, simply include @FT_CACHE_H and you'll */
- /* have all charmap-based cache declarations */
+ /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
+ /* charmap-based cache declarations. */
/* */
#define FT_CACHE_CHARMAP_H FT_CACHE_H
@@ -517,30 +517,30 @@
/* */
-#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>
-#define FT_STROKER_H <freetype/ftstroke.h>
-#define FT_SYNTHESIS_H <freetype/ftsynth.h>
-#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
+#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>
+#define FT_STROKER_H <freetype/ftstroke.h>
+#define FT_SYNTHESIS_H <freetype/ftsynth.h>
+#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
-#define FT_CACHE_MANAGER_H <freetype/cache/ftcmanag.h>
+#define FT_CACHE_MANAGER_H <freetype/cache/ftcmanag.h>
#define FT_CACHE_INTERNAL_MRU_H <freetype/cache/ftcmru.h>
#define FT_CACHE_INTERNAL_MANAGER_H <freetype/cache/ftcmanag.h>
-#define FT_CACHE_INTERNAL_CACHE_H <freetype/cache/ftccache.h>
+#define FT_CACHE_INTERNAL_CACHE_H <freetype/cache/ftccache.h>
#define FT_CACHE_INTERNAL_GLYPH_H <freetype/cache/ftcglyph.h>
#define FT_CACHE_INTERNAL_IMAGE_H <freetype/cache/ftcimage.h>
#define FT_CACHE_INTERNAL_SBITS_H <freetype/cache/ftcsbits.h>
-#define FT_XFREE86_H <freetype/ftxf86.h>
+#define FT_XFREE86_H <freetype/ftxf86.h>
-#define FT_INCREMENTAL_H <freetype/ftincrem.h>
+#define FT_INCREMENTAL_H <freetype/ftincrem.h>
-#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
+#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
/* now include internal headers definitions from <freetype/internal/...> */
-#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
+#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
#include FT_INTERNAL_INTERNAL_H
diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h
index bc677d9..6312f06 100644
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -63,7 +63,7 @@ FT_BEGIN_HEADER
/* FTC_Face_Requester */
/* */
/* FTC_Manager_New */
- /* FTC_Manager_LookupFace */
+ /* FTC_Manager_LookupFace */
/* FTC_Manager_Lookup_Size */
/* */
/* FTC_Node */
@@ -111,7 +111,7 @@ FT_BEGIN_HEADER
/* An opaque pointer type that is used to identity face objects. The */
/* contents of such objects is application-dependent. */
/* */
- typedef struct FTC_FaceIDRec_* FTC_FaceID;
+ typedef struct FTC_FaceIDRec_* FTC_FaceID;
/*************************************************************************/
@@ -319,7 +319,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
- /* FTC_Manager_LookupFace */
+ /* FTC_Manager_LookupFace */
/* */
/* <Description> */
/* Retrieves the @FT_Face object that corresponds to a given face ID */
@@ -350,8 +350,8 @@ FT_BEGIN_HEADER
/* */
FT_EXPORT( FT_Error )
FTC_Manager_LookupFace( FTC_Manager manager,
- FTC_FaceID face_id,
- FT_Face *aface );
+ FTC_FaceID face_id,
+ FT_Face *aface );
/*************************************************************************/
@@ -374,10 +374,10 @@ FT_BEGIN_HEADER
FTC_Manager manager );
- /* remove all nodes belonging to a given face_id */
+ /* remove all nodes belonging to a given face_id */
FT_EXPORT( void )
FTC_Manager_RemoveFaceID( FTC_Manager manager,
- FTC_FaceID face_id );
+ FTC_FaceID face_id );
/*************************************************************************/
@@ -405,7 +405,7 @@ FT_BEGIN_HEADER
/* FTC_CMapCache_New */
/* */
/* @description: */
- /* Creates a new charmap cache. */
+ /* Create a new charmap cache. */
/* */
/* @input: */
/* manager :: A handle to the cache manager. */
@@ -425,31 +425,31 @@ FT_BEGIN_HEADER
FTC_CMapCache *acache );
- /* retrieve the index of a given charmap
- */
+ /* retrieve the index of a given charmap */
FT_EXPORT( FT_Int )
FT_Get_CharMap_Index( FT_CharMap charmap );
+
/*************************************************************************/
/* */
/* @function: */
/* FTC_CMapCache_Lookup */
/* */
/* @description: */
- /* Translates a character code into a glyph index, using the charmap */
+ /* Translate a character code into a glyph index, using the charmap */
/* cache. */
/* */
/* @input: */
- /* cache :: A charmap cache handle. */
+ /* cache :: A charmap cache handle. */
/* */
/* face_id :: source face id */
/* */
/* cmap_index :: index of charmap in source face */
/* */
- /* char_code :: The character code (in the corresponding charmap). */
+ /* char_code :: The character code (in the corresponding charmap). */
/* */
/* @return: */
- /* Glyph index. 0 means "no glyph". */
+ /* Glyph index. 0 means `no glyph'. */
/* */
FT_EXPORT( FT_UInt )
FTC_CMapCache_Lookup( FTC_CMapCache cache,
@@ -463,7 +463,7 @@ FT_BEGIN_HEADER
/* <Section> */
/* cache_subsystem */
/* */
- /**********************************************************************/
+ /*************************************************************************/
/*************************************************************************/
@@ -564,13 +564,13 @@ FT_BEGIN_HEADER
/* Never try to transform or discard it manually! You can however */
/* create a copy with @FT_Glyph_Copy and modify the new one. */
/* */
- /* If "anode" is _not_ NULL, it receives the address of the cache */
+ /* If `anode' is _not_ NULL, it receives the address of the cache */
/* node containing the glyph image, after increasing its reference */
/* count. This ensures that the node (as well as the FT_Glyph) will */
/* always be kept in the cache until you call @FTC_Node_Unref to */
- /* "release" it. */
+ /* `release' it. */
/* */
- /* If "anode" is NULL, the cache node is left unchanged, which means */
+ /* If `anode' is NULL, the cache node is left unchanged, which means */
/* that the FT_Glyph could be flushed out of the cache on the next */
/* call to one of the caching sub-system APIs. Don't assume that it */
/* is persistent! */
@@ -582,13 +582,6 @@ FT_BEGIN_HEADER
FT_Glyph *aglyph,
FTC_Node *anode );
- /*************************************************************************/
- /* */
- /* <Section> */
- /* cache_subsystem */
- /* */
- /*************************************************************************/
-
/*************************************************************************/
/* */
@@ -635,7 +628,7 @@ FT_BEGIN_HEADER
/* */
/* yadvance :: The vertical advance height in pixels. */
/* */
- /* buffer :: A pointer to the bitmap pixels. */
+ /* buffer :: A pointer to the bitmap pixels. */
/* */
typedef struct FTC_SBitRec_
{
@@ -698,7 +691,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Looks up a given small glyph bitmap in a given sbit cache and */
- /* "lock" it to prevent its flushing from the cache until needed */
+ /* `lock' it to prevent its flushing from the cache until needed. */
/* */
/* <Input> */
/* cache :: A handle to the source sbit cache. */
@@ -726,12 +719,12 @@ FT_BEGIN_HEADER
/* The descriptor's `buffer' field is set to 0 to indicate a missing */
/* glyph bitmap. */
/* */
- /* If "anode" is _not_ NULL, it receives the address of the cache */
+ /* If `anode' is _not_ NULL, it receives the address of the cache */
/* node containing the bitmap, after increasing its reference count. */
/* This ensures that the node (as well as the image) will always be */
- /* kept in the cache until you call @FTC_Node_Unref to "release" it. */
+ /* kept in the cache until you call @FTC_Node_Unref to `release' it. */
/* */
- /* If "anode" is NULL, the cache node is left unchanged, which means */
+ /* If `anode' is NULL, the cache node is left unchanged, which means */
/* that the bitmap could be flushed out of the cache on the next */
/* call to one of the caching sub-system APIs. Don't assume that it */
/* is persistent! */
diff --git a/include/freetype/ftstroke.h b/include/freetype/ftstroke.h
index 93c189a..61315e6 100644
--- a/include/freetype/ftstroke.h
+++ b/include/freetype/ftstroke.h
@@ -24,39 +24,41 @@
FT_BEGIN_HEADER
-/*@*************************************************************
- *
- * @type: FT_Stroker
- *
- * @description:
- * opaque handler to a path stroker object
- */
- typedef struct FT_StrokerRec_* FT_Stroker;
-
-
-/*@*************************************************************
- *
- * @enum: FT_Stroker_LineJoin
- *
- * @description:
- * these values determine how two joining lines are rendered
- * in a stroker.
- *
- * @values:
- * FT_STROKER_LINEJOIN_ROUND ::
- * used to render rounded line joins. circular arcs are used
- * to join two lines smoothly
- *
- * FT_STROKER_LINEJOIN_BEVEL ::
- * used to render beveled line joins; i.e. the two joining lines
- * are extended until they intersect
- *
- * FT_STROKER_LINEJOIN_MITER ::
- * same as beveled rendering, except that an additional line
- * break is added if the angle between the two joining lines
- * is too closed (this is useful to avoid unpleasant spikes
- * in beveled rendering).
- */
+ /*@*************************************************************
+ *
+ * @type:
+ * FT_Stroker
+ *
+ * @description:
+ * Opaque handler to a path stroker object.
+ */
+ typedef struct FT_StrokerRec_* FT_Stroker;
+
+
+ /*@*************************************************************
+ *
+ * @enum:
+ * FT_Stroker_LineJoin
+ *
+ * @description:
+ * These values determine how two joining lines are rendered
+ * in a stroker.
+ *
+ * @values:
+ * FT_STROKER_LINEJOIN_ROUND ::
+ * Used to render rounded line joins. Circular arcs are used
+ * to join two lines smoothly.
+ *
+ * FT_STROKER_LINEJOIN_BEVEL ::
+ * Used to render beveled line joins; i.e., the two joining lines
+ * are extended until they intersect.
+ *
+ * FT_STROKER_LINEJOIN_MITER ::
+ * Same as beveled rendering, except that an additional line
+ * break is added if the angle between the two joining lines
+ * is too closed (this is useful to avoid unpleasant spikes
+ * in beveled rendering).
+ */
typedef enum
{
FT_STROKER_LINEJOIN_ROUND = 0,
@@ -66,27 +68,28 @@ FT_BEGIN_HEADER
} FT_Stroker_LineJoin;
-/*@*************************************************************
- *
- * @enum: FT_Stroker_LineCap
- *
- * @description:
- * these values determine how the end of opened sub-paths are
- * rendered in a stroke
- *
- * @values:
- * FT_STROKER_LINECAP_BUTT ::
- * the end of lines is rendered as a full stop on the last
- * point itself
- *
- * FT_STROKER_LINECAP_ROUND ::
- * the end of lines is rendered as a half-circle around the
- * last point
- *
- * FT_STROKER_LINECAP_SQUARE ::
- * the end of lines is rendered as a square around the
- * last point
- */
+ /*@*************************************************************
+ *
+ * @enum:
+ * FT_Stroker_LineCap
+ *
+ * @description:
+ * These values determine how the end of opened sub-paths are
+ * rendered in a stroke.
+ *
+ * @values:
+ * FT_STROKER_LINECAP_BUTT ::
+ * The end of lines is rendered as a full stop on the last
+ * point itself.
+ *
+ * FT_STROKER_LINECAP_ROUND ::
+ * The end of lines is rendered as a half-circle around the
+ * last point.
+ *
+ * FT_STROKER_LINECAP_SQUARE ::
+ * The end of lines is rendered as a square around the
+ * last point.
+ */
typedef enum
{
FT_STROKER_LINECAP_BUTT = 0,
@@ -96,30 +99,31 @@ FT_BEGIN_HEADER
} FT_Stroker_LineCap;
-/**************************************************************
- *
- * @enum: FT_StrokerBorder
- *
- * @description:
- * theses values are used to select a given stroke border
- * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder
- *
- * @values:
- * FT_STROKER_BORDER_LEFT ::
- * select the left border, relative to the drawing direction
- *
- * FT_STROKER_BORDER_RIGHT ::
- * select the right border, relative to the drawing direction
- *
- * @note:
- * applications are generally interested in the "inside" and "outside"
- * borders. However, there is no direct mapping between these and
- * the "left" / "right" ones, since this really depends on the glyph's
- * drawing orientation, which varies between font formats
- *
- * you can however use @FT_Outline_GetInsideBorder and
- * @FT_Outline_GetOutsideBorder to get these.
- */
+ /**************************************************************
+ *
+ * @enum:
+ * FT_StrokerBorder
+ *
+ * @description:
+ * These values are used to select a given stroke border
+ * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.
+ *
+ * @values:
+ * FT_STROKER_BORDER_LEFT ::
+ * Select the left border, relative to the drawing direction.
+ *
+ * FT_STROKER_BORDER_RIGHT ::
+ * Select the right border, relative to the drawing direction.
+ *
+ * @note:
+ * Applications are generally interested in the `inside' and `outside'
+ * borders. However, there is no direct mapping between these and
+ * the `left' / `right' ones, since this really depends on the glyph's
+ * drawing orientation, which varies between font formats.
+ *
+ * You can however use @FT_Outline_GetInsideBorder and
+ * @FT_Outline_GetOutsideBorder to get these.
+ */
typedef enum
{
FT_STROKER_BORDER_LEFT = 0,
@@ -128,80 +132,100 @@ FT_BEGIN_HEADER
} FT_StrokerBorder;
-/**************************************************************
- *
- * @function: FT_Outline_GetInsideBorder
- *
- * @description:
- * retrieve the @FT_StrokerBorder value corresponding to the
- * "inside" borders of a given outline
- *
- * @input:
- * outline :: source outline handle
- *
- * @return:
- * border index. @FT_STROKER_BORDER_LEFT for empty or invalid outlines
- */
+ /**************************************************************
+ *
+ * @function:
+ * FT_Outline_GetInsideBorder
+ *
+ * @description:
+ * Retrieve the @FT_StrokerBorder value corresponding to the
+ * `inside' borders of a given outline.
+ *
+ * @input:
+ * outline ::
+ * The source outline handle.
+ *
+ * @return:
+ * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid
+ * outlines.
+ */
FT_EXPORT( FT_StrokerBorder )
FT_Outline_GetInsideBorder( FT_Outline* outline );
-/**************************************************************
- *
- * @function: FT_Outline_GetOutsideBorder
- *
- * @description:
- * retrieve the @FT_StrokerBorder value corresponding to the
- * "outside" borders of a given outline
- *
- * @input:
- * outline :: source outline handle
- *
- * @return:
- * border index. @FT_STROKER_BORDER_LEFT for empty or invalid outlines
- */
+ /**************************************************************
+ *
+ * @function:
+ * FT_Outline_GetOutsideBorder
+ *
+ * @description:
+ * Retrieve the @FT_StrokerBorder value corresponding to the
+ * `outside' borders of a given outline.
+ *
+ * @input:
+ * outline ::
+ * The source outline handle.
+ *
+ * @return:
+ * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid
+ * outlines.
+ */
FT_EXPORT( FT_StrokerBorder )
FT_Outline_GetOutsideBorder( FT_Outline* outline );
-/**************************************************************
- *
- * @function: FT_Stroker_New
- *
- * @description:
- * create a new stroker object
- *
- * @input:
- * memory :: memory manager handle
- *
- * @output:
- * new stroker object handle, NULL in case of error
- *
- * @return:
- * error code. 0 means success
- */
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_New
+ *
+ * @description:
+ * Create a new stroker object.
+ *
+ * @input:
+ * memory ::
+ * The memory manager handle.
+ *
+ * @output:
+ * A new stroker object handle. NULL in case of error.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_New( FT_Memory memory,
FT_Stroker *astroker );
-/**************************************************************
- *
- * @function: FT_Stroker_Set
- *
- * @description:
- * reset a stroker object's attributes
- *
- * @input:
- * stroker :: target stroker handle
- * radius :: border radius
- * line_cap :: line cap style
- * line_join :: line join style
- * miter_limit :: miter limit for the FT_STROKER_LINEJOIN_MITER style,
- * expressed as 16.16 fixed point value.
- * @note:
- * the radius is expressed in the same units that the outline coordinates.
- */
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_Set
+ *
+ * @description:
+ * Reset a stroker object's attributes.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * radius ::
+ * The border radius.
+ *
+ * line_cap ::
+ * The line cap style.
+ *
+ * line_join ::
+ * The line join style.
+ *
+ * miter_limit ::
+ * The miter limit for the FT_STROKER_LINEJOIN_MITER style,
+ * expressed as 16.16 fixed point value.
+ *
+ * @note:
+ * The radius is expressed in the same units that the outline
+ * coordinates.
+ */
FT_EXPORT( void )
FT_Stroker_Set( FT_Stroker stroker,
FT_Fixed radius,
@@ -210,152 +234,187 @@ FT_BEGIN_HEADER
FT_Fixed miter_limit );
-/**************************************************************
- *
- * @function: FT_Stroker_ParseOutline
- *
- * @description:
- * a convenient function used to parse a whole outline with
- * the stroker. The resulting outline(s) can be retrieved
- * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export
- *
- * @input:
- * stroker :: target stroker handle
- * outline :: source outline
- * opened :: boolean. if TRUE, the outline is treated as an open path,
- * instead of a closed one
- *
- * @return:*
- * error code. 0 means success
- *
- * @note:
- * if 'opened' is 0 (the default), the outline is treated as a closed path,
- * and the stroker will generate two distinct "border" outlines
- *
- * if 'opened' is 1, the outline is processed as an open path, and the
- * stroker will generate a single "stroke" outline
- */
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_ParseOutline
+ *
+ * @description:
+ * A convenience function used to parse a whole outline with
+ * the stroker. The resulting outline(s) can be retrieved
+ * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * outline ::
+ * The source outline.
+ *
+ * opened ::
+ * A boolean. If TRUE, the outline is treated as an open path
+ * instead of a closed one.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * If `opened' is 0 (the default), the outline is treated as a closed
+ * path, and the stroker will generate two distinct `border' outlines.
+ *
+ * If `opened' is 1, the outline is processed as an open path, and the
+ * stroker will generate a single `stroke' outline.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_ParseOutline( FT_Stroker stroker,
FT_Outline* outline,
FT_Bool opened );
-/**************************************************************
- *
- * @function: FT_Stroker_BeginSubPath
- *
- * @description:
- * start a new sub-path in the stroker
- *
- * @input:
- * stroker :: target stroker handle
- * to :: pointer to start vector
- * open :: boolean. if TRUE, the sub-path is treated as an open
- * one
- *
- * @return:*
- * error code. 0 means success
- *
- * @note:
- * this function is useful when you need to stroke a path that is
- * not stored as a @FT_Outline object
- */
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_BeginSubPath
+ *
+ * @description:
+ * Start a new sub-path in the stroker.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * to ::
+ * A pointer to the start vector.
+ *
+ * open ::
+ * A boolean. If TRUE, the sub-path is treated as an open one.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * This function is useful when you need to stroke a path that is
+ * not stored as a @FT_Outline object.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_BeginSubPath( FT_Stroker stroker,
FT_Vector* to,
FT_Bool open );
-/**************************************************************
- *
- * @function: FT_Stroker_EndSubPath
- *
- * @description:
- * close the current sub-path in the stroker
- *
- * @input:
- * stroker :: target stroker handle
- *
- * @return:
- * error code. 0 means success
- *
- * @note:
- * you should call this function after @FT_Stroker_BeginSubPath.
- * if the subpath was not "opened", this function will "draw" a
- * single line segment to the start position when needed.
- */
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_EndSubPath
+ *
+ * @description:
+ * Close the current sub-path in the stroker.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * You should call this function after @FT_Stroker_BeginSubPath.
+ * If the subpath was not `opened', this function will `draw' a
+ * single line segment to the start position when needed.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_EndSubPath( FT_Stroker stroker );
-/**************************************************************
- *
- * @function: FT_Stroker_LineTo
- *
- * @description:
- * "draw" a single line segment in the stroker's current sub-path,
- * from the last position
- *
- * @input:
- * stroker :: target stroker handle
- * to :: pointer to destination point
- *
- * @return:
- * error code. 0 means success
- *
- * @note:
- * you should call this function between @FT_Stroker_BeginSubPath and
- * @FT_Stroker_EndSubPath
- */
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_LineTo
+ *
+ * @description:
+ * `Draw' a single line segment in the stroker's current sub-path,
+ * from the last position.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * to ::
+ * A pointer to the destination point.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * You should call this function between @FT_Stroker_BeginSubPath and
+ * @FT_Stroker_EndSubPath.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_LineTo( FT_Stroker stroker,
FT_Vector* to );
-/**************************************************************
- *
- * @function: FT_Stroker_ConicTo
- *
- * @description:
- * "draw" a single quadratic bezier in the stroker's current sub-path,
- * from the last position
- *
- * @input:
- * stroker :: target stroker handle
- * control :: pointer to bezier control point
- * to :: pointer to destination point
- *
- * @return:
- * error code. 0 means success
- *
- * @note:
- * you should call this function between @FT_Stroker_BeginSubPath and
- * @FT_Stroker_EndSubPath
- */
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_ConicTo
+ *
+ * @description:
+ * `Draw; a single quadratic bezier in the stroker's current sub-path,
+ * from the last position.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * control ::
+ * A pointer to a Bézier control point.
+ *
+ * to ::
+ * A pointer to the destination point.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * You should call this function between @FT_Stroker_BeginSubPath and
+ * @FT_Stroker_EndSubPath.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_ConicTo( FT_Stroker stroker,
FT_Vector* control,
FT_Vector* to );
-/**************************************************************
- *
- * @function: FT_Stroker_CubicTo
- *
- * @description:
- * "draw" a single cubic bezier in the stroker's current sub-path,
- * from the last position
- *
- * @input:
- * stroker :: target stroker handle
- * control1 :: pointer to first bezier control point
- * control2 :: pointer to second bezier control point
- * to :: pointer to destination point
- *
- * @return:
- * error code. 0 means success
- *
- * @note:
- * you should call this function between @FT_Stroker_BeginSubPath and
- * @FT_Stroker_EndSubPath
- */
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_CubicTo
+ *
+ * @description:
+ * `Draw' a single cubic Bézier in the stroker's current sub-path,
+ * from the last position.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * control1 ::
+ * A pointer to the first Bézier control point.
+ *
+ * control2 ::
+ * A pointer to second Bézier control point.
+ *
+ * to ::
+ * A pointer to the destination point.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * You should call this function between @FT_Stroker_BeginSubPath and
+ * @FT_Stroker_EndSubPath.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_CubicTo( FT_Stroker stroker,
FT_Vector* control1,
@@ -363,162 +422,165 @@ FT_BEGIN_HEADER
FT_Vector* to );
-/**************************************************************
- *
- * @function: FT_Stroker_GetBorderCounts
- *
- * @description:
- * call this function once you finished parsing your paths
- * with the stroker. It will return the number of points and
- * contours necessary to export one of the "border" or "stroke"
- * outlines generated by the stroker.
- *
- * @input:
- * stroker :: target stroker handle
- * border :: border index
- *
- * @output:
- * anum_points :: number of points
- * anum_contours :: number of contours
- *
- * @return:
- * error code. 0 means success
- *
- * @note:
- * when an outline, or a sub-path, is "closed", the stroker generates
- * two independent 'border' outlines, named 'left' and 'right'
- *
- * when the outline, or a sub-path, is "opened", the stroker merges
- * the 'border' outlines with caps. The 'left' border receives all
- * points, while the 'right' border becomes empty.
- *
- * use the function @FT_Stroker_GetCounts instead if you want to
- * retrieve the counts associated to both borders.
- */
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_GetBorderCounts
+ *
+ * @description:
+ * Vall this function once you have finished parsing your paths
+ * with the stroker. It will return the number of points and
+ * contours necessary to export one of the `border' or `stroke'
+ * outlines generated by the stroker.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * border ::
+ * The border index.
+ *
+ * @output:
+ * anum_points ::
+ * The number of points.
+ *
+ * anum_contours ::
+ * The number of contours.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * When an outline, or a sub-path, is `closed', the stroker generates
+ * two independent `border' outlines, named `left' and `right'.
+ *
+ * When the outline, or a sub-path, is `opened', the stroker merges
+ * the `border' outlines with caps. The `left' border receives all
+ * points, while the `right' border becomes empty.
+ *
+ * Use the function @FT_Stroker_GetCounts instead if you want to
+ * retrieve the counts associated to both borders.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_GetBorderCounts( FT_Stroker stroker,
FT_StrokerBorder border,
FT_UInt *anum_points,
FT_UInt *anum_contours );
-/**************************************************************
- *
- * @function: FT_Stroker_ExportBorder
- *
- * @description:
- * call this function after @FT_Stroker_GetBorderCounts to
- * export the corresponding border to your own @FT_Outline
- * structure.
- *
- * note that this function will append the border points and
- * contours to your outline, but will not try to resize its
- * arrays.
- *
- * @input:
- * stroker :: target stroker handle
- * border :: border index
- * outline :: target outline handle
- *
- * @return:
- * error code. 0 means success
- *
- * @note:
- * always call this function after @FT_Stroker_GetBorderCounts to
- * get sure that there is enough room in your @FT_Outline object to
- * receive all new data.
- *
- * when an outline, or a sub-path, is "closed", the stroker generates
- * two independent 'border' outlines, named 'left' and 'right'
- *
- * when the outline, or a sub-path, is "opened", the stroker merges
- * the 'border' outlines with caps. The 'left' border receives all
- * points, while the 'right' border becomes empty.
- *
- * use the function @FT_Stroker_Export instead if you want to
- * retrieve all borders at once
- */
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_ExportBorder
+ *
+ * @description:
+ * Call this function after @FT_Stroker_GetBorderCounts to
+ * export the corresponding border to your own @FT_Outline
+ * structure.
+ *
+ * Note that this function will append the border points and
+ * contours to your outline, but will not try to resize its
+ * arrays.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * border ::
+ * The border index.
+ *
+ * outline ::
+ * The target outline handle.
+ *
+ * @note:
+ * Always call this function after @FT_Stroker_GetBorderCounts to
+ * get sure that there is enough room in your @FT_Outline object to
+ * receive all new data.
+ *
+ * When an outline, or a sub-path, is `closed', the stroker generates
+ * two independent `border' outlines, named `left' and `right'
+ *
+ * When the outline, or a sub-path, is `opened', the stroker merges
+ * the `border' outlines with caps. The `left' border receives all
+ * points, while the `right' border becomes empty.
+ *
+ * Use the function @FT_Stroker_Export instead if you want to
+ * retrieve all borders at once.
+ */
FT_EXPORT( void )
FT_Stroker_ExportBorder( FT_Stroker stroker,
FT_StrokerBorder border,
FT_Outline* outline );
-/**************************************************************
- *
- * @function: FT_Stroker_GetCounts
- *
- * @description:
- * call this function once you finished parsing your paths
- * with the stroker. It will return the number of points and
- * contours necessary to export all points/borders from the stroked
- * outline/path.
- *
- * @input:
- * stroker :: target stroker handle
- *
- * @output:
- * anum_points :: number of points
- * anum_contours :: number of contours
- *
- * @return:
- * error code. 0 means success
- *
- * @note:
- */
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_GetCounts
+ *
+ * @description:
+ * Call this function once you have finished parsing your paths
+ * with the stroker. It returns the number of points and
+ * contours necessary to export all points/borders from the stroked
+ * outline/path.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * @output:
+ * anum_points ::
+ * The number of points.
+ *
+ * anum_contours ::
+ * The number of contours.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ */
FT_EXPORT( FT_Error )
FT_Stroker_GetCounts( FT_Stroker stroker,
FT_UInt *anum_points,
FT_UInt *anum_contours );
-/**************************************************************
- *
- * @function: FT_Stroker_ExportBorder
- *
- * @description:
- * call this function after @FT_Stroker_GetBorderCounts to
- * export the corresponding border to your own @FT_Outline
- * structure.
- *
- * note that this function will append the border points and
- * contours to your outline, but will not try to resize its
- * arrays.
- *
- * @input:
- * stroker :: target stroker handle
- * border :: border index
- * outline :: target outline handle
- *
- * @return:
- * error code. 0 means success
- *
- * @note:
- * always call this function after @FT_Stroker_GetBorderCounts to
- * get sure that there is enough room in your @FT_Outline object to
- * receive all new data.
- *
- * when an outline, or a sub-path, is "closed", the stroker generates
- * two independent 'border' outlines, named 'left' and 'right'
- *
- * when the outline, or a sub-path, is "opened", the stroker merges
- * the 'border' outlines with caps. The 'left' border receives all
- * points, while the 'right' border becomes empty.
- *
- * use the function @FT_Stroker_Export instead if you want to
- * retrieve all borders at once
- */
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_Export
+ *
+ * @description:
+ * Call this function after @FT_Stroker_GetBorderCounts to
+ * export the all borders to your own @FT_Outline structure.
+ *
+ * Note that this function will append the border points and
+ * contours to your outline, but will not try to resize its
+ * arrays.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * outline ::
+ * The target outline handle.
+ */
FT_EXPORT( void )
FT_Stroker_Export( FT_Stroker stroker,
FT_Outline* outline );
-/**************************************************************
- *
- * @function: FT_Stroker_Done
- *
- * @description:
- * destroy a stroker object
- *
- * @input:
- * stroker :: stroker handle. can be NULL
- */
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_Done
+ *
+ * @description:
+ * Destroy a stroker object.
+ *
+ * @input:
+ * stroker ::
+ * A stroker handle. Can be NULL.
+ */
FT_EXPORT( void )
FT_Stroker_Done( FT_Stroker stroker );
diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c
index 8c722ab..f4e8a29 100644
--- a/src/base/ftgloadr.c
+++ b/src/base/ftgloadr.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,6 +19,7 @@
#include <ft2build.h>
#include FT_INTERNAL_GLYPH_LOADER_H
#include FT_INTERNAL_MEMORY_H
+#include FT_INTERNAL_OBJECTS_H
#undef FT_COMPONENT
#define FT_COMPONENT trace_gloader
diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c
index 2452a98..7e0843e 100644
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -27,20 +27,22 @@
FT_EXPORT_DEF( FT_StrokerBorder )
FT_Outline_GetInsideBorder( FT_Outline* outline )
{
- FT_Orientation or = FT_Outline_Get_Orientation( outline );
+ FT_Orientation o = FT_Outline_Get_Orientation( outline );
- return ( or == FT_ORIENTATION_TRUETYPE ) ? FT_STROKER_BORDER_RIGHT
- : FT_STROKER_BORDER_LEFT ;
+
+ return o == FT_ORIENTATION_TRUETYPE ? FT_STROKER_BORDER_RIGHT
+ : FT_STROKER_BORDER_LEFT ;
}
FT_EXPORT_DEF( FT_StrokerBorder )
FT_Outline_GetOutsideBorder( FT_Outline* outline )
{
- FT_Orientation or = FT_Outline_Get_Orientation( outline );
+ FT_Orientation o = FT_Outline_Get_Orientation( outline );
+
- return ( or == FT_ORIENTATION_TRUETYPE ) ? FT_STROKER_BORDER_RIGHT
- : FT_STROKER_BORDER_LEFT ;
+ return o == FT_ORIENTATION_TRUETYPE ? FT_STROKER_BORDER_RIGHT
+ : FT_STROKER_BORDER_LEFT ;
}
@@ -1457,6 +1459,7 @@
FT_UInt num_points = 0, num_contours = 0;
FT_Error error;
+
if ( !stroker || border > 1 )
{
error = FT_Err_Invalid_Argument;
@@ -1509,13 +1512,14 @@
FT_EXPORT_DEF( void )
FT_Stroker_ExportBorder( FT_Stroker stroker,
FT_StrokerBorder border,
- FT_Outline* outline )
+ FT_Outline* outline )
{
if ( border == FT_STROKER_BORDER_LEFT ||
border == FT_STROKER_BORDER_RIGHT )
{
FT_StrokeBorder sborder = & stroker->borders[border];
+
if ( sborder->valid )
ft_stroke_border_export( sborder, outline );
}
@@ -1531,8 +1535,6 @@
}
-
-
/*
* The following is very similar to FT_Outline_Decompose, except
* that we do support opened paths, and do not scale the outline.
diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c
index da17db1..5347dd8 100644
--- a/src/base/fttrigon.c
+++ b/src/base/fttrigon.c
@@ -17,6 +17,7 @@
#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
#include FT_TRIGONOMETRY_H
diff --git a/src/bdf/bdfdrivr.h b/src/bdf/bdfdrivr.h
index 1e0224c..148041f 100644
--- a/src/bdf/bdfdrivr.h
+++ b/src/bdf/bdfdrivr.h
@@ -2,7 +2,7 @@
FreeType font driver for bdf fonts
- Copyright (C) 2001, 2002 by
+ Copyright (C) 2001, 2002, 2003 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/src/cache/Jamfile b/src/cache/Jamfile
index 1981bee..baa1d77 100644
--- a/src/cache/Jamfile
+++ b/src/cache/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/cache Jamfile (c) 2001 David Turner
+# FreeType 2 src/cache Jamfile (c) 2001, 2003 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) cache ;
diff --git a/src/cache/descrip.mms b/src/cache/descrip.mms
index f6129fd..daa2d7d 100644
--- a/src/cache/descrip.mms
+++ b/src/cache/descrip.mms
@@ -3,7 +3,7 @@
#
-# Copyright 2001, 2002 by
+# Copyright 2001, 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/src/cache/ftcache.c b/src/cache/ftcache.c
index 4e5c071..d41e91e 100644
--- a/src/cache/ftcache.c
+++ b/src/cache/ftcache.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType Caching sub-system (body only). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c
index 012e834..cf8c912 100644
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -1,3 +1,21 @@
+/***************************************************************************/
+/* */
+/* ftcbasic.c */
+/* */
+/* The FreeType basic cache interface (body). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
#include <ft2build.h>
#include FT_CACHE_H
#include FT_CACHE_INTERNAL_GLYPH_H
@@ -8,54 +26,53 @@
#include "ftcerror.h"
- /*
- * Basic Families
- *
- *
- */
- typedef struct FTC_BasicAttrRec_
+ /*
+ * Basic Families
+ *
+ */
+ typedef struct FTC_BasicAttrRec_
{
FTC_ScalerRec scaler;
FT_UInt load_flags;
} FTC_BasicAttrRec, *FTC_BasicAttrs;
-#define FTC_BASIC_ATTR_COMPARE(a,b) \
- ( FTC_SCALER_COMPARE( &(a)->scaler, &(b)->scaler ) && \
- (a)->load_flags == (b)->load_flags )
+#define FTC_BASIC_ATTR_COMPARE( a, b ) \
+ ( FTC_SCALER_COMPARE( &(a)->scaler, &(b)->scaler ) && \
+ (a)->load_flags == (b)->load_flags )
-#define FTC_BASIC_ATTR_HASH(a) \
- ( FTC_SCALER_HASH(&(a)->scaler) + 31*(a)->load_flags )
+#define FTC_BASIC_ATTR_HASH( a ) \
+ ( FTC_SCALER_HASH( &(a)->scaler ) + 31*(a)->load_flags )
- typedef struct FTC_BasicQueryRec_
+ typedef struct FTC_BasicQueryRec_
{
- FTC_GQueryRec gquery;
- FTC_BasicAttrRec attrs;
+ FTC_GQueryRec gquery;
+ FTC_BasicAttrRec attrs;
} FTC_BasicQueryRec, *FTC_BasicQuery;
-
- typedef struct FTC_BasicFamilyRec_
+ typedef struct FTC_BasicFamilyRec_
{
- FTC_FamilyRec family;
- FTC_BasicAttrRec attrs;
+ FTC_FamilyRec family;
+ FTC_BasicAttrRec attrs;
} FTC_BasicFamilyRec, *FTC_BasicFamily;
static FT_Bool
- ftc_basic_family_compare( FTC_BasicFamily family,
- FTC_BasicQuery query )
+ ftc_basic_family_compare( FTC_BasicFamily family,
+ FTC_BasicQuery query )
{
return FT_BOOL( FTC_BASIC_ATTR_COMPARE( &family->attrs, &query->attrs ) );
}
+
static FT_Error
- ftc_basic_family_init( FTC_BasicFamily family,
- FTC_BasicQuery query,
- FTC_Cache cache )
+ ftc_basic_family_init( FTC_BasicFamily family,
+ FTC_BasicQuery query,
+ FTC_Cache cache )
{
FTC_Family_Init( FTC_FAMILY( family ), cache );
family->attrs = query->attrs;
@@ -71,6 +88,7 @@
FT_Face face;
FT_UInt result = 0;
+
error = FTC_Manager_LookupFace( manager, family->attrs.scaler.face_id,
&face );
if ( !error )
@@ -89,16 +107,19 @@
FT_Error error;
FT_Size size;
+
error = FTC_Manager_LookupSize( manager, &family->attrs.scaler, &size );
if ( !error )
{
- FT_Face face = size->face;
+ FT_Face face = size->face;
+
- error = FT_Load_Glyph( face, gindex, family->attrs.load_flags |
- FT_LOAD_RENDER );
+ error = FT_Load_Glyph( face, gindex,
+ family->attrs.load_flags | FT_LOAD_RENDER );
if ( !error )
*aface = face;
}
+
return error;
}
@@ -109,10 +130,11 @@
FTC_Cache cache,
FT_Glyph *aglyph )
{
- FT_Error error;
- FTC_Scaler scaler = &family->attrs.scaler;
- FT_Face face;
- FT_Size size;
+ FT_Error error;
+ FTC_Scaler scaler = &family->attrs.scaler;
+ FT_Face face;
+ FT_Size size;
+
/* we will now load the glyph image */
error = FTC_Manager_LookupSize( cache->manager,
@@ -143,6 +165,7 @@
error = FTC_Err_Invalid_Argument;
}
}
+
Exit:
return error;
}
@@ -153,22 +176,22 @@
FTC_FaceID face_id,
FTC_Cache cache )
{
- FTC_BasicFamily family = (FTC_BasicFamily) gnode->family;
+ FTC_BasicFamily family = (FTC_BasicFamily)gnode->family;
FT_Bool result;
+
result = FT_BOOL( family->attrs.scaler.face_id == face_id );
if ( result )
{
- /* we must call this function to avoid this node from appearing
- * in later lookups with the same face_id !!
- */
+ /* we must call this function to avoid this node from appearing
+ * in later lookups with the same face_id!
+ */
FTC_GNode_UnselectFamily( gnode, cache );
}
return result;
}
-
/*
*
* basic image cache
@@ -179,30 +202,29 @@
{
{
sizeof( FTC_BasicFamilyRec ),
- (FTC_MruNode_CompareFunc) ftc_basic_family_compare,
- (FTC_MruNode_InitFunc) ftc_basic_family_init,
- (FTC_MruNode_ResetFunc) NULL,
- (FTC_MruNode_DoneFunc) NULL
+ (FTC_MruNode_CompareFunc)ftc_basic_family_compare,
+ (FTC_MruNode_InitFunc) ftc_basic_family_init,
+ (FTC_MruNode_ResetFunc) NULL,
+ (FTC_MruNode_DoneFunc) NULL
},
- (FTC_IFamily_LoadGlyphFunc) ftc_basic_family_load_glyph
+ (FTC_IFamily_LoadGlyphFunc)ftc_basic_family_load_glyph
};
-
static const FTC_GCacheClassRec ftc_basic_image_cache_class =
{
{
- (FTC_Node_NewFunc) FTC_INode_New,
- (FTC_Node_WeightFunc) FTC_INode_Weight,
- (FTC_Node_CompareFunc) FTC_GNode_Compare,
- (FTC_Node_CompareFunc) ftc_basic_gnode_compare_faceid,
- (FTC_Node_FreeFunc) FTC_INode_Free,
+ (FTC_Node_NewFunc) FTC_INode_New,
+ (FTC_Node_WeightFunc) FTC_INode_Weight,
+ (FTC_Node_CompareFunc)FTC_GNode_Compare,
+ (FTC_Node_CompareFunc)ftc_basic_gnode_compare_faceid,
+ (FTC_Node_FreeFunc) FTC_INode_Free,
sizeof( FTC_GCacheRec ),
- (FTC_Cache_InitFunc) FTC_GCache_Init,
- (FTC_Cache_DoneFunc) FTC_GCache_Done
+ (FTC_Cache_InitFunc) FTC_GCache_Init,
+ (FTC_Cache_DoneFunc) FTC_GCache_Done
},
- (FTC_MruListClass) & ftc_basic_image_family_class
+ (FTC_MruListClass)&ftc_basic_image_family_class
};
@@ -210,8 +232,8 @@
FTC_ImageCache_New( FTC_Manager manager,
FTC_ImageCache *acache )
{
- return FTC_GCache_New( manager, & ftc_basic_image_cache_class,
- (FTC_GCache*) acache );
+ return FTC_GCache_New( manager, &ftc_basic_image_cache_class,
+ (FTC_GCache*)acache );
}
@@ -249,7 +271,7 @@
hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + gindex;
-#if 1 /* inlining is about 50% faster !! */
+#if 1 /* inlining is about 50% faster! */
FTC_GCACHE_LOOKUP_CMP( cache,
ftc_basic_family_compare,
FTC_GNode_Compare,
@@ -265,12 +287,12 @@
#endif
if ( !error )
{
- *aglyph = FTC_INODE(node)->glyph;
+ *aglyph = FTC_INODE( node )->glyph;
if ( anode )
{
- *anode = FTC_NODE(node);
- FTC_NODE(node)->ref_count++;
+ *anode = FTC_NODE( node );
+ FTC_NODE( node )->ref_count++;
}
}
@@ -279,7 +301,6 @@
}
-
/*
*
* basic small bitmap cache
@@ -291,56 +312,55 @@
{
{
sizeof( FTC_BasicFamilyRec ),
- (FTC_MruNode_CompareFunc) ftc_basic_family_compare,
- (FTC_MruNode_InitFunc) ftc_basic_family_init,
- (FTC_MruNode_ResetFunc) NULL,
- (FTC_MruNode_DoneFunc) NULL
+ (FTC_MruNode_CompareFunc)ftc_basic_family_compare,
+ (FTC_MruNode_InitFunc) ftc_basic_family_init,
+ (FTC_MruNode_ResetFunc) NULL,
+ (FTC_MruNode_DoneFunc) NULL
},
- (FTC_SFamily_GetCountFunc) ftc_basic_family_get_count,
- (FTC_SFamily_LoadGlyphFunc) ftc_basic_family_load_bitmap
+ (FTC_SFamily_GetCountFunc) ftc_basic_family_get_count,
+ (FTC_SFamily_LoadGlyphFunc)ftc_basic_family_load_bitmap
};
static const FTC_GCacheClassRec ftc_basic_sbit_cache_class =
{
{
- (FTC_Node_NewFunc) FTC_SNode_New,
- (FTC_Node_WeightFunc) FTC_SNode_Weight,
- (FTC_Node_CompareFunc) FTC_SNode_Compare,
- (FTC_Node_CompareFunc) ftc_basic_gnode_compare_faceid,
- (FTC_Node_FreeFunc) FTC_SNode_Free,
+ (FTC_Node_NewFunc) FTC_SNode_New,
+ (FTC_Node_WeightFunc) FTC_SNode_Weight,
+ (FTC_Node_CompareFunc)FTC_SNode_Compare,
+ (FTC_Node_CompareFunc)ftc_basic_gnode_compare_faceid,
+ (FTC_Node_FreeFunc) FTC_SNode_Free,
sizeof( FTC_GCacheRec ),
- (FTC_Cache_InitFunc) FTC_GCache_Init,
- (FTC_Cache_DoneFunc) FTC_GCache_Done
+ (FTC_Cache_InitFunc) FTC_GCache_Init,
+ (FTC_Cache_DoneFunc) FTC_GCache_Done
},
- (FTC_MruListClass) & ftc_basic_sbit_family_class
+ (FTC_MruListClass)&ftc_basic_sbit_family_class
};
-
-
FT_EXPORT_DEF( FT_Error )
FTC_SBitCache_New( FTC_Manager manager,
FTC_SBitCache *acache )
{
- return FTC_GCache_New( manager, & ftc_basic_sbit_cache_class,
- (FTC_GCache*) acache );
+ return FTC_GCache_New( manager, &ftc_basic_sbit_cache_class,
+ (FTC_GCache*)acache );
}
FT_EXPORT_DEF( FT_Error )
- FTC_SBitCache_Lookup( FTC_SBitCache cache,
- FTC_ImageType type,
- FT_UInt gindex,
- FTC_SBit *ansbit,
- FTC_Node *anode )
+ FTC_SBitCache_Lookup( FTC_SBitCache cache,
+ FTC_ImageType type,
+ FT_UInt gindex,
+ FTC_SBit *ansbit,
+ FTC_Node *anode )
{
FT_Error error;
FTC_BasicQueryRec query;
FTC_SNode node;
FT_UInt32 hash;
+
if ( anode )
*anode = NULL;
@@ -356,12 +376,11 @@
query.attrs.scaler.pixel = 1;
query.attrs.load_flags = type->flags;
- /* beware, the hash must be the same for all glyph ranges !!
- */
+ /* beware, the hash must be the same for all glyph ranges! */
hash = FTC_BASIC_ATTR_HASH( &query.attrs ) +
- (gindex/FTC_SBIT_ITEMS_PER_NODE);
+ gindex / FTC_SBIT_ITEMS_PER_NODE;
-#if 1 /* inlining is about 50% faster !! */
+#if 1 /* inlining is about 50% faster! */
FTC_GCACHE_LOOKUP_CMP( cache,
ftc_basic_family_compare,
FTC_SNode_Compare,
@@ -374,12 +393,12 @@
hash,
gindex,
FTC_GQUERY( &query ),
- (FTC_Node*) &node );
+ (FTC_Node*)&node );
#endif
if ( error )
goto Exit;
- *ansbit = node->sbits + ( gindex - FTC_GNODE(node)->gindex );
+ *ansbit = node->sbits + ( gindex - FTC_GNODE( node )->gindex );
if ( anode )
{
@@ -391,3 +410,5 @@
return error;
}
+
+/* END */
diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c
index 64e5fce..7e06302 100644
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -45,7 +45,8 @@
ftc_node_mru_link( FTC_Node node,
FTC_Manager manager )
{
- FTC_MruNode_Prepend( (FTC_MruNode*)&manager->nodes_list, (FTC_MruNode)node );
+ FTC_MruNode_Prepend( (FTC_MruNode*)&manager->nodes_list,
+ (FTC_MruNode)node );
manager->num_nodes++;
}
@@ -55,7 +56,8 @@
ftc_node_mru_unlink( FTC_Node node,
FTC_Manager manager )
{
- FTC_MruNode_Remove( (FTC_MruNode*)&manager->nodes_list, (FTC_MruNode)node );
+ FTC_MruNode_Remove( (FTC_MruNode*)&manager->nodes_list,
+ (FTC_MruNode)node );
manager->num_nodes--;
}
@@ -65,64 +67,67 @@
ftc_node_mru_up( FTC_Node node,
FTC_Manager manager )
{
- FTC_MruNode_Up( (FTC_MruNode*)&manager->nodes_list, (FTC_MruNode)node );
+ FTC_MruNode_Up( (FTC_MruNode*)&manager->nodes_list,
+ (FTC_MruNode)node );
}
- /* note that this function cannot fail. If we cannot re-size the
- * buckets array appropriately, we simply degrade the hash table's
- * performance !!
- */
+ /* Note that this function cannot fail. If we cannot re-size the
+ * buckets array appropriately, we simply degrade the hash table's
+ * performance!
+ */
static void
ftc_cache_resize( FTC_Cache cache )
{
for (;;)
{
- FTC_Node node, *pnode;
- FT_UInt p = cache->p;
- FT_UInt mask = cache->mask;
- FT_UInt count = mask + p + 1; /* number of buckets */
+ FTC_Node node, *pnode;
+ FT_UInt p = cache->p;
+ FT_UInt mask = cache->mask;
+ FT_UInt count = mask + p + 1; /* number of buckets */
- /* do we need to shrink the buckets array ?
- */
+
+ /* do we need to shrink the buckets array? */
if ( cache->slack < 0 )
{
- FTC_Node new_list = NULL;
+ FTC_Node new_list = NULL;
+
/* try to expand the buckets array _before_ splitting
* the bucket lists
*/
- if ( p >= mask )
- {
- FT_Memory memory = cache->memory;
+ if ( p >= mask )
+ {
+ FT_Memory memory = cache->memory;
+
/* if we can't expand the array, leave immediately */
- if ( FT_MEM_RENEW_ARRAY( cache->buckets, (mask+1)*2, (mask+1)*4 ) )
- break;
- }
+ if ( FT_MEM_RENEW_ARRAY( cache->buckets, (mask+1)*2, (mask+1)*4 ) )
+ break;
+ }
/* split a single bucket */
- pnode = cache->buckets + p;
+ pnode = cache->buckets + p;
- for (;;)
- {
- node = *pnode;
- if ( node == NULL )
- break;
+ for (;;)
+ {
+ node = *pnode;
+ if ( node == NULL )
+ break;
- if ( node->hash & ( mask + 1 ) )
- {
- *pnode = node->link;
- node->link = new_list;
- new_list = node;
- }
- else
- pnode = &node->link;
- }
+ if ( node->hash & ( mask + 1 ) )
+ {
+ *pnode = node->link;
+ node->link = new_list;
+ new_list = node;
+ }
+ else
+ pnode = &node->link;
+ }
- cache->buckets[p + mask + 1] = new_list;
+ cache->buckets[p + mask + 1] = new_list;
- cache->slack += FTC_HASH_MAX_LOAD;
+ cache->slack += FTC_HASH_MAX_LOAD;
if ( p >= mask )
{
@@ -132,13 +137,14 @@
else
cache->p = p + 1;
}
- /* do we need to expand the buckets array ?
- */
+
+ /* do we need to expand the buckets array? */
else if ( cache->slack > (FT_Long)count * FTC_HASH_SUB_LOAD )
{
FT_UInt old_index = p + mask;
FTC_Node* pold;
+
if ( old_index + 1 <= FTC_HASH_INITIAL_SIZE )
break;
@@ -146,8 +152,10 @@
{
FT_Memory memory = cache->memory;
- /* if we can't shrink the array, leave immediately */
- if ( FT_MEM_RENEW_ARRAY( cache->buckets, ( mask + 1 ) * 2, (mask+1) ) )
+
+ /* if we can't shrink the array, leave immediately */
+ if ( FT_MEM_RENEW_ARRAY( cache->buckets,
+ ( mask + 1 ) * 2, mask + 1 ) )
break;
cache->mask >>= 1;
@@ -173,7 +181,6 @@
}
-
/* remove a node from its cache's hash table */
static void
ftc_node_hash_unlink( FTC_Node node0,
@@ -193,6 +200,7 @@
{
FTC_Node node = *pnode;
+
if ( node == NULL )
{
FT_ERROR(( "ftc_node_hash_unlink: unknown node!\n" ));
@@ -213,8 +221,7 @@
}
-
- /* add a node to the "top" of its cache's hash table */
+ /* add a node to the `top' of its cache's hash table */
static void
ftc_node_hash_link( FTC_Node node,
FTC_Cache cache )
@@ -237,8 +244,6 @@
}
-
-
/* remove a node from the cache manager */
FT_EXPORT_DEF( void )
ftc_node_destroy( FTC_Node node,
@@ -256,7 +261,7 @@
}
#endif
- cache = manager->caches[ node->cache_index ];
+ cache = manager->caches[node->cache_index];
#ifdef FT_DEBUG_ERROR
if ( cache == NULL )
@@ -296,19 +301,19 @@
FT_EXPORT_DEF( FT_Error )
- FTC_Cache_Init( FTC_Cache cache )
+ FTC_Cache_Init( FTC_Cache cache )
{
FT_Memory memory = cache->memory;
- cache->p = 0;
- cache->mask = FTC_HASH_INITIAL_SIZE - 1;
- cache->slack = FTC_HASH_INITIAL_SIZE * FTC_HASH_MAX_LOAD;
+
+ cache->p = 0;
+ cache->mask = FTC_HASH_INITIAL_SIZE - 1;
+ cache->slack = FTC_HASH_INITIAL_SIZE * FTC_HASH_MAX_LOAD;
return ( FT_MEM_NEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 ) );
}
-
FT_EXPORT_DEF( void )
FTC_Cache_Clear( FTC_Cache cache )
{
@@ -318,6 +323,7 @@
FT_UFast i;
FT_UInt count;
+
count = cache->p + cache->mask + 1;
for ( i = 0; i < count; i++ )
@@ -353,6 +359,7 @@
{
FT_Memory memory = cache->memory;
+
FTC_Cache_Clear( cache );
FT_FREE( cache->buckets );
@@ -365,11 +372,10 @@
}
-
static void
- ftc_cache_add( FTC_Cache cache,
- FT_UInt32 hash,
- FTC_Node node )
+ ftc_cache_add( FTC_Cache cache,
+ FT_UInt32 hash,
+ FTC_Node node )
{
node->hash = hash;
node->cache_index = (FT_UInt16) cache->index;
@@ -381,6 +387,7 @@
{
FTC_Manager manager = cache->manager;
+
manager->cur_weight += cache->clazz.node_weight( node, cache );
if ( manager->cur_weight >= manager->max_weight )
@@ -402,25 +409,25 @@
FT_Error error;
FTC_Node node;
- /*
- * try to allocate a new cache node. Note that in case of
- * out-of-memory error (OOM), we'll flush the cache a bit,
- * then try again.
- *
- * on each try, the "tries" variable gives the number
- * of old nodes we want to flush from the manager's global list
- * before the next allocation attempt. it barely doubles on
- * each iteration
- *
- */
+ /*
+ * Try to allocate a new cache node. Note that in case of
+ * out-of-memory error (OOM), we'll flush the cache a bit,
+ * then try again.
+ *
+ * On each try, the `tries' variable gives the number
+ * of old nodes we want to flush from the manager's global list
+ * before the next allocation attempt. It barely doubles on
+ * each iteration.
+ *
+ */
error = cache->clazz.node_new( &node, query, cache );
if ( error )
goto FlushCache;
AddNode:
- /* don't assume that the cache has the same number of buckets, since
- * our allocation request might have triggered global cache flushing
- */
+ /* don't assume that the cache has the same number of buckets, since
+ * our allocation request might have triggered global cache flushing
+ */
ftc_cache_add( cache, hash, node );
Exit:
@@ -436,6 +443,7 @@
FTC_Manager manager = cache->manager;
FT_UInt count, tries = 1;
+
for (;;)
{
error = cache->clazz.node_new( &node, query, cache );
@@ -452,7 +460,7 @@
if ( count == tries )
{
- count = tries*2;
+ count = tries * 2;
if ( count < tries || count > manager->num_nodes )
count = manager->num_nodes;
}
@@ -510,6 +518,7 @@
{
FTC_Manager manager = cache->manager;
+
if ( node != manager->nodes_list )
ftc_node_mru_up( node, manager );
}
@@ -521,32 +530,33 @@
}
-
-
FT_EXPORT_DEF( void )
- FTC_Cache_RemoveFaceID( FTC_Cache cache,
- FTC_FaceID face_id )
+ FTC_Cache_RemoveFaceID( FTC_Cache cache,
+ FTC_FaceID face_id )
{
FT_UFast i, count;
FTC_Manager manager = cache->manager;
FTC_Node frees = NULL;
+
count = cache->p + cache->mask;
for ( i = 0; i < count; i++ )
{
FTC_Node* bucket = cache->buckets + i;
FTC_Node* pnode = bucket;
+
for ( ;; )
{
FTC_Node node = *pnode;
+
if ( node == NULL )
break;
if ( cache->clazz.node_remove_faceid( node, face_id, cache ) )
{
- *pnode = node->link;
+ *pnode = node->link;
node->link = frees;
frees = node;
}
@@ -555,12 +565,12 @@
}
}
- /* remove all nodes in the free list
- */
+ /* remove all nodes in the free list */
while ( frees )
{
FTC_Node node;
+
node = frees;
frees = node->link;
@@ -569,10 +579,11 @@
cache->clazz.node_free( node, cache );
- cache->slack ++;
+ cache->slack++;
}
ftc_cache_resize( cache );
}
+
/* END */
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index 57c04e4..0153763 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -29,6 +29,7 @@
#undef FT_COMPONENT
#define FT_COMPONENT trace_cache
+
/*************************************************************************/
/* */
/* Each FTC_CMapNode contains a simple array to map a range of character */
@@ -47,22 +48,24 @@
#define FTC_CMAP_INDICES_MAX 128
/* compute a query/node hash */
-#define FTC_CMAP_HASH( faceid, index, charcode ) \
- ( FTC_FACE_ID_HASH( faceid ) + 211*( index ) + ((char_code) / FTC_CMAP_INDICES_MAX) )
+#define FTC_CMAP_HASH( faceid, index, charcode ) \
+ ( FTC_FACE_ID_HASH( faceid ) + 211 * ( index ) + \
+ ( (char_code) / FTC_CMAP_INDICES_MAX ) )
/* the charmap query */
typedef struct FTC_CMapQueryRec_
{
- FTC_FaceID face_id;
- FT_UInt cmap_index;
- FT_UInt32 char_code;
+ FTC_FaceID face_id;
+ FT_UInt cmap_index;
+ FT_UInt32 char_code;
} FTC_CMapQueryRec, *FTC_CMapQuery;
-#define FTC_CMAP_QUERY(x) ((FTC_CMapQuery)(x))
-#define FTC_CMAP_QUERY_HASH(x) FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->char_code )
+#define FTC_CMAP_QUERY( x ) ((FTC_CMapQuery)(x))
+#define FTC_CMAP_QUERY_HASH( x ) \
+ FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->char_code )
- /* the cmap cache node */
+ /* the cmap cache node */
typedef struct FTC_CMapNodeRec_
{
FTC_NodeRec node;
@@ -74,7 +77,8 @@
} FTC_CMapNodeRec, *FTC_CMapNode;
#define FTC_CMAP_NODE( x ) ( (FTC_CMapNode)( x ) )
-#define FTC_CMAP_NODE_HASH(x) FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->first )
+#define FTC_CMAP_NODE_HASH( x ) \
+ FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->first )
/* if (indices[n] == FTC_CMAP_UNKNOWN), we assume that the corresponding */
/* glyph indices haven't been queried through FT_Get_Glyph_Index() yet */
@@ -90,14 +94,15 @@
/*************************************************************************/
- /* no need for specific finalizer; we use "ftc_node_done" directly */
+ /* no need for specific finalizer; we use `ftc_node_done' directly */
FT_CALLBACK_DEF( void )
- ftc_cmap_node_free( FTC_CMapNode node,
- FTC_Cache cache )
+ ftc_cmap_node_free( FTC_CMapNode node,
+ FTC_Cache cache )
{
FT_Memory memory = cache->memory;
+
FT_FREE( node );
}
@@ -113,6 +118,7 @@
FTC_CMapNode node;
FT_UInt nn;
+
if ( !FT_NEW( node ) )
{
node->face_id = query->face_id;
@@ -149,8 +155,10 @@
{
FT_UInt32 offset = (FT_UInt32)( query->char_code - node->first );
+
return FT_BOOL( offset < FTC_CMAP_INDICES_MAX );
}
+
return 0;
}
@@ -162,6 +170,7 @@
return FT_BOOL( node->face_id == face_id );
}
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -174,17 +183,18 @@
FT_CALLBACK_TABLE_DEF
const FTC_CacheClassRec ftc_cmap_cache_class =
{
- (FTC_Node_NewFunc) ftc_cmap_node_new,
- (FTC_Node_WeightFunc) ftc_cmap_node_weight,
- (FTC_Node_CompareFunc) ftc_cmap_node_compare,
- (FTC_Node_CompareFunc) ftc_cmap_node_remove_faceid,
- (FTC_Node_FreeFunc) ftc_cmap_node_free,
+ (FTC_Node_NewFunc) ftc_cmap_node_new,
+ (FTC_Node_WeightFunc) ftc_cmap_node_weight,
+ (FTC_Node_CompareFunc)ftc_cmap_node_compare,
+ (FTC_Node_CompareFunc)ftc_cmap_node_remove_faceid,
+ (FTC_Node_FreeFunc) ftc_cmap_node_free,
sizeof ( FTC_CacheRec ),
- (FTC_Cache_InitFunc) FTC_Cache_Init,
- (FTC_Cache_DoneFunc) FTC_Cache_Done,
+ (FTC_Cache_InitFunc) FTC_Cache_Init,
+ (FTC_Cache_DoneFunc) FTC_Cache_Done,
};
+
/* documentation is in ftccmap.h */
FT_EXPORT_DEF( FT_Error )
@@ -192,9 +202,11 @@
FTC_CMapCache *acache )
{
return FTC_Manager_RegisterCache( manager,
- & ftc_cmap_cache_class,
+ &ftc_cmap_cache_class,
FTC_CACHE_P( acache ) );
}
+
+
/* documentation is in ftccmap.h */
FT_EXPORT_DEF( FT_UInt )
@@ -234,10 +246,11 @@
FT_ASSERT( (FT_UInt)( char_code - node->first ) < FTC_CMAP_INDICES_MAX );
- gindex = node->indices[ char_code - node->first ];
+ gindex = node->indices[char_code - node->first];
if ( gindex == FTC_CMAP_UNKNOWN )
{
- FT_Face face;
+ FT_Face face;
+
gindex = 0;
@@ -249,23 +262,25 @@
{
FT_CharMap old, cmap = NULL;
+
old = face->charmap;
- cmap = face->charmaps[ cmap_index ];
+ cmap = face->charmaps[cmap_index];
- if (old != cmap)
+ if ( old != cmap )
FT_Set_Charmap( face, cmap );
gindex = FT_Get_Char_Index( face, char_code );
- if (old != cmap)
+ if ( old != cmap )
FT_Set_Charmap( face, old );
}
- node->indices[ char_code - node->first ] = gindex;
+ node->indices[char_code - node->first] = gindex;
}
Exit:
return gindex;
}
+
/* END */
diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c
index b555f0f..eb48d66 100644
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Glyph Image (FT_Glyph) cache (body). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -39,16 +39,16 @@
FT_EXPORT_DEF( void )
- FTC_GNode_UnselectFamily( FTC_GNode gnode,
- FTC_Cache cache )
+ FTC_GNode_UnselectFamily( FTC_GNode gnode,
+ FTC_Cache cache )
{
FTC_Family family = gnode->family;
+
gnode->family = NULL;
if ( family && --family->num_nodes <= 0 )
- {
- FTC_MruList_Remove( & FTC_GCACHE(cache)->families, (FTC_MruNode)family );
- }
+ FTC_MruList_Remove( &FTC_GCACHE( cache )->families,
+ (FTC_MruNode)family );
}
@@ -84,7 +84,8 @@
FTC_Family_Init( FTC_Family family,
FTC_Cache cache )
{
- FTC_GCacheClass clazz = FTC_CACHE__GCACHE_CLASS(cache);
+ FTC_GCacheClass clazz = FTC_CACHE__GCACHE_CLASS( cache );
+
family->clazz = clazz->family_class;
family->num_nodes = 0;
@@ -97,17 +98,18 @@
{
FT_Error error;
- error = FTC_Cache_Init( FTC_CACHE(cache) );
+ error = FTC_Cache_Init( FTC_CACHE( cache ) );
if ( !error )
{
- FTC_GCacheClass clazz = (FTC_GCacheClass) FTC_CACHE(cache)->org_class;
+ FTC_GCacheClass clazz = (FTC_GCacheClass)FTC_CACHE( cache )->org_class;
FTC_MruList_Init( &cache->families,
clazz->family_class,
- 0, /* no maximum here !! */
+ 0, /* no maximum here! */
cache,
- FTC_CACHE(cache)->memory );
+ FTC_CACHE( cache )->memory );
}
+
return error;
}
@@ -125,8 +127,8 @@
FTC_GCacheClass clazz,
FTC_GCache *acache )
{
- return FTC_Manager_RegisterCache( manager, (FTC_CacheClass) clazz,
- (FTC_Cache*) acache );
+ return FTC_Manager_RegisterCache( manager, (FTC_CacheClass)clazz,
+ (FTC_Cache*)acache );
}
@@ -137,13 +139,14 @@
FTC_GQuery query,
FTC_Node *anode )
{
- FT_Error error;
+ FT_Error error;
+
query->gindex = gindex;
FTC_MRULIST_LOOKUP( &cache->families, query, query->family, error );
if ( !error )
- error = FTC_Cache_Lookup( FTC_CACHE(cache), hash, query, anode );
+ error = FTC_Cache_Lookup( FTC_CACHE( cache ), hash, query, anode );
return error;
}
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index 574ef78..2c942d1 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Image cache (body). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,6 +31,7 @@
{
FT_Memory memory = cache->memory;
+
if ( inode->glyph )
{
FT_Done_Glyph( inode->glyph );
@@ -52,6 +53,7 @@
FT_Error error;
FTC_INode inode;
+
if ( !FT_NEW( inode ) )
{
FTC_GNode gnode = FTC_GNODE( inode );
@@ -59,12 +61,15 @@
FT_UInt gindex = gquery->gindex;
FTC_IFamilyClass clazz = FTC_CACHE__IFAMILY_CLASS( cache );
+
/* initialize its inner fields */
FTC_GNode_Init( gnode, gindex, family );
/* we will now load the glyph image */
- error = clazz->family_load_glyph( family, gindex, cache, &inode->glyph );
+ error = clazz->family_load_glyph( family, gindex, cache,
+ &inode->glyph );
}
+
*pinode = inode;
return error;
}
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 6594448..8a7b681 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,19 +33,22 @@
static FT_Error
- ftc_scaler_lookup_size( FTC_Manager manager,
- FTC_Scaler scaler,
- FT_Size *asize )
+ ftc_scaler_lookup_size( FTC_Manager manager,
+ FTC_Scaler scaler,
+ FT_Size *asize )
{
FT_Face face;
FT_Size size = NULL;
FT_Error error;
+
error = FTC_Manager_LookupFace( manager, scaler->face_id, &face );
- if ( error ) goto Exit;
+ if ( error )
+ goto Exit;
error = FT_New_Size( face, &size );
- if ( error ) goto Exit;
+ if ( error )
+ goto Exit;
FT_Activate_Size( size );
@@ -66,11 +69,11 @@
}
- typedef struct FTC_SizeNodeRec_
+ typedef struct FTC_SizeNodeRec_
{
- FTC_MruNodeRec node;
- FT_Size size;
- FTC_ScalerRec scaler;
+ FTC_MruNodeRec node;
+ FT_Size size;
+ FTC_ScalerRec scaler;
} FTC_SizeNodeRec, *FTC_SizeNode;
@@ -80,6 +83,7 @@
{
FT_Size size = node->size;
+
if ( size )
FT_Done_Size( size );
}
@@ -91,15 +95,15 @@
{
FTC_Scaler scaler0 = &node->scaler;
+
return FTC_SCALER_COMPARE( scaler0, scaler );
}
-
FT_CALLBACK_DEF( FT_Error )
- ftc_size_node_init( FTC_SizeNode node,
- FTC_Scaler scaler,
- FTC_Manager manager )
+ ftc_size_node_init( FTC_SizeNode node,
+ FTC_Scaler scaler,
+ FTC_Manager manager )
{
node->scaler = scaler[0];
@@ -108,9 +112,9 @@
FT_CALLBACK_DEF( FT_Error )
- ftc_size_node_reset( FTC_SizeNode node,
- FTC_Scaler scaler,
- FTC_Manager manager )
+ ftc_size_node_reset( FTC_SizeNode node,
+ FTC_Scaler scaler,
+ FTC_Manager manager )
{
FT_Done_Size( node->size );
@@ -123,14 +127,14 @@
static const FTC_MruListClassRec ftc_size_list_class =
{
sizeof( FTC_SizeNodeRec ),
- (FTC_MruNode_CompareFunc) ftc_size_node_compare,
- (FTC_MruNode_InitFunc) ftc_size_node_init,
- (FTC_MruNode_ResetFunc) ftc_size_node_reset,
- (FTC_MruNode_DoneFunc) ftc_size_node_done
+ (FTC_MruNode_CompareFunc)ftc_size_node_compare,
+ (FTC_MruNode_InitFunc) ftc_size_node_init,
+ (FTC_MruNode_ResetFunc) ftc_size_node_reset,
+ (FTC_MruNode_DoneFunc) ftc_size_node_done
};
- /* helper function used by ftc_face_node_done */
+ /* helper function used by ftc_face_node_done */
static FT_Bool
ftc_size_node_compare_faceid( FTC_SizeNode node,
FTC_FaceID face_id )
@@ -140,9 +144,9 @@
FT_EXPORT_DEF( FT_Error )
- FTC_Manager_LookupSize( FTC_Manager manager,
- FTC_Scaler scaler,
- FT_Size *asize )
+ FTC_Manager_LookupSize( FTC_Manager manager,
+ FTC_Scaler scaler,
+ FT_Size *asize )
{
FT_Error error;
FTC_SizeNode node;
@@ -163,6 +167,7 @@
{
FTC_Scaler scaler0 = &node->scaler;
+
if ( FTC_SCALER_COMPARE( scaler0, scaler ) )
goto Found;
}
@@ -195,13 +200,13 @@
} FTC_FaceNodeRec, *FTC_FaceNode;
-
FT_CALLBACK_DEF( FT_Error )
ftc_face_node_init( FTC_FaceNode node,
FTC_FaceID face_id,
FTC_Manager manager )
{
- FT_Error error;
+ FT_Error error;
+
node->face_id = face_id;
@@ -215,6 +220,7 @@
if ( node->face->size )
FT_Done_Size( node->face->size );
}
+
return error;
}
@@ -226,9 +232,9 @@
/* we must begin by removing all scalers for the target face */
/* from the manager's list */
FTC_MruList_RemoveSelection(
- & manager->sizes,
- (FTC_MruNode_CompareFunc) ftc_size_node_compare_faceid,
- node->face_id );
+ & manager->sizes,
+ (FTC_MruNode_CompareFunc)ftc_size_node_compare_faceid,
+ node->face_id );
/* all right, we can discard the face now */
FT_Done_Face( node->face );
@@ -249,14 +255,13 @@
{
sizeof( FTC_FaceNodeRec),
- (FTC_MruNode_CompareFunc) ftc_face_node_compare,
- (FTC_MruNode_InitFunc) ftc_face_node_init,
- (FTC_MruNode_ResetFunc) NULL,
- (FTC_MruNode_DoneFunc) ftc_face_node_done
+ (FTC_MruNode_CompareFunc)ftc_face_node_compare,
+ (FTC_MruNode_InitFunc) ftc_face_node_init,
+ (FTC_MruNode_ResetFunc) NULL,
+ (FTC_MruNode_DoneFunc) ftc_face_node_done
};
-
/* documentation is in ftcache.h */
FT_EXPORT_DEF( FT_Error )
@@ -296,8 +301,6 @@
}
-
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -385,6 +388,7 @@
{
FTC_Cache cache = manager->caches[idx];
+
if ( cache )
{
cache->clazz.cache_done( cache );
@@ -439,17 +443,16 @@
do
{
- FTC_Cache cache = manager->caches[ node->cache_index ];
+ FTC_Cache cache = manager->caches[node->cache_index];
+
if ( (FT_UInt)node->cache_index >= manager->num_caches )
FT_ERROR(( "FTC_Manager_Check: invalid node (cache index = %ld\n",
node->cache_index ));
else
- {
weight += cache->clazz.node_weight( node, cache );
- }
- node = FTC_NODE__NEXT(node);
+ node = FTC_NODE__NEXT( node );
} while ( node != first );
@@ -468,7 +471,7 @@
do
{
count++;
- node = FTC_NODE__NEXT(node);
+ node = FTC_NODE__NEXT( node );
} while ( node != first );
@@ -510,14 +513,14 @@
if ( manager->cur_weight < manager->max_weight || first == NULL )
return;
- /* go to last node - it's a circular list */
- node = FTC_NODE__PREV(first);
+ /* go to last node -- it's a circular list */
+ node = FTC_NODE__PREV( first );
do
{
FTC_Node prev;
- prev = ( node == first ) ? NULL : FTC_NODE__PREV(node);
+ prev = ( node == first ) ? NULL : FTC_NODE__PREV( node );
if ( node->ref_count <= 0 )
ftc_node_destroy( node, manager );
@@ -532,8 +535,8 @@
FT_EXPORT_DEF( FT_Error )
FTC_Manager_RegisterCache( FTC_Manager manager,
- FTC_CacheClass clazz,
- FTC_Cache *acache )
+ FTC_CacheClass clazz,
+ FTC_Cache *acache )
{
FT_Error error = FTC_Err_Invalid_Argument;
FTC_Cache cache = NULL;
@@ -543,6 +546,7 @@
{
FT_Memory memory = manager->memory;
+
if ( manager->num_caches >= FTC_MAX_CACHES )
{
error = FTC_Err_Too_Many_Caches;
@@ -570,7 +574,7 @@
goto Exit;
}
- manager->caches[ manager->num_caches++ ] = cache;
+ manager->caches[manager->num_caches++] = cache;
}
}
@@ -582,13 +586,14 @@
FT_EXPORT_DEF( FT_UInt )
FTC_Manager_FlushN( FTC_Manager manager,
- FT_UInt count )
+ FT_UInt count )
{
FTC_Node first = manager->nodes_list;
FTC_Node node;
FT_UInt result;
- /* try to remove "count" nodes from the list */
+
+ /* try to remove `count' nodes from the list */
if ( first == NULL ) /* empty list! */
return 0;
@@ -596,10 +601,10 @@
node = FTC_NODE__PREV(first);
for ( result = 0; result < count; )
{
- FTC_Node prev = FTC_NODE__PREV(node);
+ FTC_Node prev = FTC_NODE__PREV( node );
- /* don't touch locked nodes */
+ /* don't touch locked nodes */
if ( node->ref_count <= 0 )
{
ftc_node_destroy( node, manager );
@@ -621,9 +626,9 @@
{
FT_UInt nn;
- /* this will remove all FTC_SizeNode that correspond to
- * the face_id as well
- */
+ /* this will remove all FTC_SizeNode that correspond to
+ * the face_id as well
+ */
FTC_MruList_RemoveSelection( &manager->faces, NULL, face_id );
for ( nn = 0; nn < manager->num_caches; nn++ )
diff --git a/src/cache/ftcmru.c b/src/cache/ftcmru.c
index ca0b692..af97ce3 100644
--- a/src/cache/ftcmru.c
+++ b/src/cache/ftcmru.c
@@ -1,3 +1,21 @@
+/***************************************************************************/
+/* */
+/* ftcmru.c */
+/* */
+/* FreeType MRU support (body). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
#include <ft2build.h>
#include FT_CACHE_H
#include FT_CACHE_INTERNAL_MRU_H
@@ -6,29 +24,34 @@
#include "ftcerror.h"
+
FT_EXPORT_DEF( void )
FTC_MruNode_Prepend( FTC_MruNode *plist,
FTC_MruNode node )
{
FTC_MruNode first = *plist;
+
if ( first )
{
FTC_MruNode last = first->prev;
+
#ifdef FT_DEBUG_ERROR
{
FTC_MruNode cnode = first;
+
+
do
{
if ( cnode == node )
{
- fprintf( stderr, "FTC_MruNode_Prepend: invalid action !!\n" );
- exit(2);
+ fprintf( stderr, "FTC_MruNode_Prepend: invalid action!\n" );
+ exit( 2 );
}
cnode = cnode->next;
- }
- while ( cnode != first );
+
+ } while ( cnode != first );
}
#endif
@@ -52,12 +75,14 @@
{
FTC_MruNode first = *plist;
+
FT_ASSERT( first != NULL );
if ( first != node )
{
FTC_MruNode prev, next, last;
+
#ifdef FT_DEBUG_ERROR
{
FTC_MruNode cnode = first;
@@ -66,11 +91,11 @@
if ( cnode == node )
goto Ok;
cnode = cnode->next;
- }
- while ( cnode != first );
- fprintf( stderr, "FTC_MruNode_Up: invalid action !!\n" );
- exit(2);
+ } while ( cnode != first );
+
+ fprintf( stderr, "FTC_MruNode_Up: invalid action!\n" );
+ exit( 2 );
Ok:
}
#endif
@@ -85,7 +110,7 @@
last->next = node;
first->prev = node;
- node->next = first;
+ node->next = first;
node->prev = last;
*plist = node;
@@ -100,21 +125,24 @@
FTC_MruNode first = *plist;
FTC_MruNode prev, next;
+
FT_ASSERT( first != NULL );
#ifdef FT_DEBUG_ERROR
{
FTC_MruNode cnode = first;
+
+
do
{
if ( cnode == node )
goto Ok;
cnode = cnode->next;
- }
- while ( cnode != first );
- fprintf( stderr, "FTC_MruNode_Remove: invalid action !!\n" );
- exit(2);
+ } while ( cnode != first );
+
+ fprintf( stderr, "FTC_MruNode_Remove: invalid action!\n" );
+ exit( 2 );
Ok:
}
#endif
@@ -134,8 +162,7 @@
}
else if ( node == first )
*plist = next;
- }
-
+ }
FT_EXPORT_DEF( void )
@@ -171,14 +198,14 @@
}
-
FT_EXPORT_DEF( FTC_MruNode )
FTC_MruList_Find( FTC_MruList list,
- FT_Pointer key )
+ FT_Pointer key )
{
FTC_MruNode_CompareFunc compare = list->clazz.node_compare;
FTC_MruNode first, node;
+
first = list->nodes;
node = NULL;
@@ -191,23 +218,24 @@
return node;
node = node->next;
+
+ } while ( node != first);
}
- while ( node != first) ;
- }
+
return NULL;
}
-
FT_EXPORT_DEF( FT_Error )
- FTC_MruList_New( FTC_MruList list,
- FT_Pointer key,
- FTC_MruNode *anode )
+ FTC_MruList_New( FTC_MruList list,
+ FT_Pointer key,
+ FTC_MruNode *anode )
{
FT_Error error;
FTC_MruNode node;
FT_Memory memory = list->memory;
+
if ( list->num_nodes >= list->max_nodes && list->max_nodes > 0 )
{
node = list->nodes->prev;
@@ -254,11 +282,12 @@
FT_EXPORT( FT_Error )
FTC_MruList_Lookup( FTC_MruList list,
- FT_Pointer key,
- FTC_MruNode *anode )
+ FT_Pointer key,
+ FTC_MruNode *anode )
{
FTC_MruNode node;
+
node = FTC_MruList_Find( list, key );
if ( node == NULL )
return FTC_MruList_New( list, key, anode );
@@ -269,8 +298,8 @@
FT_EXPORT_DEF( void )
- FTC_MruList_Remove( FTC_MruList list,
- FTC_MruNode node )
+ FTC_MruList_Remove( FTC_MruList list,
+ FTC_MruNode node )
{
FTC_MruNode_Remove( &list->nodes, node );
list->num_nodes--;
@@ -278,23 +307,25 @@
{
FT_Memory memory = list->memory;
- if ( list->clazz.node_done )
- list->clazz.node_done( node, list->data );
- FT_FREE( node );
- }
+ if ( list->clazz.node_done )
+ list->clazz.node_done( node, list->data );
+
+ FT_FREE( node );
+ }
}
FT_EXPORT_DEF( void )
FTC_MruList_RemoveSelection( FTC_MruList list,
- FTC_MruNode_CompareFunc select,
+ FTC_MruNode_CompareFunc selection,
FT_Pointer key )
{
FTC_MruNode first, node, next;
+
first = list->nodes;
- while ( first && select( first, key ) )
+ while ( first && selection( first, key ) )
{
FTC_MruList_Remove( list, first );
first = list->nodes;
@@ -307,7 +338,7 @@
{
next = node->next;
- if ( select( node, key ) )
+ if ( selection( node, key ) )
FTC_MruList_Remove( list, node );
node = next;
@@ -315,5 +346,5 @@
}
}
-/* END */
+/* END */
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index e3fa08a..98f68ee 100644
Binary files a/src/cache/ftcsbits.c and b/src/cache/ftcsbits.c differ
diff --git a/src/cff/Jamfile b/src/cff/Jamfile
index cf7cf63..dcf24c8 100644
--- a/src/cff/Jamfile
+++ b/src/cff/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/cff Jamfile (c) 2001 David Turner
+# FreeType 2 src/cff Jamfile (c) 2001, 2002 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) cff ;
diff --git a/src/cff/cff.c b/src/cff/cff.c
index 013c329..e6d8954 100644
--- a/src/cff/cff.c
+++ b/src/cff/cff.c
@@ -4,7 +4,7 @@
/* */
/* FreeType OpenType driver component (body only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/cff/cffload.h b/src/cff/cffload.h
index fa8ac51..ccf8ada 100644
--- a/src/cff/cffload.h
+++ b/src/cff/cffload.h
@@ -62,7 +62,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Byte )
- cff_fd_select_get( CFF_FDSelect select,
+ cff_fd_select_get( CFF_FDSelect fdselect,
FT_UInt glyph_index );
diff --git a/src/cff/cffparse.h b/src/cff/cffparse.h
index b78c286..8f3fa58 100644
--- a/src/cff/cffparse.h
+++ b/src/cff/cffparse.h
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (specification) */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/pshinter/Jamfile b/src/pshinter/Jamfile
index bdde744..ee02a14 100644
--- a/src/pshinter/Jamfile
+++ b/src/pshinter/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/pshinter Jamfile (c) 2001 David Turner
+# FreeType 2 src/pshinter Jamfile (c) 2001, 2003 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) pshinter ;
diff --git a/src/pshinter/pshrec.h b/src/pshinter/pshrec.h
index 29d3718..0159e9c 100644
--- a/src/pshinter/pshrec.h
+++ b/src/pshinter/pshrec.h
@@ -4,7 +4,7 @@
/* */
/* Postscript (Type1/Type2) hints recorder (specification). */
/* */
-/* Copyright 2001, 2002 by */
+/* Copyright 2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c
index 7abaa9f..90c1bee 100644
--- a/src/sfnt/sfnt.c
+++ b/src/sfnt/sfnt.c
@@ -4,7 +4,7 @@
/* */
/* Single object library component. */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/sfnt/ttcmap0.h b/src/sfnt/ttcmap0.h
index 28f5bac..6ca9ca1 100644
--- a/src/sfnt/ttcmap0.h
+++ b/src/sfnt/ttcmap0.h
@@ -4,7 +4,7 @@
/* */
/* TrueType new character mapping table (cmap) support (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/type42/t42types.h b/src/type42/t42types.h
index 9e612d5..d44ac4e 100644
--- a/src/type42/t42types.h
+++ b/src/type42/t42types.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 font data types (specification only). */
/* */
-/* Copyright 2002 by Roberto Alameda. */
+/* Copyright 2002, 2003 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
diff --git a/src/winfonts/winfnt.h b/src/winfonts/winfnt.h
index 5b2016a..f36901e 100644
--- a/src/winfonts/winfnt.h
+++ b/src/winfonts/winfnt.h
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */