All function comments are now removed from source files (and moved to the header files if necessary). Some minor fixes to have `make multi' run successfully (with gcc and g++). Fixing compiler warnings.
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
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 8d77021..48bc711 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -319,7 +319,7 @@
/* */
/* <Description> */
/* An enumeration used to specify encodings supported by charmaps. */
- /* Used in the FT_Select_CharMap() API function. */
+ /* Used in the FT_Select_Charmap() API function. */
/* */
/* <Note> */
/* Because of 32-bit charcodes defined in Unicode (i.e., surrogates), */
@@ -1590,6 +1590,22 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
+ /* */
+ /* <Note> */
+ /* The values of `pixel_width' and `pixel_height' correspond to the */
+ /* pixel values of the _typographic_ character size, which are NOT */
+ /* necessarily the same as the dimensions of the glyph `bitmap */
+ /* cells'. */
+ /* */
+ /* The `character size' is really the size of an abstract square */
+ /* called the `EM', used to design the font. However, depending */
+ /* on the font design, glyphs will be smaller or greater than the */
+ /* EM. */
+ /* */
+ /* This means that setting the pixel size to, say, 8x8 doesn't */
+ /* guarantee in any way that you will get glyph bitmaps that all fit */
+ /* within an 8x8 cell (sometimes even far from it). */
+ /* */
FT_EXPORT( FT_Error ) FT_Set_Pixel_Sizes( FT_Face face,
FT_UInt pixel_width,
FT_UInt pixel_height );
@@ -1624,7 +1640,7 @@
/* If the glyph image is not a bitmap, and if the bit flag */
/* FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image will be */
/* transformed with the information passed to a previous call to */
- /* FT_Set_Transform. */
+ /* FT_Set_Transform(). */
/* */
/* Note that this also transforms the `face.glyph.advance' field, but */
/* *not* the values in `face.glyph.metrics'. */
@@ -2123,10 +2139,10 @@
/* decoding. */
/* */
/* <InOut> */
- /* face :: A handle to the source face object. */
+ /* face :: A handle to the source face object. */
/* */
/* <Input> */
- /* charmap :: A handle to the selected charmap. */
+ /* charmap :: A handle to the selected charmap. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
@@ -2263,9 +2279,6 @@
/* <Input> */
/* matrix :: A pointer to the source 2x2 matrix. */
/* */
- /* <MT-Note> */
- /* Yes. */
- /* */
/* <Note> */
/* The result is undefined if either `vector' or `matrix' is invalid. */
/* */
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index d1dfbfd..9126d4d 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -402,9 +402,6 @@
/* <InOut> */
/* b :: A pointer to matrix `b'. */
/* */
- /* <MT-Note> */
- /* Yes. */
- /* */
/* <Note> */
/* The result is undefined if either `a' or `b' is zero. */
/* */
@@ -427,9 +424,6 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- /* <MT-Note> */
- /* Yes. */
- /* */
FT_EXPORT( FT_Error ) FT_Matrix_Invert( FT_Matrix* matrix );
diff --git a/include/freetype/ftmac.h b/include/freetype/ftmac.h
index 42f1c03..4b999e1 100644
--- a/include/freetype/ftmac.h
+++ b/include/freetype/ftmac.h
@@ -48,8 +48,8 @@
/* <Input> */
/* fond :: An FOND resource. */
/* */
- /* face_index :: only supported for the -1 `sanity check' */
- /* special case. */
+ /* face_index :: Only supported for the -1 `sanity check' special */
+ /* case. */
/* */
/* <Output> */
/* aface :: A handle to a new face object. */
@@ -60,6 +60,7 @@
/* <Notes> */
/* This function can be used to create FT_Face abjects from fonts */
/* that are installed in the system like so: */
+ /* */
/* fond = GetResource( 'FOND', fontName ); */
/* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */
/* */
diff --git a/include/freetype/ftmodule.h b/include/freetype/ftmodule.h
index 0552783..bfe37b0 100644
--- a/include/freetype/ftmodule.h
+++ b/include/freetype/ftmodule.h
@@ -236,7 +236,7 @@
/* <Input> */
/* hook_index :: The index of the debug hook. You should use the */
/* values defined in ftobjs.h, e.g. */
- /* FT_DEBUG_HOOK_TRUETYPE */
+ /* FT_DEBUG_HOOK_TRUETYPE. */
/* */
/* debug_hook :: The function used to debug the interpreter. */
/* */
diff --git a/include/freetype/ftnames.h b/include/freetype/ftnames.h
index 87517e1..f56684d 100644
--- a/include/freetype/ftnames.h
+++ b/include/freetype/ftnames.h
@@ -81,7 +81,7 @@
/* Retrieves the number of name strings in the SFNT `name' table. */
/* */
/* <Input> */
- /* face :: A handle to the source face. */
+ /* face :: A handle to the source face. */
/* */
/* <Return> */
/* The number of strings in the `name' table. */
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index 8010e1b..3827980 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -84,9 +84,6 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- /* <MT-Note> */
- /* No. */
- /* */
/* <Note> */
/* The reason why this function takes a `library' parameter is simply */
/* to use the library's memory allocator. */
@@ -121,9 +118,6 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- /* <MT-Note> */
- /* No. */
- /* */
/* <Note> */
/* If the outline's `owner' field is not set, only the outline */
/* descriptor will be released. */
@@ -162,9 +156,6 @@
/* <Output> */
/* acbox :: The outline's control box. */
/* */
- /* <MT-Note> */
- /* Yes. */
- /* */
FT_EXPORT( void ) FT_Outline_Get_CBox( FT_Outline* outline,
FT_BBox *acbox );
@@ -185,9 +176,6 @@
/* */
/* yOffset :: The vertical offset. */
/* */
- /* <MT-Note> */
- /* Yes. */
- /* */
FT_EXPORT( void ) FT_Outline_Translate( FT_Outline* outline,
FT_Pos xOffset,
FT_Pos yOffset );
@@ -219,22 +207,21 @@
/*************************************************************************/
/* */
/* <Function> */
- /* FT_Vector_Transform */
+ /* FT_Outline_Transform */
/* */
/* <Description> */
- /* Transforms a single vector through a 2x2 matrix. */
+ /* Applies a simple 2x2 matrix to all of an outline's points. Useful */
+ /* for applying rotations, slanting, flipping, etc. */
/* */
/* <InOut> */
- /* vector :: The target vector to transform. */
+ /* outline :: A pointer to the target outline descriptor. */
/* */
/* <Input> */
- /* matrix :: A pointer to the source 2x2 matrix. */
- /* */
- /* <MT-Note> */
- /* Yes. */
+ /* matrix :: A pointer to the transformation matrix. */
/* */
/* <Note> */
- /* The result is undefined if either `vector' or `matrix' is invalid. */
+ /* You can use FT_Outline_Translate() if you need to translate the */
+ /* outline's points. */
/* */
FT_EXPORT( void ) FT_Outline_Transform( FT_Outline* outline,
FT_Matrix* matrix );
@@ -282,10 +269,6 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- /* <MT-Note> */
- /* YES. Rendering is synchronized, so that concurrent calls to the */
- /* scan-line converter will be serialized. */
- /* */
/* <Note> */
/* This function does NOT CREATE the bitmap, it only renders an */
/* outline image within the one you pass to it! */
@@ -320,10 +303,6 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- /* <MT-Note> */
- /* YES. Rendering is synchronized, so that concurrent calls to the */
- /* scan-line converter will be serialized. */
- /* */
/* <Note> */
/* You should know what you are doing and how FT_Raster_Params works */
/* to use this function. */
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 2b1745a..dfc6b52 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -40,6 +40,22 @@
#define SQRT_64( z ) FT_Sqrt64( z )
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Sqrt64 */
+ /* */
+ /* <Description> */
+ /* Computes the square root of a 64-bit value. That sounds stupid, */
+ /* but it is needed to obtain maximal accuracy in the TrueType */
+ /* bytecode interpreter. */
+ /* */
+ /* <Input> */
+ /* l :: A 64-bit integer. */
+ /* */
+ /* <Return> */
+ /* The 32-bit square-root. */
+ /* */
FT_EXPORT( FT_Int32 ) FT_Sqrt64( FT_Int64 l );
#endif /* FT_CONFIG_OPTION_OLD_CALCS */
@@ -60,14 +76,72 @@
#define MUL_64( x, y, z ) FT_MulTo64( x, y, &z )
#define DIV_64( x, y ) FT_Div64by32( &x, y )
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Add64 */
+ /* */
+ /* <Description> */
+ /* Add two Int64 values. */
+ /* */
+ /* <Input> */
+ /* x :: A pointer to the first value to be added. */
+ /* y :: A pointer to the second value to be added. */
+ /* */
+ /* <Output> */
+ /* z :: A pointer to the result of `x + y'. */
+ /* */
+ /* <Note> */
+ /* Will be wrapped by the ADD_64() macro. */
+ /* */
FT_EXPORT( void ) FT_Add64( FT_Int64* x,
FT_Int64* y,
FT_Int64 *z );
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_MulTo64 */
+ /* */
+ /* <Description> */
+ /* Multiplies two Int32 integers. Returns an Int64 integer. */
+ /* */
+ /* <Input> */
+ /* x :: The first multiplier. */
+ /* y :: The second multiplier. */
+ /* */
+ /* <Output> */
+ /* z :: A pointer to the result of `x * y'. */
+ /* */
+ /* <Note> */
+ /* Will be wrapped by the MUL_64() macro. */
+ /* */
FT_EXPORT( void ) FT_MulTo64( FT_Int32 x,
FT_Int32 y,
FT_Int64 *z );
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Div64by32 */
+ /* */
+ /* <Description> */
+ /* Divides an Int64 value by an Int32 value. Returns an Int32 */
+ /* integer. */
+ /* */
+ /* <Input> */
+ /* x :: A pointer to the dividend. */
+ /* y :: The divisor. */
+ /* */
+ /* <Return> */
+ /* The result of `x / y'. */
+ /* */
+ /* <Note> */
+ /* Will be wrapped by the DIV_64() macro. */
+ /* */
FT_EXPORT( FT_Int32 ) FT_Div64by32( FT_Int64* x,
FT_Int32 y );
@@ -78,6 +152,22 @@
#define SQRT_64( z ) FT_Sqrt64( &z )
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Sqrt64 */
+ /* */
+ /* <Description> */
+ /* Computes the square root of a 64-bits value. That sounds stupid, */
+ /* but it is needed to obtain maximal accuracy in the TrueType */
+ /* bytecode interpreter. */
+ /* */
+ /* <Input> */
+ /* z :: A pointer to a 64-bit integer. */
+ /* */
+ /* <Return> */
+ /* The 32-bit square-root. */
+ /* */
FT_EXPORT( FT_Int32 ) FT_Sqrt64( FT_Int64* x );
#endif /* FT_CONFIG_OPTION_OLD_CALCS */
@@ -90,7 +180,22 @@
#define SQRT_32( x ) FT_Sqrt32( x )
- FT_BASE( FT_Int32 ) FT_Sqrt32( FT_Int32 x );
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Sqrt32 */
+ /* */
+ /* <Description> */
+ /* Computes the square root of an Int32 integer (which will be */
+ /* handled as an unsigned long value). */
+ /* */
+ /* <Input> */
+ /* x :: The value to compute the root for. */
+ /* */
+ /* <Return> */
+ /* The result of `sqrt(x)'. */
+ /* */
+ FT_EXPORT( FT_Int32 ) FT_Sqrt32( FT_Int32 x );
#endif /* !FT_CONFIG_OPTION_OLD_CALCS */
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index b47101d..9359984 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -138,6 +138,21 @@
} while ( 0 )
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_SetTraceLevel */
+ /* */
+ /* <Description> */
+ /* Sets the trace level for debugging. */
+ /* */
+ /* <Input> */
+ /* component :: The component which should be traced. See above for */
+ /* a complete list. If set to `trace_any', all */
+ /* components will be traced. */
+ /* */
+ /* level :: The tracing level. */
+ /* */
FT_EXPORT( void ) FT_SetTraceLevel( FT_Trace component,
char level );
diff --git a/include/freetype/internal/ftextend.h b/include/freetype/internal/ftextend.h
index 94ca4de..0a7b972 100644
--- a/include/freetype/internal/ftextend.h
+++ b/include/freetype/internal/ftextend.h
@@ -130,6 +130,22 @@
} FT_Extension_Class;
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Register_Extension */
+ /* */
+ /* <Description> */
+ /* Registers a new extension. */
+ /* */
+ /* <InOut> */
+ /* driver :: A handle to the driver object. */
+ /* */
+ /* class :: A pointer to a class describing the extension. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
FT_EXPORT( FT_Error ) FT_Register_Extension( FT_Driver driver,
FT_Extension_Class* clazz );
@@ -159,7 +175,26 @@
#endif
- /* return an extension's data & interface according to its ID */
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Get_Extension */
+ /* */
+ /* <Description> */
+ /* Queries an extension block by an extension ID string. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the face object. */
+ /* extension_id :: An ID string identifying the extension. */
+ /* */
+ /* <Output> */
+ /* extension_interface :: A generic pointer, usually pointing to a */
+ /* table of functions implementing the */
+ /* extension interface. */
+ /* */
+ /* <Return> */
+ /* A generic pointer to the extension block. */
+ /* */
FT_EXPORT( void* ) FT_Get_Extension( FT_Face face,
const char* extension_id,
void** extension_interface );
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 31ece53..6197823 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -299,11 +299,43 @@
/* this must be kept exported -- it is used by the cache manager */
/* even though it shouldn't be considered public for now */
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Size */
+ /* */
+ /* <Description> */
+ /* Creates a new size object from a given face object. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to a parent face object. */
+ /* */
+ /* <Output> */
+ /* asize :: A handle to a new size object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
FT_EXPORT( FT_Error ) FT_New_Size( FT_Face face,
FT_Size* size );
- FT_EXPORT( FT_Error ) FT_Done_Size( FT_Size size );
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Done_Size */
+ /* */
+ /* <Description> */
+ /* Discards a given size object. */
+ /* */
+ /* <Input> */
+ /* size :: A handle to a target size object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ FT_EXPORT( FT_Error ) FT_Done_Size( FT_Size size );
FT_BASE( FT_Error ) FT_New_GlyphSlot( FT_Face face,
@@ -429,7 +461,7 @@
FT_ModuleRec root;
FT_Renderer_Class* clazz;
FT_Glyph_Format glyph_format;
- const FT_Glyph_Class glyph_class;
+ FT_Glyph_Class glyph_class;
FT_Raster raster;
FT_Raster_Render_Func raster_render;
@@ -597,13 +629,66 @@
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Stream */
+ /* */
+ /* <Description> */
+ /* Creates a new stream object. */
+ /* */
+ /* <Input> */
+ /* filepathname :: The name of the stream (usually a file) to be */
+ /* opened. */
+ /* */
+ /* stream :: A pointer to the stream object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
FT_EXPORT( FT_Error ) FT_New_Stream( const char* filepathname,
FT_Stream astream );
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Done_Stream */
+ /* */
+ /* <Description> */
+ /* Closes and destroys a stream object. */
+ /* */
+ /* <Input> */
+ /* stream :: The stream to be closed and destroyed. */
+ /* */
FT_EXPORT( void ) FT_Done_Stream( FT_Stream stream );
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Memory */
+ /* */
+ /* <Description> */
+ /* Creates a new memory object. */
+ /* */
+ /* <Return> */
+ /* A pointer to the new memory object. 0 in case of error. */
+ /* */
FT_EXPORT( FT_Memory ) FT_New_Memory( void );
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Done_Memory */
+ /* */
+ /* <Description> */
+ /* Discards memory manager. */
+ /* */
+ /* <Input> */
+ /* memory :: A handle to the memory manager. */
+ /* */
FT_EXPORT( void ) FT_Done_Memory( FT_Memory memory );
#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 9d6bd3d..5657fa3 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -22,6 +22,7 @@
#include <freetype/tttables.h>
+#include <freetype/internal/ftobjs.h>
#ifdef __cplusplus
diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c
index fb08ab4..d17234b 100644
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -335,27 +335,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Get_BBox */
- /* */
- /* <Description> */
- /* Computes the exact bounding box of an outline. This is slower */
- /* than computing the control box. However, it uses an advanced */
- /* algorithm which returns _very_ quickly when the two boxes */
- /* coincide. Otherwise, the outline Bezier arcs are walked over to */
- /* extract their extrema. */
- /* */
- /* <Input> */
- /* outline :: A pointer to the source outline. */
- /* */
- /* <Output> */
- /* abbox :: A pointer to the outline's exact bounding box. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftbbox.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Outline_Get_BBox( FT_Outline* outline,
FT_BBox *abbox )
{
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 1d5e2a2..71da971 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -67,21 +67,8 @@
#else
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Sqrt32 */
- /* */
- /* <Description> */
- /* Computes the square root of an Int32 integer (which will be */
- /* handled as an unsigned long value). */
- /* */
- /* <Input> */
- /* x :: The value to compute the root for. */
- /* */
- /* <Return> */
- /* The result of `sqrt(x)'. */
- /* */
+ /* documentation is in ftcalc.h */
+
FT_EXPORT_DEF( FT_Int32 ) FT_Sqrt32( FT_Int32 x )
{
FT_ULong val, root, newroot, mask;
@@ -113,29 +100,8 @@
#ifdef FT_LONG64
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_MulDiv */
- /* */
- /* <Description> */
- /* A very simple function used to perform the computation `(a*b)/c' */
- /* with maximal accuracy (it uses a 64-bit intermediate integer */
- /* whenever necessary). */
- /* */
- /* This function isn't necessarily as fast as some processor specific */
- /* operations, but is at least completely portable. */
- /* */
- /* <Input> */
- /* a :: The first multiplier. */
- /* b :: The second multiplier. */
- /* c :: The divisor. */
- /* */
- /* <Return> */
- /* The result of `(a*b)/c'. This function never traps when trying to */
- /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */
- /* on the signs of `a' and `b'. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Long ) FT_MulDiv( FT_Long a,
FT_Long b,
FT_Long c )
@@ -153,35 +119,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_MulFix */
- /* */
- /* <Description> */
- /* A very simple function used to perform the computation */
- /* `(a*b)/0x10000' with maximal accuracy. Most of the time this is */
- /* used to multiply a given value by a 16.16 fixed float factor. */
- /* */
- /* <Input> */
- /* a :: The first multiplier. */
- /* b :: The second multiplier. Use a 16.16 factor here whenever */
- /* possible (see note below). */
- /* */
- /* <Return> */
- /* The result of `(a*b)/0x10000'. */
- /* */
- /* <Note> */
- /* This function has been optimized for the case where the absolute */
- /* value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */
- /* As this happens mainly when scaling from notional units to */
- /* fractional pixels in FreeType, it resulted in noticeable speed */
- /* improvements between versions 2.x and 1.x. */
- /* */
- /* As a conclusion, always try to place a 16.16 factor as the */
- /* _second_ argument of this function; this can make a great */
- /* difference. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Long ) FT_MulFix( FT_Long a,
FT_Long b )
{
@@ -196,29 +135,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_DivFix */
- /* */
- /* <Description> */
- /* A very simple function used to perform the computation */
- /* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */
- /* used to divide a given value by a 16.16 fixed float factor. */
- /* */
- /* <Input> */
- /* a :: The first multiplier. */
- /* b :: The second multiplier. Use a 16.16 factor here whenever */
- /* possible (see note below). */
- /* */
- /* <Return> */
- /* The result of `(a*0x10000)/b'. */
- /* */
- /* <Note> */
- /* The optimization for FT_DivFix() is simple: If (a << 16) fits in */
- /* 32 bits, then the division is computed directly. Otherwise, we */
- /* use a specialized version of the old FT_MulDiv64(). */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Long ) FT_DivFix( FT_Long a,
FT_Long b )
{
@@ -259,22 +177,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Sqrt64 */
- /* */
- /* <Description> */
- /* Computes the square root of a 64-bit value. That sounds stupid, */
- /* but it is needed to obtain maximal accuracy in the TrueType */
- /* bytecode interpreter. */
- /* */
- /* <Input> */
- /* l :: A 64-bit integer. */
- /* */
- /* <Return> */
- /* The 32-bit square-root. */
- /* */
+ /* documentation is in ftcalc.h */
+
FT_EXPORT_DEF( FT_Int32 ) FT_Sqrt64( FT_Int64 l )
{
FT_Int64 r, s;
@@ -301,6 +205,7 @@
FT_Int64 z;
+
z = (FT_Int64)(x) << 16;
return FT_Sqrt64( z );
}
@@ -311,46 +216,8 @@
#else /* FT_LONG64 */
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_MulDiv */
- /* */
- /* <Description> */
- /* A very simple function used to perform the computation `(a*b)/c' */
- /* with maximal accuracy (it uses a 64-bit intermediate integer */
- /* whenever necessary). */
- /* */
- /* This function isn't necessarily as fast as some processor specific */
- /* operations, but is at least completely portable. */
- /* */
- /* <Input> */
- /* a :: The first multiplier. */
- /* b :: The second multiplier. */
- /* c :: The divisor. */
- /* */
- /* <Return> */
- /* The result of `(a*b)/c'. This function never traps when trying to */
- /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */
- /* on the signs of `a' and `b'. */
- /* */
- /* <Note> */
- /* The FT_MulDiv() function has been optimized thanks to ideas from */
- /* Graham Asher. The trick is to optimize computation if everything */
- /* fits within 32 bits (a rather common case). */
- /* */
- /* We compute `a*b+c/2', then divide it by `c' (positive values). */
- /* */
- /* 46340 is FLOOR(SQRT(2^31-1)). */
- /* */
- /* if ( a <= 46340 && b <= 46340 ) then ( a*b <= 0x7FFEA810 ) */
- /* */
- /* 0x7FFFFFFF - 0x7FFEA810 = 0x157F0 */
- /* */
- /* if ( c < 0x157F0*2 ) then ( a*b+c/2 <= 0x7FFFFFFF ) */
- /* */
- /* and 2*0x157F0 = 176096. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Long ) FT_MulDiv( FT_Long a,
FT_Long b,
FT_Long c )
@@ -387,37 +254,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_MulFix */
- /* */
- /* <Description> */
- /* A very simple function used to perform the computation */
- /* `(a*b)/0x10000' with maximal accuracy. Most of the time, this is */
- /* used to multiply a given value by a 16.16 fixed float factor. */
- /* */
- /* <Input> */
- /* a :: The first multiplier. */
- /* b :: The second multiplier. Use a 16.16 factor here whenever */
- /* possible (see note below). */
- /* */
- /* <Return> */
- /* The result of `(a*b)/0x10000'. */
- /* */
- /* <Note> */
- /* The optimization for FT_MulFix() is different. We could simply be */
- /* happy by applying the same principles as with FT_MulDiv(), because */
- /* */
- /* c = 0x10000 < 176096 */
- /* */
- /* However, in most cases, we have a `b' with a value around 0x10000 */
- /* which is greater than 46340. */
- /* */
- /* According to some testing, most cases have `a' < 2048, so a good */
- /* idea is to use bounds like 2048 and 1048576 (=floor((2^31-1)/2048) */
- /* for `a' and `b', respectively. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Long ) FT_MulFix( FT_Long a,
FT_Long b )
{
@@ -452,29 +290,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_DivFix */
- /* */
- /* <Description> */
- /* A very simple function used to perform the computation */
- /* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */
- /* used to divide a given value by a 16.16 fixed float factor. */
- /* */
- /* <Input> */
- /* a :: The first multiplier. */
- /* b :: The second multiplier. Use a 16.16 factor here whenever */
- /* possible (see note below). */
- /* */
- /* <Return> */
- /* The result of `(a*0x10000)/b'. */
- /* */
- /* <Note> */
- /* The optimization for FT_DivFix() is simple: If (a << 16) fits into */
- /* 32 bits, then the division is computed directly. Otherwise, we */
- /* use a specialized version of the old FT_MulDiv64(). */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Long ) FT_DivFix( FT_Long a,
FT_Long b )
{
@@ -512,24 +329,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Add64 */
- /* */
- /* <Description> */
- /* Add two Int64 values. */
- /* */
- /* <Input> */
- /* x :: A pointer to the first value to be added. */
- /* y :: A pointer to the second value to be added. */
- /* */
- /* <Output> */
- /* z :: A pointer to the result of `x + y'. */
- /* */
- /* <Note> */
- /* Will be wrapped by the ADD_64() macro. */
- /* */
+ /* documentation is in ftcalc.h */
+
FT_EXPORT_DEF( void ) FT_Add64( FT_Int64* x,
FT_Int64* y,
FT_Int64 *z )
@@ -545,24 +346,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_MulTo64 */
- /* */
- /* <Description> */
- /* Multiplies two Int32 integers. Returns an Int64 integer. */
- /* */
- /* <Input> */
- /* x :: The first multiplier. */
- /* y :: The second multiplier. */
- /* */
- /* <Output> */
- /* z :: A pointer to the result of `x * y'. */
- /* */
- /* <Note> */
- /* Will be wrapped by the MUL_64() macro. */
- /* */
+ /* documentation is in ftcalc.h */
+
FT_EXPORT_DEF( void ) FT_MulTo64( FT_Int32 x,
FT_Int32 y,
FT_Int64 *z )
@@ -609,25 +394,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Div64by32 */
- /* */
- /* <Description> */
- /* Divides an Int64 value by an Int32 value. Returns an Int32 */
- /* integer. */
- /* */
- /* <Input> */
- /* x :: A pointer to the dividend. */
- /* y :: The divisor. */
- /* */
- /* <Return> */
- /* The result of `x / y'. */
- /* */
- /* <Note> */
- /* Will be wrapped by the DIV_64() macro. */
- /* */
+ /* documentation is in ftcalc.h */
+
FT_EXPORT_DEF( FT_Int32 ) FT_Div64by32( FT_Int64* x,
FT_Int32 y )
{
@@ -725,22 +493,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Sqrt64 */
- /* */
- /* <Description> */
- /* Computes the square root of a 64-bits value. That sounds stupid, */
- /* but it is needed to obtain maximal accuracy in the TrueType */
- /* bytecode interpreter. */
- /* */
- /* <Input> */
- /* z :: A pointer to a 64-bit integer. */
- /* */
- /* <Return> */
- /* The 32-bit square-root. */
- /* */
+ /* documentation is in ftcalc.h */
+
FT_EXPORT_DEF( FT_Int32 ) FT_Sqrt64( FT_Int64* l )
{
FT_Int64 l2;
@@ -769,7 +523,7 @@
}
- FT_EXPORT( FT_Int32 ) FT_SqrtFixed( FT_Int32 x )
+ FT_EXPORT( FT_Int32 ) FT_SqrtFixed( FT_Int32 x )
{
FT_Int64 z;
diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c
index 45f34bb..f291579 100644
--- a/src/base/ftdebug.c
+++ b/src/base/ftdebug.c
@@ -82,21 +82,6 @@
#ifdef FT_DEBUG_LEVEL_TRACE
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_SetTraceLevel */
- /* */
- /* <Description> */
- /* Sets the trace level for debugging. */
- /* */
- /* <Input> */
- /* component :: The component which should be traced. See ftdebug.h */
- /* for a complete list. If set to `trace_any', all */
- /* components will be traced. */
- /* level :: The tracing level. */
- /* */
FT_EXPORT_DEF( void ) FT_SetTraceLevel( FT_Trace component,
char level )
{
diff --git a/src/base/ftextend.c b/src/base/ftextend.c
index 5ad4574..7fd23c3 100644
--- a/src/base/ftextend.c
+++ b/src/base/ftextend.c
@@ -109,22 +109,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Register_Extension */
- /* */
- /* <Description> */
- /* Registers a new extension. */
- /* */
- /* <InOut> */
- /* driver :: A handle to the driver object. */
- /* */
- /* class :: A pointer to a class describing the extension. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftextend.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Register_Extension(
FT_Driver driver,
FT_Extension_Class* clazz )
@@ -164,26 +150,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Extension */
- /* */
- /* <Description> */
- /* Queries an extension block by an extension ID string. */
- /* */
- /* <Input> */
- /* face :: A handle to the face object. */
- /* extension_id :: An ID string identifying the extension. */
- /* */
- /* <Output> */
- /* extension_interface :: A generic pointer, usually pointing to a */
- /* table of functions implementing the */
- /* extension interface. */
- /* */
- /* <Return> */
- /* A generic pointer to the extension block. */
- /* */
+ /* documentation is in ftextend.h */
+
FT_EXPORT_DEF( void* ) FT_Get_Extension(
FT_Face face,
const char* extension_id,
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 9b362a7..8ec96a7 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -52,26 +52,8 @@
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Matrix_Multiply */
- /* */
- /* <Description> */
- /* Performs the matrix operation `b = a*b'. */
- /* */
- /* <Input> */
- /* a :: A pointer to matrix `a'. */
- /* */
- /* <InOut> */
- /* b :: A pointer to matrix `b'. */
- /* */
- /* <MT-Note> */
- /* Yes. */
- /* */
- /* <Note> */
- /* The result is undefined if either `a' or `b' is zero. */
- /* */
+ /* documentation is in ftglyph.h */
+
FT_EXPORT_DEF( void ) FT_Matrix_Multiply( FT_Matrix* a,
FT_Matrix* b )
{
@@ -91,24 +73,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Matrix_Invert */
- /* */
- /* <Description> */
- /* Inverts a 2x2 matrix. Returns an error if it can't be inverted. */
- /* */
- /* <InOut> */
- /* matrix :: A pointer to the target matrix. Remains untouched in */
- /* case of error. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <MT-Note> */
- /* Yes. */
- /* */
+ /* documentation is in ftglyph.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Matrix_Invert( FT_Matrix* matrix )
{
FT_Pos delta, xx, yy;
@@ -405,24 +371,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Glyph_Copy */
- /* */
- /* <Description> */
- /* A function used to copy a glyph image. */
- /* */
- /* <Input> */
- /* source :: A handle to the source glyph object. */
- /* */
- /* <Output> */
- /* target :: A handle to the target glyph object. 0 in case of */
- /* error. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftglyph.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Glyph_Copy( FT_Glyph source,
FT_Glyph *target )
{
@@ -458,23 +408,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Glyph */
- /* */
- /* <Description> */
- /* A function used to extract a glyph image from a slot. */
- /* */
- /* <Input> */
- /* slot :: A handle to the source glyph slot. */
- /* */
- /* <Output> */
- /* aglyph :: A handle to the glyph object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftglyph.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Get_Glyph( FT_GlyphSlot slot,
FT_Glyph *aglyph )
{
@@ -538,30 +473,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Glyph_Transform */
- /* */
- /* <Description> */
- /* Transforms a glyph image if its format is scalable. */
- /* */
- /* <Input> */
- /* glyph :: A handle to the target glyph object. */
- /* */
- /* matrix :: A pointer to a 2x2 matrix to apply. */
- /* */
- /* delta :: A pointer to a 2d vector to apply. Coordinates are */
- /* expressed in 1/64th of a pixel. */
- /* */
- /* <Return> */
- /* FreeType error code (the glyph format is not scalable if it is */
- /* not zero). */
- /* */
- /* <Note> */
- /* The 2x2 transformation matrix is also applied to the glyph's */
- /* advance vector. */
- /* */
+ /* documentation is in ftglyph.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Glyph_Transform( FT_Glyph glyph,
FT_Matrix* matrix,
FT_Vector* delta )
@@ -591,59 +504,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Glyph_Get_CBox */
- /* */
- /* <Description> */
- /* Returns the glyph image's bounding box. */
- /* */
- /* <Input> */
- /* glyph :: A handle to the source glyph object. */
- /* */
- /* mode :: The mode which indicates how to interpret the returned */
- /* bounding box values. */
- /* */
- /* <Output> */
- /* box :: The glyph bounding box. Coordinates are expressed in */
- /* 1/64th of pixels if it is grid-fitted. */
- /* */
- /* <Note> */
- /* Coordinates are relative to the glyph origin, using the Y-upwards */
- /* convention. */
- /* */
- /* If the glyph has been loaded with FT_LOAD_NO_SCALE, `bbox_mode' */
- /* must be set to `ft_glyph_bbox_unscaled' to get unscaled font */
- /* units. */
- /* */
- /* If `bbox_mode' is set to `ft_glyph_bbox_subpixels' the bbox */
- /* coordinates are returned in 26.6 pixels (i.e. 1/64th of pixels). */
- /* */
- /* Note that the maximum coordinates are exclusive, which means that */
- /* one can compute the width and height of the glyph image (be it in */
- /* integer or 26.6 pixels) as: */
- /* */
- /* width = bbox.xMax - bbox.xMin; */
- /* height = bbox.yMax - bbox.yMin; */
- /* */
- /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */
- /* `ft_glyph_bbox_gridfit', the coordinates will also be grid-fitted, */
- /* which corresponds to: */
- /* */
- /* bbox.xMin = FLOOR(bbox.xMin); */
- /* bbox.yMin = FLOOR(bbox.yMin); */
- /* bbox.xMax = CEILING(bbox.xMax); */
- /* bbox.yMax = CEILING(bbox.yMax); */
- /* */
- /* To get the bbox in pixel coordinates, set `bbox_mode' to */
- /* `ft_glyph_bbox_truncate'. */
- /* */
- /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */
- /* to `ft_glyph_bbox_pixels'. */
- /* */
- /* The default value for `bbox_mode' is `ft_glyph_bbox_pixels'. */
- /* */
+ /* documentation is in ftglyph.h */
+
FT_EXPORT_DEF( void ) FT_Glyph_Get_CBox( FT_Glyph glyph,
FT_UInt bbox_mode,
FT_BBox *acbox )
@@ -687,77 +549,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Glyph_To_Bitmap */
- /* */
- /* <Description> */
- /* Converts a given glyph object to a bitmap glyph object. */
- /* */
- /* <InOut> */
- /* glyph :: A pointer to a handle to the target glyph. */
- /* */
- /* <Input> */
- /* render_mode :: A set of bit flags that describe how the data is */
- /* */
- /* */
- /* origin :: A pointer to a vector used to translate the glyph */
- /* image before rendering. Can be 0 (if no */
- /* translation). The origin is expressed in */
- /* 26.6 pixels. */
- /* */
- /* destroy :: A boolean that indicates that the original glyph */
- /* image should be destroyed by this function. It is */
- /* never destroyed in case of error. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The glyph image is translated with the `origin' vector before */
- /* rendering. In case of error, it it translated back to its */
- /* original position and the glyph is left untouched. */
- /* */
- /* The first parameter is a pointer to a FT_Glyph handle, that will */
- /* be replaced by this function. Typically, you would use (omitting */
- /* error handling): */
- /* */
- /* */
- /* { */
- /* FT_Glyph glyph; */
- /* FT_BitmapGlyph glyph_bitmap; */
- /* */
- /* */
- /* // load glyph */
- /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */
- /* */
- /* // extract glyph image */
- /* error = FT_Get_Glyph( face->glyph, &glyph ); */
- /* */
- /* // convert to a bitmap (default render mode + destroy old) */
- /* if ( glyph->format != ft_glyph_format_bitmap ) */
- /* { */
- /* error = FT_Glyph_To_Bitmap( &glyph, ft_render_mode_default, */
- /* 0, 1 ); */
- /* if ( error ) // glyph unchanged */
- /* ... */
- /* } */
- /* */
- /* // access bitmap content by typecasting */
- /* glyph_bitmap = (FT_BitmapGlyph)glyph; */
- /* */
- /* // do funny stuff with it, like blitting/drawing */
- /* ... */
- /* */
- /* // discard glyph image (bitmap or not) */
- /* FT_Done_Glyph( glyph ); */
- /* } */
- /* */
- /* */
- /* This function will always fail if the glyph's format isn't */
- /* scalable. */
- /* */
+ /* documentation is in ftglyph.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
FT_ULong render_mode,
FT_Vector* origin,
@@ -844,17 +637,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Done_Glyph */
- /* */
- /* <Description> */
- /* Destroys a given glyph. */
- /* */
- /* <Input> */
- /* glyph :: A handle to the target glyph object. */
- /* */
+ /* documentation is in ftglyph.h */
+
FT_EXPORT_DEF( void ) FT_Done_Glyph( FT_Glyph glyph )
{
if ( glyph )
diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index 87c5b3d..79f751c 100644
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -72,19 +72,8 @@ const FT_Module_Class* const ft_default_modules[] =
};
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Add_Default_Modules */
- /* */
- /* <Description> */
- /* Adds the set of default drivers to a given library object. */
- /* This is only useful when you create a library object with */
- /* FT_New_Library() (usually to plug a custom memory manager). */
- /* */
- /* <InOut> */
- /* library :: A handle to a new library object. */
- /* */
+ /* documentation is in ftmodule.h */
+
FT_EXPORT_DEF( void ) FT_Add_Default_Modules( FT_Library library )
{
FT_Error error;
@@ -108,21 +97,8 @@ const FT_Module_Class* const ft_default_modules[] =
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Init_FreeType */
- /* */
- /* <Description> */
- /* Initializes a new FreeType library object. The set of drivers */
- /* that are registered by this function is determined at build time. */
- /* */
- /* <Output> */
- /* library :: A handle to a new library object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Init_FreeType( FT_Library *alibrary )
{
FT_Error error;
@@ -150,21 +126,8 @@ const FT_Module_Class* const ft_default_modules[] =
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Done_FreeType */
- /* */
- /* <Description> */
- /* Destroys a given FreeType library object and all of its childs, */
- /* including resources, drivers, faces, sizes, etc. */
- /* */
- /* <Input> */
- /* library :: A handle to the target library object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Done_FreeType( FT_Library library )
{
if ( library )
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index ff7eb59..6feaa31 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -614,36 +614,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_New_Face_From_FOND */
- /* */
- /* <Description> */
- /* Creates a new face object from an FOND resource. */
- /* */
- /* <InOut> */
- /* library :: A handle to the library resource. */
- /* */
- /* <Input> */
- /* fond :: An FOND resource. */
- /* */
- /* face_index :: Only supported for the -1 `sanity check' special */
- /* case. */
- /* */
- /* <Output> */
- /* aface :: A handle to a new face object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Notes> */
- /* This function can be used to create FT_Face objects from fonts */
- /* that are installed in the system like so: */
- /* */
- /* fond = GetResource( 'FOND', fontName ); */
- /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */
- /* */
+ /* documentation in ftmac.h */
+
FT_EXPORT_DEF( FT_Error ) FT_New_Face_From_FOND( FT_Library library,
Handle fond,
FT_Long face_index,
@@ -698,7 +670,7 @@
/* This is the Mac-specific implementation of FT_New_Face. In */
/* addition to the standard FT_New_Face() functionality, it also */
/* accepts pathnames to Mac suitcase files. For further */
- /* documentation see the original FT_New_Face() in ftobjs.c. */
+ /* documentation see the original FT_New_Face() in freetype.h. */
/* */
FT_EXPORT_DEF( FT_Error ) FT_New_Face( FT_Library library,
const char* pathname,
diff --git a/src/base/ftmm.c b/src/base/ftmm.c
index c32c9f6..d6c0605 100644
--- a/src/base/ftmm.c
+++ b/src/base/ftmm.c
@@ -30,23 +30,8 @@
#define FT_COMPONENT trace_mm
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Multi_Master */
- /* */
- /* <Description> */
- /* Retrieves the Multiple Master descriptor of a given font. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face. */
- /* */
- /* <Output> */
- /* master :: The Multiple Masters descriptor. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftmm.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Get_Multi_Master( FT_Face face,
FT_Multi_Master *amaster )
{
@@ -74,26 +59,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_MM_Design_Coordinates */
- /* */
- /* <Description> */
- /* For Multiple Masters fonts, choose an interpolated font design */
- /* through design coordinates. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face. */
- /* */
- /* num_coords :: The number of design coordinates (must be equal to */
- /* the number of axes in the font). */
- /* */
- /* coords :: The design coordinates. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftmm.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Set_MM_Design_Coordinates(
FT_Face face,
FT_UInt num_coords,
@@ -123,27 +90,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_MM_Blend_Coordinates */
- /* */
- /* <Description> */
- /* For Multiple Masters fonts, choose an interpolated font design */
- /* through normalized blend coordinates. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face. */
- /* */
- /* num_coords :: The number of design coordinates (must be equal to */
- /* the number of axes in the font). */
- /* */
- /* coords :: The design coordinates (each one must be between 0 */
- /* and 1.0). */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftmm.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Set_MM_Blend_Coordinates(
FT_Face face,
FT_UInt num_coords,
diff --git a/src/base/ftnames.c b/src/base/ftnames.c
index 03caf39..f5cb8d9 100644
--- a/src/base/ftnames.c
+++ b/src/base/ftnames.c
@@ -26,53 +26,16 @@
#ifdef TT_CONFIG_OPTION_SFNT_NAMES
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Sfnt_Name_Count */
- /* */
- /* <Description> */
- /* Retrieves the number of name strings in the SFNT `name' table. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face. */
- /* */
- /* <Return> */
- /* The number of strings in the `name' table. */
- /* */
+ /* documentation is in ftnames.h */
+
FT_EXPORT_DEF( FT_UInt ) FT_Get_Sfnt_Name_Count( FT_Face face )
{
return face && ( FT_IS_SFNT( face ) ? ((TT_Face)face)->num_names : 0 );
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Sfnt_Name */
- /* */
- /* <Description> */
- /* Retrieves a string of the SFNT `name' table for a given index. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face. */
- /* */
- /* index :: The index of the `name' string. */
- /* */
- /* <Output> */
- /* aname :: The indexed FT_SfntName structure. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The `string' array returned in the `aname' structure is not */
- /* null-terminated. */
- /* */
- /* Use FT_Get_Sfnt_Name_Count() to get the total number of available */
- /* `name' table entries, then do a loop until you get the right */
- /* platform, encoding, and name ID. */
- /* */
+ /* documentation is in ftnames.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Get_Sfnt_Name( FT_Face face,
FT_UInt index,
FT_SfntName *aname )
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index b4018a9..0d55ec9 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -283,17 +283,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Done_Stream */
- /* */
- /* <Description> */
- /* Closes and destroys a stream object. */
- /* */
- /* <Input> */
- /* stream :: The stream to be closed and destroyed. */
- /* */
+ /* documentation is in ftobjs.h */
+
FT_EXPORT_DEF( void ) FT_Done_Stream( FT_Stream stream )
{
if ( stream && stream->close )
@@ -857,31 +848,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_Transform */
- /* */
- /* <Description> */
- /* A function used to set the transformation that is applied to glyph */
- /* images just before they are converted to bitmaps in a glyph slot */
- /* when FT_Render_Glyph() is called. */
- /* */
- /* <InOut> */
- /* face :: A handle to the source face object. */
- /* */
- /* <Input> */
- /* matrix :: A pointer to the transformation's 2x2 matrix. Use 0 for */
- /* the identity matrix. */
- /* delta :: A pointer to the translation vector. Use 0 for the null */
- /* vector. */
- /* */
- /* <Note> */
- /* The transformation is only applied to scalable image formats after */
- /* the glyph has been loaded. It means that hinting is unaltered by */
- /* the transformation and is performed on the character size given in */
- /* the last call to FT_Set_Char_Sizes() or FT_Set_Pixel_Sizes(). */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( void ) FT_Set_Transform( FT_Face face,
FT_Matrix* matrix,
FT_Vector* delta )
@@ -931,39 +899,8 @@
static FT_Renderer ft_lookup_glyph_renderer( FT_GlyphSlot slot );
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Load_Glyph */
- /* */
- /* <Description> */
- /* A function used to load a single glyph within a given glyph slot, */
- /* for a given size. */
- /* */
- /* <Input> */
- /* face :: A handle to the target face object where the glyph */
- /* will be loaded. */
- /* */
- /* glyph_index :: The index of the glyph in the font file. */
- /* */
- /* load_flags :: A flag indicating what to load for this glyph. The */
- /* FT_LOAD_XXX constants can be used to control the */
- /* glyph loading process (e.g., whether the outline */
- /* should be scaled, whether to load bitmaps or not, */
- /* whether to hint the outline, etc). */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* If the glyph image is not a bitmap, and if the bit flag */
- /* FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image will be */
- /* transformed with the information passed to a previous call to */
- /* FT_Set_Transform. */
- /* */
- /* Note that this also transforms the `face.glyph.advance' field, but */
- /* *not* the values in `face.glyph.metrics'. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Load_Glyph( FT_Face face,
FT_UInt glyph_index,
FT_Int load_flags )
@@ -1096,44 +1033,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Load_Char */
- /* */
- /* <Description> */
- /* A function used to load a single glyph within a given glyph slot, */
- /* for a given size, according to its character code. */
- /* */
- /* <Input> */
- /* face :: A handle to a target face object where the glyph */
- /* will be loaded. */
- /* */
- /* char_code :: The glyph's character code, according to the */
- /* current charmap used in the face. */
- /* */
- /* load_flags :: A flag indicating what to load for this glyph. The */
- /* FT_LOAD_XXX constants can be used to control the */
- /* glyph loading process (e.g., whether the outline */
- /* should be scaled, whether to load bitmaps or not, */
- /* whether to hint the outline, etc). */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* If the face has no current charmap, or if the character code */
- /* is not defined in the charmap, this function will return an */
- /* error. */
- /* */
- /* If the glyph image is not a bitmap, and if the bit flag */
- /* FT_LOAD_IGNORE_TRANSFORM is unset, the glyph image will be */
- /* transformed with the information passed to a previous call to */
- /* FT_Set_Transform(). */
- /* */
- /* Note that this also transforms the `face.glyph.advance' field, but */
- /* *not* the values in `face.glyph.metrics'. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Load_Char( FT_Face face,
FT_ULong char_code,
FT_Int load_flags )
@@ -1296,44 +1197,8 @@
#ifndef macintosh
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_New_Face */
- /* */
- /* <Description> */
- /* Creates a new face object from a given resource and typeface index */
- /* using a pathname to the font file. */
- /* */
- /* <InOut> */
- /* library :: A handle to the library resource. */
- /* */
- /* <Input> */
- /* pathname :: A path to the font file. */
- /* */
- /* face_index :: The index of the face within the resource. The */
- /* first face has index 0. */
- /* <Output> */
- /* aface :: A handle to a new face object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* Unlike FreeType 1.x, this function automatically creates a glyph */
- /* slot for the face object which can be accessed directly through */
- /* `face->glyph'. */
- /* */
- /* Note that additional slots can be added to each face with the */
- /* FT_New_GlyphSlot() API function. Slots are linked in a single */
- /* list through their `next' field. */
- /* */
- /* FT_New_Face() can be used to determine and/or check the font */
- /* format of a given font resource. If the `face_index' field is */
- /* negative, the function will _not_ return any face handle in */
- /* `*face'. Its return value should be 0 if the resource is */
- /* recognized, or non-zero if not. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_New_Face( FT_Library library,
const char* pathname,
FT_Long face_index,
@@ -1355,46 +1220,8 @@
#endif /* !macintosh */
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_New_Memory_Face */
- /* */
- /* <Description> */
- /* Creates a new face object from a given resource and typeface index */
- /* using a font file already loaded into memory. */
- /* */
- /* <InOut> */
- /* library :: A handle to the library resource. */
- /* */
- /* <Input> */
- /* file_base :: A pointer to the beginning of the font data. */
- /* */
- /* file_size :: The size of the memory chunk used by the font data. */
- /* */
- /* face_index :: The index of the face within the resource. The */
- /* first face has index 0. */
- /* <Output> */
- /* face :: A handle to a new face object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* Unlike FreeType 1.x, this function automatically creates a glyph */
- /* slot for the face object which can be accessed directly through */
- /* `face->glyph'. */
- /* */
- /* Note that additional slots can be added to each face with the */
- /* FT_New_GlyphSlot() API function. Slots are linked in a single */
- /* list through their `next' field. */
- /* */
- /* FT_New_Memory_Face() can be used to determine and/or check the */
- /* font format of a given font resource. If the `face_index' field */
- /* is negative, the function will _not_ return any face handle in */
- /* `*face'. Its return value should be 0 if the resource is */
- /* recognized, or non-zero if not. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_New_Memory_Face( FT_Library library,
FT_Byte* file_base,
FT_Long file_size,
@@ -1416,46 +1243,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Open_Face */
- /* */
- /* <Description> */
- /* Opens a face object from a given resource and typeface index using */
- /* an `FT_Open_Args' structure. If the face object doesn't exist, it */
- /* will be created. */
- /* */
- /* <InOut> */
- /* library :: A handle to the library resource. */
- /* */
- /* <Input> */
- /* args :: A pointer to an `FT_Open_Args' structure which must */
- /* be filled by the caller. */
- /* */
- /* face_index :: The index of the face within the resource. The */
- /* first face has index 0. */
- /* <Output> */
- /* aface :: A handle to a new face object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* Unlike FreeType 1.x, this function automatically creates a glyph */
- /* slot for the face object which can be accessed directly through */
- /* `face->glyph'. */
- /* */
- /* Note that additional slots can be added to each face with the */
- /* FT_New_GlyphSlot() API function. Slots are linked in a single */
- /* list through their `next' field. */
- /* */
- /* FT_Open_Face() can be used to determine and/or check the font */
- /* format of a given font resource. If the `face_index' field is */
- /* negative, the function will _not_ return any face handle in */
- /* `*face'. Its return value should be 0 if the resource is */
- /* recognized, or non-zero if not. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Open_Face( FT_Library library,
FT_Open_Args* args,
FT_Long face_index,
@@ -1629,38 +1418,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Attach_File */
- /* */
- /* <Description> */
- /* `Attaches' a given font file to an existing face. This is usually */
- /* to read additional information for a single face object. For */
- /* example, it is used to read the AFM files that come with Type 1 */
- /* fonts in order to add kerning data and other metrics. */
- /* */
- /* <InOut> */
- /* face :: The target face object. */
- /* */
- /* <Input> */
- /* filepathname :: An 8-bit pathname naming the `metrics' file. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* If your font file is in memory, or if you want to provide your */
- /* own input stream object, use FT_Attach_Stream(). */
- /* */
- /* The meaning of the `attach' action (i.e., what really happens when */
- /* the new file is read) is not fixed by FreeType itself. It really */
- /* depends on the font format (and thus the font driver). */
- /* */
- /* Client applications are expected to know what they are doing */
- /* when invoking this function. Most drivers simply do not implement */
- /* file attachments. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Attach_File( FT_Face face,
const char* filepathname )
{
@@ -1679,32 +1438,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Attach_Stream */
- /* */
- /* <Description> */
- /* This function is similar to FT_Attach_File() with the exception */
- /* that it reads the attachment from an arbitrary stream. */
- /* */
- /* <Input> */
- /* face :: The target face object. */
- /* */
- /* parameters :: A pointer to an FT_Open_Args structure used to */
- /* describe the input stream to FreeType. */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The meaning of the `attach' (i.e. what really happens when the */
- /* new file is read) is not fixed by FreeType itself. It really */
- /* depends on the font format (and thus the font driver). */
- /* */
- /* Client applications are expected to know what they are doing */
- /* when invoking this function. Most drivers simply do not implement */
- /* file attachments. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Attach_Stream( FT_Face face,
FT_Open_Args* parameters )
{
@@ -1746,21 +1481,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Done_Face */
- /* */
- /* <Description> */
- /* Discards a given face object, as well as all of its child slots */
- /* and sizes. */
- /* */
- /* <Input> */
- /* face :: A handle to a target face object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Done_Face( FT_Face face )
{
FT_Error error;
@@ -1792,23 +1514,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_New_Size */
- /* */
- /* <Description> */
- /* Creates a new size object from a given face object. */
- /* */
- /* <Input> */
- /* face :: A handle to a parent face object. */
- /* */
- /* <Output> */
- /* asize :: A handle to a new size object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftobjs.h */
+
FT_EXPORT_DEF( FT_Error ) FT_New_Size( FT_Face face,
FT_Size *asize )
{
@@ -1868,20 +1575,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Done_Size */
- /* */
- /* <Description> */
- /* Discards a given size object. */
- /* */
- /* <Input> */
- /* size :: A handle to a target size object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftobjs.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Done_Size( FT_Size size )
{
FT_Error error;
@@ -1947,40 +1642,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_Char_Size */
- /* */
- /* <Description> */
- /* Sets the character dimensions of a given face object. The */
- /* `char_width' and `char_height' values are used for the width and */
- /* height, respectively, expressed in 26.6 fractional points. */
- /* */
- /* If the horizontal or vertical resolution values are zero, a */
- /* default value of 72dpi is used. Similarly, if one of the */
- /* character dimensions is zero, its value is set equal to the other. */
- /* */
- /* <InOut> */
- /* size :: A handle to a target size object. */
- /* */
- /* <Input> */
- /* char_width :: The character width, in 26.6 fractional points. */
- /* */
- /* char_height :: The character height, in 26.6 fractional */
- /* points. */
- /* */
- /* horz_resolution :: The horizontal resolution. */
- /* */
- /* vert_resolution :: The vertical resolution. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* When dealing with fixed-size faces (i.e., non-scalable formats), */
- /* use the function FT_Set_Pixel_Sizes(). */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Set_Char_Size( FT_Face face,
FT_F26Dot6 char_width,
FT_F26Dot6 char_height,
@@ -2051,44 +1714,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_Pixel_Sizes */
- /* */
- /* <Description> */
- /* Sets the character dimensions of a given face object. The width */
- /* and height are expressed in integer pixels. */
- /* */
- /* If one of the character dimensions is zero, its value is set equal */
- /* to the other. */
- /* */
- /* <InOut> */
- /* face :: A handle to the target face object. */
- /* */
- /* <Input> */
- /* pixel_width :: The character width, in integer pixels. */
- /* */
- /* pixel_height :: The character height, in integer pixels. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The values of `pixel_width' and `pixel_height' correspond to the */
- /* pixel values of the _typographic_ character size, which are NOT */
- /* necessarily the same as the dimensions of the glyph `bitmap */
- /* cells". */
- /* */
- /* The `character size' is really the size of an abstract square */
- /* called the `EM', used to design the font. However, depending */
- /* on the font design, glyphs will be smaller or greater than the */
- /* EM. */
- /* */
- /* This means that setting the pixel size to, say, 8x8 doesn't */
- /* guarantee in any way that you will get glyph bitmaps that all fit */
- /* within an 8x8 cell (sometimes even far from it). */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Set_Pixel_Sizes( FT_Face face,
FT_UInt pixel_width,
FT_UInt pixel_height )
@@ -2141,39 +1768,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Kerning */
- /* */
- /* <Description> */
- /* Returns the kerning vector between two glyphs of a same face. */
- /* */
- /* <Input> */
- /* face :: A handle to a source face object. */
- /* */
- /* left_glyph :: The index of the left glyph in the kern pair. */
- /* */
- /* right_glyph :: The index of the right glyph in the kern pair. */
- /* */
- /* kern_mode :: See FT_Kerning_Mode() for more information. */
- /* Determines the scale/dimension of the returned */
- /* kerning vector. */
- /* */
- /* <Output> */
- /* kerning :: The kerning vector. This is in font units for */
- /* scalable formats, and in pixels for fixed-sizes */
- /* formats. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* Only horizontal layouts (left-to-right & right-to-left) are */
- /* supported by this method. Other layouts, or more sophisticated */
- /* kernings, are out of the scope of this API function -- they can be */
- /* implemented through format-specific interfaces. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Get_Kerning( FT_Face face,
FT_UInt left_glyph,
FT_UInt right_glyph,
@@ -2223,27 +1819,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Select_Charmap */
- /* */
- /* <Description> */
- /* Selects a given charmap by its encoding tag (as listed in */
- /* `freetype.h'). */
- /* */
- /* <Input> */
- /* face :: A handle to the source face object. */
- /* */
- /* encoding :: A handle to the selected charmap. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* This function will return an error if no charmap in the face */
- /* corresponds to the encoding queried here. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Select_Charmap( FT_Face face,
FT_Encoding encoding )
{
@@ -2273,27 +1850,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_Charmap */
- /* */
- /* <Description> */
- /* Selects a given charmap for character code to glyph index */
- /* decoding. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face object. */
- /* charmap :: A handle to the selected charmap. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* This function will return an error if the charmap is not part of */
- /* the face (i.e., if it is not listed in the face->charmaps[] */
- /* table). */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Set_Charmap( FT_Face face,
FT_CharMap charmap )
{
@@ -2322,23 +1880,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Char_Index */
- /* */
- /* <Description> */
- /* Returns the glyph index of a given character code. This function */
- /* uses a charmap object to do the translation. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face object. */
- /* */
- /* charcode :: The character code. */
- /* */
- /* <Return> */
- /* The glyph index. 0 means `undefined character code'. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_UInt ) FT_Get_Char_Index( FT_Face face,
FT_ULong charcode )
{
@@ -2356,41 +1899,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Glyph_Name */
- /* */
- /* <Description> */
- /* Retrieves the ASCII name of a given glyph in a face. This only */
- /* works for those faces where FT_HAS_GLYPH_NAME(face) returns true. */
- /* */
- /* <Input> */
- /* face :: A handle to a source face object. */
- /* */
- /* glyph_index :: The glyph index. */
- /* */
- /* buffer :: A pointer to a target buffer where the name will be */
- /* copied to. */
- /* */
- /* buffer_max :: The maximal number of bytes available in the */
- /* buffer. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* An error is returned if the face doesn't provide glyph names or if */
- /* the glyph index is invalid. In all cases of failure, the first */
- /* byte of `buffer' will be set to 0 to indicate an empty name. */
- /* */
- /* The glyph name is truncated to fit within the buffer if it is too */
- /* long. The returned string is always zero-terminated. */
- /* */
- /* This function is not compiled within the library if the config */
- /* macro FT_CONFIG_OPTION_NO_GLYPH_NAMES is defined in */
- /* `include/freetype/config/ftoptions.h' */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Get_Glyph_Name( FT_Face face,
FT_UInt glyph_index,
FT_Pointer buffer,
@@ -2428,32 +1938,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Sfnt_Table */
- /* */
- /* <Description> */
- /* Returns a pointer to a given SFNT table within a face. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face object. */
- /* tag :: An index of an SFNT table. */
- /* */
- /* <Return> */
- /* A type-less pointer to the table. This will be 0 in case of */
- /* error, or if the corresponding table was not found *OR* loaded */
- /* from the file. */
- /* */
- /* <Note> */
- /* The table is owned by the face object, and disappears with it. */
- /* */
- /* This function is only useful to access SFNT tables that are loaded */
- /* by the sfnt/truetype/opentype drivers. See the FT_Sfnt_Tag */
- /* enumeration in `tttables.h' for a list. */
- /* */
- /* You can load any table with a different function.. XXX */
- /* */
+ /* documentation is in tttables.h */
+
FT_EXPORT_DEF( void* ) FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag )
{
@@ -2631,29 +2117,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Renderer */
- /* */
- /* <Description> */
- /* Retrieves the current renderer for a given glyph format. */
- /* */
- /* <Input> */
- /* library :: A handle to the library object. */
- /* */
- /* format :: The glyph format. */
- /* */
- /* <Return> */
- /* A renderer handle. 0 if none found. */
- /* */
- /* <Note> */
- /* An error will be returned if a module already exists by that name, */
- /* or if the module requires a version of FreeType that is too great. */
- /* */
- /* To add a new renderer, simply use FT_Add_Module(). To retrieve a */
- /* renderer by its name, use FT_Get_Module(). */
- /* */
+ /* documentation is in ftrender.h */
+
FT_EXPORT_DEF( FT_Renderer ) FT_Get_Renderer( FT_Library library,
FT_Glyph_Format format )
{
@@ -2663,32 +2128,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_Renderer */
- /* */
- /* <Description> */
- /* Sets the current renderer to use, and set additional mode. */
- /* */
- /* <Input> */
- /* library :: A handle to the library object. */
- /* */
- /* renderer :: A handle to the renderer object. */
- /* */
- /* num_params :: The number of additional parameters. */
- /* */
- /* parameters :: Additional parameters. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* In case of success, the renderer will be used to convert glyph */
- /* images in the renderer's known format into bitmaps. */
- /* */
- /* This doesn't change the current renderer for other formats. */
- /* */
+ /* documentation is in ftrender.h */
+
FT_EXPORT( FT_Error ) FT_Set_Renderer( FT_Library library,
FT_Renderer renderer,
FT_UInt num_params,
@@ -2792,27 +2233,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Render_Glyph */
- /* */
- /* <Description> */
- /* Converts a given glyph image to a bitmap. It does so by */
- /* inspecting the glyph image format, find the relevant renderer, and */
- /* invoke it. */
- /* */
- /* <Input> */
- /* slot :: A handle to the glyph slot containing the image to */
- /* convert. */
- /* */
- /* render_mode :: This is the render mode used to render the glyph */
- /* image into a bitmap. See FT_Render_Mode for a list */
- /* of possible values. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Render_Glyph( FT_GlyphSlot slot,
FT_UInt render_mode )
{
@@ -2888,26 +2310,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Add_Module */
- /* */
- /* <Description> */
- /* Adds a new module to a given library instance. */
- /* */
- /* <Input> */
- /* library :: A handle to the library object. */
- /* */
- /* clazz :: A pointer to class descriptor for the module. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* An error will be returned if a module already exists by that name, */
- /* or if the module requires a version of FreeType that is too great. */
- /* */
+ /* documentation is in ftmodule.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Add_Module( FT_Library library,
const FT_Module_Class* clazz )
{
@@ -3032,26 +2436,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Get_Module */
- /* */
- /* <Description> */
- /* Finds a module by its name. */
- /* */
- /* <Input> */
- /* library :: A handle to the library object. */
- /* */
- /* module_name :: The module's name (as an ASCII string). */
- /* */
- /* <Return> */
- /* A module handle. 0 if none was found. */
- /* */
- /* <Note> */
- /* You should better be familiar with FreeType internals to know */
- /* which module to look for :-) */
- /* */
+ /* documentation is in ftmodule.h */
+
FT_EXPORT_DEF( FT_Module ) FT_Get_Module( FT_Library library,
const char* module_name )
{
@@ -3112,25 +2498,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Remove_Module */
- /* */
- /* <Description> */
- /* Removes a given module from a library instance. */
- /* */
- /* <Input> */
- /* library :: A handle to a library object. */
- /* */
- /* module :: A handle to a module object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The module object is destroyed by the function in case of success. */
- /* */
+ /* documentation is in ftmodule.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Remove_Module( FT_Library library,
FT_Module module )
{
@@ -3183,25 +2552,8 @@
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_New_Library */
- /* */
- /* <Description> */
- /* This function is used to create a new FreeType library instance */
- /* from a given memory object. It is thus possible to use libraries */
- /* with distinct memory allocators within the same program. */
- /* */
- /* <Input> */
- /* memory :: A handle to the original memory object. */
- /* */
- /* <Output> */
- /* alibrary :: A pointer to handle of a new library object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftmodule.h */
+
FT_EXPORT_DEF( FT_Error ) FT_New_Library( FT_Memory memory,
FT_Library *alibrary )
{
@@ -3234,21 +2586,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Done_Library */
- /* */
- /* <Description> */
- /* Discards a given library object. This closes all drivers and */
- /* discards all resource objects. */
- /* */
- /* <Input> */
- /* library :: A handle to the target library. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftmodule.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Done_Library( FT_Library library )
{
FT_Memory memory;
@@ -3286,28 +2625,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Set_Debug_Hook */
- /* */
- /* <Description> */
- /* Sets a debug hook function for debugging the interpreter of a font */
- /* format. */
- /* */
- /* <Input> */
- /* library :: A handle to the library object. */
- /* */
- /* hook_index :: The index of the debug hook. You should use the */
- /* values defined in ftobjs.h, e.g. */
- /* FT_DEBUG_HOOK_TRUETYPE */
- /* */
- /* debug_hook :: The function used to debug the interpreter. */
- /* */
- /* <Note> */
- /* Currently, four debug hook slots are available, but only two (for */
- /* the TrueType and the Type 1 interpreter) are defined. */
- /* */
+ /* documentation is in ftmodule.h */
+
FT_EXPORT_DEF( void ) FT_Set_Debug_Hook( FT_Library library,
FT_UInt hook_index,
FT_DebugHook_Func debug_hook )
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 440530a..fdd0098 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -41,30 +41,8 @@
const FT_Outline null_outline = { 0, 0, 0, 0, 0, 0 };
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Decompose */
- /* */
- /* <Description> */
- /* Walks over an outline's structure to decompose it into individual */
- /* segments and Bezier arcs. This function is also able to emit */
- /* `move to' and `close to' operations to indicate the start and end */
- /* of new contours in the outline. */
- /* */
- /* <Input> */
- /* outline :: A pointer to the source target. */
- /* */
- /* interface :: A table of `emitters', i.e,. function pointers called */
- /* during decomposition to indicate path operations. */
- /* */
- /* user :: A typeless pointer which is passed to each emitter */
- /* during the decomposition. It can be used to store */
- /* the state during the decomposition. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means sucess. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Outline_Decompose(
FT_Outline* outline,
const FT_Outline_Funcs* interface,
@@ -303,38 +281,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_New */
- /* */
- /* <Description> */
- /* Creates a new outline of a given size. */
- /* */
- /* <Input> */
- /* library :: A handle to the library object from where the */
- /* outline is allocated. Note however that the new */
- /* outline will NOT necessarily be FREED, when */
- /* destroying the library, by FT_Done_FreeType(). */
- /* */
- /* numPoints :: The maximal number of points within the outline. */
- /* */
- /* numContours :: The maximal number of contours within the outline. */
- /* */
- /* <Output> */
- /* outline :: A handle to the new outline. NULL in case of */
- /* error. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <MT-Note> */
- /* No. */
- /* */
- /* <Note> */
- /* The reason why this function takes a `library' parameter is simply */
- /* to use the library's memory allocator. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Outline_New( FT_Library library,
FT_UInt numPoints,
FT_Int numContours,
@@ -348,25 +296,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Copy */
- /* */
- /* <Description> */
- /* Copies an outline into another one. Both objects must have the */
- /* same sizes (number of points & number of contours) when this */
- /* function is called. */
- /* */
- /* <Input> */
- /* source :: A handle to the source outline. */
- /* */
- /* <Output> */
- /* target :: A handle to the target outline. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Outline_Copy( FT_Outline* source,
FT_Outline *target )
{
@@ -418,33 +349,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Done */
- /* */
- /* <Description> */
- /* Destroys an outline created with FT_Outline_New(). */
- /* */
- /* <Input> */
- /* library :: A handle of the library object used to allocate the */
- /* outline. */
- /* */
- /* outline :: A pointer to the outline object to be discarded. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <MT-Note> */
- /* No. */
- /* */
- /* <Note> */
- /* If the outline's `owner' field is not set, only the outline */
- /* descriptor will be released. */
- /* */
- /* The reason why this function takes an `outline' parameter is */
- /* simply to use FT_Free(). */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Outline_Done( FT_Library library,
FT_Outline* outline )
{
@@ -457,32 +363,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Get_CBox */
- /* */
- /* <Description> */
- /* Returns an outline's `control box'. The control box encloses all */
- /* the outline's points, including Bezier control points. Though it */
- /* coincides with the exact bounding box for most glyphs, it can be */
- /* slightly larger in some situations (like when rotating an outline */
- /* which contains Bezier outside arcs). */
- /* */
- /* Computing the control box is very fast, while getting the bounding */
- /* box can take much more time as it needs to walk over all segments */
- /* and arcs in the outline. To get the latter, you can use the */
- /* `ftbbox' component which is dedicated to this single task. */
- /* */
- /* <Input> */
- /* outline :: A pointer to the source outline descriptor. */
- /* */
- /* <Output> */
- /* cbox :: The outline's control box. */
- /* */
- /* <MT-Note> */
- /* Yes. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( void ) FT_Outline_Get_CBox( FT_Outline* outline,
FT_BBox *acbox )
{
@@ -530,24 +412,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Translate */
- /* */
- /* <Description> */
- /* Applies a simple translation to the points of an outline. */
- /* */
- /* <Input> */
- /* outline :: A pointer to the target outline descriptor. */
- /* */
- /* xOffset :: The horizontal offset. */
- /* */
- /* yOffset :: The vertical offset. */
- /* */
- /* <MT-Note> */
- /* Yes. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( void ) FT_Outline_Translate( FT_Outline* outline,
FT_Pos xOffset,
FT_Pos yOffset )
@@ -565,22 +431,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Reverse */
- /* */
- /* <Description> */
- /* Reverses the drawing direction of an outline. This is used to */
- /* ensure consistent fill conventions for mirrored glyphs. */
- /* */
- /* <Input> */
- /* outline :: A pointer to the target outline descriptor. */
- /* */
- /* <Note> */
- /* This functions toggles the bit flag `ft_outline_reverse_fill' in */
- /* the outline's `flags' field. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( void ) FT_Outline_Reverse( FT_Outline* outline )
{
FT_UShort n;
@@ -634,40 +486,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Render */
- /* */
- /* <Description> */
- /* Renders an outline within a bitmap using the current scan-convert. */
- /* This functions uses an FT_Raster_Params structure as an argument, */
- /* allowing advanced features like direct composition, translucency, */
- /* etc. */
- /* */
- /* <Input> */
- /* library :: A handle to a FreeType library object. */
- /* */
- /* outline :: A pointer to the source outline descriptor. */
- /* */
- /* params :: A pointer to a FT_Raster_Params structure used to */
- /* describe the rendering operation. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <MT-Note> */
- /* YES. Rendering is synchronized, so that concurrent calls to the */
- /* scan-line converter will be serialized. */
- /* */
- /* <Note> */
- /* You should know what you are doing and how FT_Raster_Params works */
- /* to use this function. */
- /* */
- /* The field `params.source' will be set to `outline' before the scan */
- /* converter is called, which means that the value you give to it is */
- /* actually ignored. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Outline_Render( FT_Library library,
FT_Outline* outline,
FT_Raster_Params* params )
@@ -716,35 +536,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Get_Bitmap */
- /* */
- /* <Description> */
- /* Renders an outline within a bitmap. The outline's image is simply */
- /* OR-ed to the target bitmap. */
- /* */
- /* <Input> */
- /* library :: A handle to a FreeType library object. */
- /* */
- /* outline :: A pointer to the source outline descriptor. */
- /* */
- /* map :: A pointer to the target bitmap descriptor. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <MT-Note> */
- /* YES. Rendering is synchronized, so that concurrent calls to the */
- /* scan-line converter will be serialized. */
- /* */
- /* <Note> */
- /* This function does NOT CREATE the bitmap, it only renders an */
- /* outline image within the one you pass to it! */
- /* */
- /* It will use the raster correponding to the default glyph format. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( FT_Error ) FT_Outline_Get_Bitmap( FT_Library library,
FT_Outline* outline,
FT_Bitmap *abitmap )
@@ -767,26 +560,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Vector_Transform */
- /* */
- /* <Description> */
- /* Transforms a single vector through a 2x2 matrix. */
- /* */
- /* <InOut> */
- /* vector :: The target vector to transform. */
- /* */
- /* <Input> */
- /* matrix :: A pointer to the source 2x2 matrix. */
- /* */
- /* <MT-Note> */
- /* Yes. */
- /* */
- /* <Note> */
- /* The result is undefined if either `vector' or `matrix' is invalid. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( void ) FT_Vector_Transform( FT_Vector* vector,
FT_Matrix* matrix )
{
@@ -807,27 +582,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Outline_Transform */
- /* */
- /* <Description> */
- /* Applies a simple 2x2 matrix to all of an outline's points. Useful */
- /* for applying rotations, slanting, flipping, etc. */
- /* */
- /* <Input> */
- /* outline :: A pointer to the target outline descriptor. */
- /* */
- /* matrix :: A pointer to the transformation matrix. */
- /* */
- /* <MT-Note> */
- /* Yes. */
- /* */
- /* <Note> */
- /* You can use FT_Outline_Translate() if you need to translate the */
- /* outline's points. */
- /* */
+ /* documentation is in ftoutln.h */
+
FT_EXPORT_DEF( void ) FT_Outline_Transform( FT_Outline* outline,
FT_Matrix* matrix )
{
@@ -839,4 +595,5 @@
FT_Vector_Transform( vec, matrix );
}
+
/* END */
diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c
index 357df3b..da77ae6 100644
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -213,23 +213,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_New_Stream */
- /* */
- /* <Description> */
- /* Creates a new stream object. */
- /* */
- /* <Input> */
- /* filepathname :: The name of the stream (usually a file) to be */
- /* opened. */
- /* */
- /* stream :: A pointer to the stream object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
+ /* documentation is in ftobjs.h */
+
FT_EXPORT_DEF( FT_Error ) FT_New_Stream( const char* filepathname,
FT_Stream astream )
{
@@ -267,17 +252,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_New_Memory */
- /* */
- /* <Description> */
- /* Creates a new memory object. */
- /* */
- /* <Return> */
- /* A pointer to the new memory object. 0 in case of error. */
- /* */
+ /* documentation is in ftobjs.h */
+
FT_EXPORT_DEF( FT_Memory ) FT_New_Memory( void )
{
FT_Memory memory;
@@ -296,17 +272,8 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FT_Done_Memory */
- /* */
- /* <Description> */
- /* Discards memory manager. */
- /* */
- /* <Input> */
- /* memory :: A handle to the memory manager. */
- /* */
+ /* documentation is in ftobjs.h */
+
FT_EXPORT_DEF( void ) FT_Done_Memory( FT_Memory memory )
{
free( memory );
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 28e885c..ee3f193 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -19,10 +19,12 @@
#ifdef FT_FLAT_COMPILE
#include "sfobjs.h"
+#include "ttload.h"
#else
#include <sfnt/sfobjs.h>
+#include <sfnt/ttload.h>
#endif
@@ -30,6 +32,7 @@
#include <freetype/internal/sfnt.h>
#include <freetype/internal/psnames.h>
#include <freetype/ttnameid.h>
+#include <freetype/tttags.h>
#include <freetype/internal/tterrors.h>
diff --git a/src/smooth/ftgrays.h b/src/smooth/ftgrays.h
index e1792c2..5055f6d 100644
--- a/src/smooth/ftgrays.h
+++ b/src/smooth/ftgrays.h
@@ -31,7 +31,7 @@
/*************************************************************************/
/* */
/* To make ftgrays.h independent from configuration files we check */
- /* whether FT_EXPORT has been defined already. */
+ /* whether FT_EXPORT_VAR has been defined already. */
/* */
/* On some systems and compilers (Win32 mostly), an extra keyword is */
/* necessary to compile the library as a DLL. */
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index e62a4c2..1e9a399 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -765,25 +765,8 @@
};
- /*************************************************************************/
- /* */
- /* <Function> */
- /* TT_New_Context */
- /* */
- /* <Description> */
- /* Queries the face context for a given font. Note that there is */
- /* now a _single_ execution context in the TrueType driver which is */
- /* shared among faces. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face object. */
- /* */
- /* <Return> */
- /* A handle to the execution context. Initialized for `face'. */
- /* */
- /* <Note> */
- /* Only the glyph loader and debugger should call this function. */
- /* */
+ /* documentation is in ttinterp.h */
+
FT_EXPORT_DEF( TT_ExecContext ) TT_New_Context( TT_Face face )
{
TT_Driver driver;
@@ -6794,27 +6777,8 @@
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* <Function> */
- /* TT_RunIns */
- /* */
- /* <Description> */
- /* Executes one or more instruction in the execution context. This */
- /* is the main function of the TrueType opcode interpreter. */
- /* */
- /* <Input> */
- /* exec :: A handle to the target execution context. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* Only the object manager and debugger should call this function. */
- /* */
- /* This function is publicly exported because it is directly */
- /* invoked by the TrueType debugger. */
- /* */
+ /* documentation is in ttinterp.h */
+
FT_EXPORT_DEF( FT_Error ) TT_RunIns( TT_ExecContext exc )
{
FT_Long ins_counter = 0; /* executed instructions counter */
diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h
index dbe9f03..1094aed 100644
--- a/src/truetype/ttinterp.h
+++ b/src/truetype/ttinterp.h
@@ -243,8 +243,29 @@
FT_Error TT_Clear_CodeRange( TT_ExecContext exec,
FT_Int range );
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* TT_New_Context */
+ /* */
+ /* <Description> */
+ /* Queries the face context for a given font. Note that there is */
+ /* now a _single_ execution context in the TrueType driver which is */
+ /* shared among faces. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the source face object. */
+ /* */
+ /* <Return> */
+ /* A handle to the execution context. Initialized for `face'. */
+ /* */
+ /* <Note> */
+ /* Only the glyph loader and debugger should call this function. */
+ /* */
FT_EXPORT( TT_ExecContext ) TT_New_Context( TT_Face face );
+
FT_LOCAL
FT_Error TT_Done_Context( TT_ExecContext exec );
@@ -265,6 +286,28 @@
FT_Error TT_Run_Context( TT_ExecContext exec,
FT_Bool debug );
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* TT_RunIns */
+ /* */
+ /* <Description> */
+ /* Executes one or more instruction in the execution context. This */
+ /* is the main function of the TrueType opcode interpreter. */
+ /* */
+ /* <Input> */
+ /* exec :: A handle to the target execution context. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* Only the object manager and debugger should call this function. */
+ /* */
+ /* This function is publicly exported because it is directly */
+ /* invoked by the TrueType debugger. */
+ /* */
FT_EXPORT( FT_Error ) TT_RunIns( TT_ExecContext exec );
diff --git a/src/type1/t1driver.h b/src/type1/t1driver.h
index 8b5fcb6..5354a4f 100644
--- a/src/type1/t1driver.h
+++ b/src/type1/t1driver.h
@@ -26,7 +26,7 @@
#endif
- FT_EXPORT_VAR( const FT_Driver_Class ) t1_driver_class;
+ FT_EXPORT_VAR( const FT_Driver_Class ) t1_driver_class;
#ifdef __cplusplus
}