* builds/amiga/src/base/ftsystem.c, devel/ftoption.h include/freetype/ftcache.h, include/freetype/ftoutln.h, include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h, include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h, include/freetype/internal/ftdriver.h, include/freetype/internal/ftmemory.h, include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h, include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h, include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h, src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c, src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c, src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c, src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c, src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c, src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: massive changes to the internals to respect the internal object layouts and exported functions of FreeType 2.1.7. Note that the cache sub-system cannot be fully retrofitted, unfortunately.
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
diff --git a/ChangeLog b/ChangeLog
index abd3fe3..5fb84f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,31 @@
+2006-02-16 David Turner <david@freetype.org>
+
+ * builds/amiga/src/base/ftsystem.c, devel/ftoption.h
+ include/freetype/ftcache.h, include/freetype/ftoutln.h,
+ include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
+ include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
+ include/freetype/internal/ftdriver.h,
+ include/freetype/internal/ftmemory.h,
+ include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
+ include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
+ include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
+ src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
+ src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
+ src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
+ src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
+ src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
+ src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
+ src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
+
+ massive changes to the internals to respect the internal object layouts
+ and exported functions of FreeType 2.1.7. Note that the cache sub-system
+ cannot be fully retrofitted, unfortunately.
+
2006-02-15 Chia-I Wu <b90201047@ntu.edu.tw>
* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
unused `max_points' and `max_contours'.
-
+
* src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c
(T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Update.
@@ -127,7 +150,7 @@
src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c,
src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface.
-
+
* src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: New files. Metrics-related
tables' loading and parsing code is moved to here.
Move `tt_face_get_metrics' here from the truetype module. The
@@ -377,7 +400,7 @@
2006-01-27 David Turner <david@freetype.org>
* builds/unix/configure.ac: Fix build problem on Cygwin.
-
+
* builds/unix/install.mk (install): Don't install the internal
headers, and remove existing ones if found in the target install
directory.
diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c
index ffedfa0..1eb63df 100644
--- a/builds/amiga/src/base/ftsystem.c
+++ b/builds/amiga/src/base/ftsystem.c
@@ -116,7 +116,7 @@ Free_VecPooled( APTR poolHeader,
/* */
/* It is not necessary to do any error checking for the */
/* allocation-related functions. This will be done by the higher level */
- /* routines like FT_Alloc() or FT_Realloc(). */
+ /* routines like ft_mem_alloc() or ft_mem_realloc(). */
/* */
/*************************************************************************/
diff --git a/devel/ftoption.h b/devel/ftoption.h
index 1900d74..742edb2 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -567,7 +567,7 @@ FT_BEGIN_HEADER
/*
* This temporary macro is used to control whether we are going to
- * compile certain functions like FT_Alloc in a way that prevents recent
+ * compile certain functions like ft_mem_alloc in a way that prevents recent
* GCC releases from emitting zillions of `strict aliasing' warning
* messages each time a memory-management function is called.
*/
diff --git a/include/freetype/cache/ftccache.h b/include/freetype/cache/ftccache.h
index da2e992..3bd2476 100644
--- a/include/freetype/cache/ftccache.h
+++ b/include/freetype/cache/ftccache.h
@@ -82,6 +82,16 @@ FT_BEGIN_HEADER
FTC_Node_Destroy( FTC_Node node,
FTC_Manager manager );
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_BASE( void )
+ ftc_node_destroy( FTC_Node node,
+ FTC_Manager manager );
+
+ FT_BASE( void )
+ ftc_node_done( FTC_Node node,
+ FTC_Manager manager );
+
+#endif
/*************************************************************************/
/*************************************************************************/
diff --git a/include/freetype/cache/ftccmap.h b/include/freetype/cache/ftccmap.h
index 7dbbc50..0b97704 100644
--- a/include/freetype/cache/ftccmap.h
+++ b/include/freetype/cache/ftccmap.h
@@ -25,64 +25,15 @@
FT_BEGIN_HEADER
+/* the FT 2.1.7 Charmap cache interface
+ *
+ * unfortunately, it is not possible to implement it in later
+ * versions, since some function signature changed too significantly
+ * to do that.
+ */
+
+#if 0
- /*************************************************************************/
- /* */
- /* <Section> */
- /* cache_subsystem */
- /* */
- /*************************************************************************/
-
- /*************************************************************************
- *
- * @type:
- * FTC_CMapCache
- *
- * @description:
- * An opaque handle used to manager a charmap cache. This cache is to
- * hold character codes -> glyph indices mappings.
- *
- */
- typedef struct FTC_CMapCacheRec_* FTC_CMapCache;
-
-
- /*************************************************************************
- *
- * @type:
- * FTC_CMapDesc
- *
- * @description:
- * A handle to an @FTC_CMapDescRec structure used to describe a given
- * charmap in a charmap cache.
- *
- * Each @FTC_CMapDesc describes which charmap (of which @FTC_FaceID) we
- * want to use in @FTC_CMapCache_Lookup.
- *
- */
- typedef struct FTC_CMapDescRec_* FTC_CMapDesc;
-
-
- /*************************************************************************
- *
- * @enum:
- * FTC_CMapType
- *
- * @description:
- * The list of valid @FTC_CMapDesc types. They indicate how we want to
- * address a charmap within an @FTC_FaceID.
- *
- * @values:
- * FTC_CMAP_BY_INDEX ::
- * Address a charmap by its index in the corresponding @FT_Face.
- *
- * FTC_CMAP_BY_ENCODING ::
- * Use a @FT_Face charmap that corresponds to a given encoding.
- *
- * FTC_CMAP_BY_ID ::
- * Use an @FT_Face charmap that corresponds to a given
- * (platform,encoding) ID. See @FTC_CMapIdRec.
- *
- */
typedef enum FTC_CMapType_
{
FTC_CMAP_BY_INDEX = 0,
@@ -92,23 +43,6 @@ FT_BEGIN_HEADER
} FTC_CMapType;
- /*************************************************************************
- *
- * @struct:
- * FTC_CMapIdRec
- *
- * @description:
- * A short structure to identify a charmap by a (platform,encoding) pair
- * of values.
- *
- * @fields:
- * platform ::
- * The platform ID.
- *
- * encoding ::
- * The encoding ID.
- *
- */
typedef struct FTC_CMapIdRec_
{
FT_UInt platform;
@@ -117,34 +51,6 @@ FT_BEGIN_HEADER
} FTC_CMapIdRec;
- /*************************************************************************
- *
- * @struct:
- * FTC_CMapDescRec
- *
- * @description:
- * A structure to describe a given charmap to @FTC_CMapCache.
- *
- * @fields:
- * face_id ::
- * @FTC_FaceID of the face this charmap belongs to.
- *
- * type ::
- * The type of charmap, see @FTC_CMapType.
- *
- * u.index ::
- * For @FTC_CMAP_BY_INDEX types, this is the charmap index (within a
- * @FT_Face) we want to use.
- *
- * u.encoding ::
- * For @FTC_CMAP_BY_ENCODING types, this is the charmap encoding we
- * want to use. see @FT_Encoding.
- *
- * u.id ::
- * For @FTC_CMAP_BY_ID types, this is the (platform,encoding) pair we
- * want to use. see @FTC_CMapIdRec and @FT_CharMapRec.
- *
- */
typedef struct FTC_CMapDescRec_
{
FTC_FaceID face_id;
@@ -158,73 +64,25 @@ FT_BEGIN_HEADER
} u;
- } FTC_CMapDescRec;
-
-
- /*************************************************************************
- *
- * @function:
- * FTC_CMapCache_New
- *
- * @description:
- * Creates a new charmap cache.
- *
- * @input:
- * manager ::
- * A handle to the cache manager.
- *
- * @output:
- * acache ::
- * A new cache handle. NULL in case of error.
- *
- * @return:
- * FreeType error code. 0 means success.
- *
- * @note:
- * Like all other caches, this one will be destroyed with the cache
- * manager.
- *
- */
+ } FTC_CMapDescRec, *FTC_CMapDesc;
+
+
+#if 0
FT_EXPORT( FT_Error )
FTC_CMapCache_New( FTC_Manager manager,
FTC_CMapCache *acache );
- /*************************************************************************
- *
- * @function:
- * FTC_CMapCache_Lookup
- *
- * @description:
- * Translates a character code into a glyph index, using the charmap
- * cache.
- *
- * @input:
- * cache ::
- * A charmap cache handle.
- *
- * cmap_desc ::
- * A charmap descriptor handle.
- *
- * char_code ::
- * The character code (in the corresponding charmap).
- *
- * @return:
- * Glyph index. 0 means `no glyph'.
- *
- * @note:
- * This function doesn't return @FTC_Node handles, since there is no
- * real use for them with typical uses of charmaps.
- *
- */
FT_EXPORT( FT_UInt )
FTC_CMapCache_Lookup( FTC_CMapCache cache,
FTC_CMapDesc cmap_desc,
FT_UInt32 char_code );
+#endif
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* */
-
FT_END_HEADER
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index dae8fea..3370409 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -583,12 +583,17 @@ FT_BEGIN_HEADER
/*
* This temporary macro is used to control whether we are going to
- * compile certain functions like FT_Alloc in a way that prevents recent
+ * compile certain functions like ft_mem_alloc in a way that prevents recent
* GCC releases from emitting zillions of `strict aliasing' warning
* messages each time a memory-management function is called.
*/
#define FT_STRICT_ALIASING
+/* define this variable if you want to keep the layout of internal structures
+ * that was used prior to FreeType 2.2. This also compiles in a few obsolete
+ * functions to avoid linking problems on typical Unix distributions
+ */
+#define FT_CONFIG_OPTION_OLD_INTERNALS
FT_END_HEADER
diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h
index ca8982b..fdc6b94 100644
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -829,6 +829,23 @@ FT_BEGIN_HEADER
/* */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ FT_EXPORT( FT_Error )
+ FTC_Manager_Lookup_Face( FTC_Manager manager,
+ FTC_FaceID face_id,
+ FT_Face *aface );
+
+ FT_EXPORT( FT_Error )
+ FTC_Manager_Lookup_Size( FTC_Manager manager,
+ FTC_Font font,
+ FT_Face *aface,
+ FT_Size *asize );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+ /* */
+
FT_END_HEADER
#endif /* __FTCACHE_H__ */
diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h
index dbe8edc..96412d3 100644
--- a/include/freetype/ftoutln.h
+++ b/include/freetype/ftoutln.h
@@ -176,7 +176,7 @@ FT_BEGIN_HEADER
/* descriptor will be released. */
/* */
/* The reason why this function takes an `library' parameter is */
- /* simply to use FT_Free(). */
+ /* simply to use ft_mem_free(). */
/* */
FT_EXPORT( FT_Error )
FT_Outline_Done( FT_Library library,
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 7cfd9a3..1fe2f7b 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -48,7 +48,7 @@ FT_BEGIN_HEADER
FT_SqrtFixed( FT_Int32 x );
-#if 0
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*************************************************************************/
/* */
@@ -68,7 +68,7 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Int32 )
FT_Sqrt32( FT_Int32 x );
-#endif /* 0 */
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/
diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h
index 89a92ab..dd86db9 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
@@ -59,6 +59,19 @@ FT_BEGIN_HEADER
typedef FT_Error
(*FT_Size_SelectFunc)( FT_Size size,
FT_ULong size_index );
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ typedef FT_Error
+ (*FT_Size_ResetPointsFunc)( FT_Size size,
+ FT_F26Dot6 char_width,
+ FT_F26Dot6 char_height,
+ FT_UInt horz_resolution,
+ FT_UInt vert_resolution );
+
+ typedef FT_Error
+ (*FT_Size_ResetPixelsFunc)( FT_Size size,
+ FT_UInt pixel_width,
+ FT_UInt pixel_height );
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
typedef FT_Error
(*FT_Slot_LoadFunc)( FT_GlyphSlot slot,
@@ -125,15 +138,6 @@ FT_BEGIN_HEADER
/* */
/* done_slot :: The format-specific slot destructor. */
/* */
- /* request_size :: A handle to a function used to request the new */
- /* character size. Can be set to 0 if the */
- /* scaling done in the base layer suffices. */
- /* */
- /* select_size :: A handle to a function used to select a new */
- /* fixed size. It is used only if */
- /* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set */
- /* to 0 if the scaling done in the base layer */
- /* suffices. */
/* */
/* load_glyph :: A function handle to load a glyph to a slot. */
/* This field is mandatory! */
@@ -163,6 +167,15 @@ FT_BEGIN_HEADER
/* device-independent text layout without loading */
/* a single glyph image. */
/* */
+ /* request_size :: A handle to a function used to request the new */
+ /* character size. Can be set to 0 if the */
+ /* scaling done in the base layer suffices. */
+ /* */
+ /* select_size :: A handle to a function used to select a new */
+ /* fixed size. It is used only if */
+ /* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set */
+ /* to 0 if the scaling done in the base layer */
+ /* suffices. */
/* <Note> */
/* Most function pointers, with the exception of `load_glyph' and */
/* `get_char_index' can be set to 0 to indicate a default behaviour. */
@@ -184,8 +197,10 @@ FT_BEGIN_HEADER
FT_Slot_InitFunc init_slot;
FT_Slot_DoneFunc done_slot;
- FT_Size_RequestFunc request_size;
- FT_Size_SelectFunc select_size;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_Size_ResetPointsFunc set_char_sizes;
+ FT_Size_ResetPixelsFunc set_pixel_sizes;
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
FT_Slot_LoadFunc load_glyph;
@@ -193,9 +208,33 @@ FT_BEGIN_HEADER
FT_Face_AttachFunc attach_file;
FT_Face_GetAdvancesFunc get_advances;
+ /* since FT 2.2. */
+ FT_Size_RequestFunc request_size;
+ FT_Size_SelectFunc select_size;
+
} FT_Driver_ClassRec, *FT_Driver_Class;
+/* the following are used as stubs for 'set_char_sizes'
+ * and 'set_pixel_sizes'. their implementation uses
+ * 'request_size' and 'select_size' functions instead
+ *
+ * implementation is in src/base/ftobjs.c
+ */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_BASE( FT_Error )
+ ft_stub_set_char_sizes( FT_Size size,
+ FT_F26Dot6 width,
+ FT_F26Dot6 height,
+ FT_UInt horz_res,
+ FT_UInt vert_res );
+
+ FT_BASE( FT_Error )
+ ft_stub_set_pixel_sizes( FT_Size size,
+ FT_UInt width,
+ FT_UInt height );
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
FT_END_HEADER
#endif /* __FTDRIVER_H__ */
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index 40703d5..0114ffa 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -67,90 +67,90 @@ FT_BEGIN_HEADER
*/
FT_BASE( FT_Pointer )
- FT_Alloc( FT_Memory memory,
- FT_Long size,
- FT_Error *p_error );
+ ft_mem_alloc( FT_Memory memory,
+ FT_Long size,
+ FT_Error *p_error );
FT_BASE( FT_Pointer )
- FT_QAlloc( FT_Memory memory,
- FT_Long size,
- FT_Error *p_error );
+ ft_mem_qalloc( FT_Memory memory,
+ FT_Long size,
+ FT_Error *p_error );
FT_BASE( FT_Pointer )
- FT_Realloc( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* block,
- FT_Error *p_error );
+ ft_mem_realloc( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* block,
+ FT_Error *p_error );
FT_BASE( FT_Pointer )
- FT_QRealloc( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* block,
- FT_Error *p_error );
+ ft_mem_qrealloc( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* block,
+ FT_Error *p_error );
FT_BASE( void )
- FT_Free( FT_Memory memory,
- const void* P );
+ ft_mem_free( FT_Memory memory,
+ const void* P );
#ifdef FT_DEBUG_MEMORY
FT_BASE( FT_Pointer )
- FT_Alloc_Debug( FT_Memory memory,
- FT_Long size,
- FT_Error *p_error,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_alloc_debug( FT_Memory memory,
+ FT_Long size,
+ FT_Error *p_error,
+ const char* file_name,
+ FT_Long line_no );
FT_BASE( FT_Pointer )
- FT_QAlloc_Debug( FT_Memory memory,
- FT_Long size,
- FT_Error *p_error,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_qalloc_debug( FT_Memory memory,
+ FT_Long size,
+ FT_Error *p_error,
+ const char* file_name,
+ FT_Long line_no );
FT_BASE( FT_Pointer )
- FT_Realloc_Debug( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* P,
- FT_Error *p_error,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_realloc_debug( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* P,
+ FT_Error *p_error,
+ const char* file_name,
+ FT_Long line_no );
FT_BASE( FT_Pointer )
- FT_QRealloc_Debug( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* P,
- FT_Error *p_error,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_qrealloc_debug( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* P,
+ FT_Error *p_error,
+ const char* file_name,
+ FT_Long line_no );
FT_BASE( void )
- FT_Free_Debug( FT_Memory memory,
- const void *P,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_free_debug( FT_Memory memory,
+ const void *P,
+ const char* file_name,
+ FT_Long line_no );
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
- (_pointer_) = FT_Alloc_Debug( memory, _size_, &error, \
+ (_pointer_) = ft_mem_alloc_debug( memory, _size_, &error, \
__FILE__, __LINE__ )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
- (_pointer_) = FT_Realloc_Debug( memory, _current_, _size_, \
+ (_pointer_) = ft_mem_realloc_debug( memory, _current_, _size_, \
(_pointer_), &error, \
__FILE__, __LINE__ )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
- (_pointer_) = FT_QAlloc_Debug( memory, _size_, &error, \
+ (_pointer_) = ft_mem_qalloc_debug( memory, _size_, &error, \
__FILE__, __LINE__ )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
- (_pointer_) = FT_QRealloc_Debug( memory, _current_, _size_, \
+ (_pointer_) = ft_mem_qrealloc_debug( memory, _current_, _size_, \
(_pointer_), &error, \
__FILE__, __LINE__ )
@@ -158,7 +158,7 @@ FT_BEGIN_HEADER
FT_BEGIN_STMNT \
if ( _pointer_ ) \
{ \
- FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \
+ ft_mem_free_debug( memory, (_pointer_), __FILE__, __LINE__ ); \
(_pointer_) = NULL; \
} \
FT_END_STMNT
@@ -168,26 +168,26 @@ FT_BEGIN_HEADER
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
- (_pointer_) = FT_Alloc( memory, _size_, &error )
+ (_pointer_) = ft_mem_alloc( memory, _size_, &error )
#define FT_MEM_FREE( _pointer_ ) \
FT_BEGIN_STMNT \
if ( (_pointer_) ) \
{ \
- FT_Free( memory, (_pointer_) ); \
+ ft_mem_free( memory, (_pointer_) ); \
(_pointer_) = NULL; \
} \
FT_END_STMNT
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
- (_pointer_) = FT_Realloc( memory, _current_, _size_, \
+ (_pointer_) = ft_mem_realloc( memory, _current_, _size_, \
(_pointer_), &error )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
- (_pointer_) = FT_QAlloc( memory, _size_, &error )
+ (_pointer_) = ft_mem_qalloc( memory, _size_, &error )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
- (_pointer_) = FT_QRealloc( memory, _current_, _size_, \
+ (_pointer_) = ft_mem_qrealloc( memory, _current_, _size_, \
(_pointer_), &error )
#endif /* !FT_DEBUG_MEMORY */
@@ -203,40 +203,40 @@ FT_BEGIN_HEADER
FT_BASE( FT_Error )
- FT_Alloc_Debug( FT_Memory memory,
- FT_Long size,
- void* *P,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_alloc_debug( FT_Memory memory,
+ FT_Long size,
+ void* *P,
+ const char* file_name,
+ FT_Long line_no );
FT_BASE( FT_Error )
- FT_QAlloc_Debug( FT_Memory memory,
- FT_Long size,
- void* *P,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_qalloc_debug( FT_Memory memory,
+ FT_Long size,
+ void* *P,
+ const char* file_name,
+ FT_Long line_no );
FT_BASE( FT_Error )
- FT_Realloc_Debug( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* *P,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_realloc_debug( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* *P,
+ const char* file_name,
+ FT_Long line_no );
FT_BASE( FT_Error )
- FT_QRealloc_Debug( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* *P,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_qrealloc_debug( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* *P,
+ const char* file_name,
+ FT_Long line_no );
FT_BASE( void )
- FT_Free_Debug( FT_Memory memory,
- FT_Pointer block,
- const char* file_name,
- FT_Long line_no );
+ ft_mem_free_debug( FT_Memory memory,
+ FT_Pointer block,
+ const char* file_name,
+ FT_Long line_no );
#endif /* FT_DEBUG_MEMORY */
@@ -245,7 +245,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
- /* FT_Alloc */
+ /* ft_mem_alloc */
/* */
/* <Description> */
/* Allocates a new block of memory. The returned area is always */
@@ -265,15 +265,15 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */
/* */
FT_BASE( FT_Error )
- FT_Alloc( FT_Memory memory,
- FT_Long size,
- void* *P );
+ ft_mem_alloc( FT_Memory memory,
+ FT_Long size,
+ void* *P );
/*************************************************************************/
/* */
/* <Function> */
- /* FT_QAlloc */
+ /* ft_mem_qalloc */
/* */
/* <Description> */
/* Allocates a new block of memory. The returned area is *not* */
@@ -293,15 +293,15 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */
/* */
FT_BASE( FT_Error )
- FT_QAlloc( FT_Memory memory,
- FT_Long size,
- void* *p );
+ ft_mem_qalloc( FT_Memory memory,
+ FT_Long size,
+ void* *p );
/*************************************************************************/
/* */
/* <Function> */
- /* FT_Realloc */
+ /* ft_mem_realloc */
/* */
/* <Description> */
/* Reallocates a block of memory pointed to by `*P' to `Size' bytes */
@@ -324,20 +324,20 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* All callers of FT_Realloc() _must_ provide the current block size */
- /* as well as the new one. */
+ /* All callers of ft_mem_realloc() _must_ provide the current block */
+ /* size as well as the new one. */
/* */
FT_BASE( FT_Error )
- FT_Realloc( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* *P );
+ ft_mem_realloc( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* *P );
/*************************************************************************/
/* */
/* <Function> */
- /* FT_QRealloc */
+ /* ft_mem_qrealloc */
/* */
/* <Description> */
/* Reallocates a block of memory pointed to by `*P' to `Size' bytes */
@@ -360,23 +360,23 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* All callers of FT_Realloc() _must_ provide the current block size */
- /* as well as the new one. */
+ /* All callers of ft_mem_realloc() _must_ provide the current block */
+ /* size as well as the new one. */
/* */
FT_BASE( FT_Error )
- FT_QRealloc( FT_Memory memory,
- FT_Long current,
- FT_Long size,
- void* *p );
+ ft_mem_qrealloc( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* *p );
/*************************************************************************/
/* */
/* <Function> */
- /* FT_Free */
+ /* ft_mem_free */
/* */
/* <Description> */
- /* Releases a given block of memory allocated through FT_Alloc(). */
+ /* Releases a given block of memory allocated through ft_mem_alloc(). */
/* */
/* <Input> */
/* memory :: A handle to a given `memory object' which handles */
@@ -391,35 +391,35 @@ FT_BEGIN_HEADER
/* drivers. */
/* */
FT_BASE( void )
- FT_Free( FT_Memory memory,
- void* *P );
+ ft_mem_free( FT_Memory memory,
+ void* *P );
#ifdef FT_DEBUG_MEMORY
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
- FT_Alloc_Debug( memory, _size_, \
+ ft_mem_alloc_debug( memory, _size_, \
(void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
- FT_Realloc_Debug( memory, _current_, _size_, \
+ ft_mem_realloc_debug( memory, _current_, _size_, \
(void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
- FT_QAlloc_Debug( memory, _size_, \
+ ft_mem_qalloc_debug( memory, _size_, \
(void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
- FT_QRealloc_Debug( memory, _current_, _size_, \
+ ft_mem_qrealloc_debug( memory, _current_, _size_, \
(void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
#define FT_MEM_FREE( _pointer_ ) \
- FT_Free_Debug( memory, (void**)(void*)&(_pointer_), \
+ ft_mem_free_debug( memory, (void**)(void*)&(_pointer_), \
__FILE__, __LINE__ )
@@ -427,23 +427,23 @@ FT_BEGIN_HEADER
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
- FT_Alloc( memory, _size_, \
+ ft_mem_alloc( memory, _size_, \
(void**)(void*)&(_pointer_) )
#define FT_MEM_FREE( _pointer_ ) \
- FT_Free( memory, \
+ ft_mem_free( memory, \
(void**)(void*)&(_pointer_) )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
- FT_Realloc( memory, _current_, _size_, \
+ ft_mem_realloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
- FT_QAlloc( memory, _size_, \
+ ft_mem_qalloc( memory, _size_, \
(void**)(void*)&(_pointer_) )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
- FT_QRealloc( memory, _current_, _size_, \
+ ft_mem_qrealloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) )
@@ -580,6 +580,36 @@ FT_BEGIN_HEADER
(_new_) * sizeof ( _type_ ) )
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ FT_BASE( FT_Error )
+ FT_Alloc( FT_Memory memory,
+ FT_Long size,
+ void* *P );
+
+ FT_BASE( FT_Error )
+ FT_QAlloc( FT_Memory memory,
+ FT_Long size,
+ void* *p );
+
+ FT_BASE( FT_Error )
+ FT_Realloc( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* *P );
+
+ FT_BASE( FT_Error )
+ FT_QRealloc( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* *p );
+ FT_BASE( void )
+ FT_Free( FT_Memory memory,
+ void* *P );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
/* */
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 4da9789..133f360 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -213,6 +213,10 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Face_InternalRec_
{
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_UShort reserved1;
+ FT_Short reserved2;
+#endif
FT_Matrix transform_matrix;
FT_Vector transform_delta;
FT_Int transform_flags;
diff --git a/include/freetype/internal/ftrfork.h b/include/freetype/internal/ftrfork.h
index e7b1002..4909491 100644
--- a/include/freetype/internal/ftrfork.h
+++ b/include/freetype/internal/ftrfork.h
@@ -154,7 +154,7 @@ FT_BEGIN_HEADER
/* offsets :: */
/* The stream offsets for the resource data specified by `tag'. */
/* This array is allocated by the function, so you have to call */
- /* @FT_Free after use. */
+ /* @ft_mem_free after use. */
/* */
/* count :: */
/* The length of offsets array. */
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index 7ca47d8..43017dd 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -784,7 +784,6 @@ FT_BEGIN_HEADER
const PS_Parser_FuncsRec* ps_parser_funcs;
const T1_Builder_FuncsRec* t1_builder_funcs;
const T1_Decoder_FuncsRec* t1_decoder_funcs;
- const AFM_Parser_FuncsRec* afm_parser_funcs;
void
(*t1_decrypt)( FT_Byte* buffer,
@@ -793,6 +792,9 @@ FT_BEGIN_HEADER
T1_CMap_Classes t1_cmap_classes;
+ /* fields from here were added after 2.1.10 */
+ const AFM_Parser_FuncsRec* afm_parser_funcs;
+
} PSAux_ServiceRec, *PSAux_Service;
/* backwards-compatible type definition */
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index 1da799f..27d76c0 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -125,6 +125,75 @@ FT_BEGIN_HEADER
(*TT_Done_Face_Func)( TT_Face face );
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* TT_Load_SFNT_HeaderRec_Func */
+ /* */
+ /* <Description> */
+ /* Loads the header of a SFNT font file. Supports collections. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the target face object. */
+ /* */
+ /* stream :: The input stream. */
+ /* */
+ /* face_index :: The index of the TrueType font, if we are opening a */
+ /* collection. */
+ /* */
+ /* <Output> */
+ /* sfnt :: The SFNT header. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* The stream cursor must be at the font file's origin. */
+ /* */
+ /* This function recognizes fonts embedded in a `TrueType */
+ /* collection'. */
+ /* */
+ /* This function checks that the header is valid by looking at the */
+ /* values of `search_range', `entry_selector', and `range_shift'. */
+ /* */
+ typedef FT_Error
+ (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header sfnt );
+
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* TT_Load_Directory_Func */
+ /* */
+ /* <Description> */
+ /* Loads the table directory into a face object. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the target face object. */
+ /* */
+ /* stream :: The input stream. */
+ /* */
+ /* sfnt :: The SFNT header. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* The stream cursor must be on the first byte after the 4-byte font */
+ /* format tag. This is the case just after a call to */
+ /* TT_Load_Format_Tag(). */
+ /* */
+ typedef FT_Error
+ (*TT_Load_Directory_Func)( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header sfnt );
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
/*************************************************************************/
/* */
/* <FuncType> */
@@ -292,6 +361,85 @@ FT_BEGIN_HEADER
TT_SBit_MetricsRec *ametrics );
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* TT_Set_SBit_Strike_OldFunc */
+ /* */
+ /* <Description> */
+ /* Select an sbit strike for a given size request. */
+ /* */
+ /* <Input> */
+ /* face :: The target face object. */
+ /* */
+ /* req :: The size request. */
+ /* */
+ /* <Output> */
+ /* astrike_index :: The index of the sbit strike. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. Returns an error if no */
+ /* sbit strike exists for the selected ppem values. */
+ /* */
+ typedef FT_Error
+ (*TT_Set_SBit_Strike_OldFunc)( TT_Face face,
+ FT_UInt x_ppem,
+ FT_UInt y_ppem,
+ FT_ULong* astrike_index );
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* TT_CharMap_Load_Func */
+ /* */
+ /* <Description> */
+ /* Loads a given TrueType character map into memory. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the parent face object. */
+ /* */
+ /* stream :: A handle to the current stream object. */
+ /* */
+ /* <InOut> */
+ /* cmap :: A pointer to a cmap object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* The function assumes that the stream is already in use (i.e., */
+ /* opened). In case of error, all partially allocated tables are */
+ /* released. */
+ /* */
+ typedef FT_Error
+ (*TT_CharMap_Load_Func)( TT_Face face,
+ void* cmap,
+ FT_Stream input );
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* TT_CharMap_Free_Func */
+ /* */
+ /* <Description> */
+ /* Destroys a character mapping table. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to the parent face object. */
+ /* */
+ /* cmap :: A handle to a cmap object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ typedef FT_Error
+ (*TT_CharMap_Free_Func)( TT_Face face,
+ void* cmap );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
/*************************************************************************/
/* */
/* <FuncType> */
@@ -503,50 +651,81 @@ FT_BEGIN_HEADER
FT_Module_Requester get_interface;
TT_Load_Any_Func load_any;
-
- /* load the font directory, i.e., the offset table and */
- /* the table directory */
- TT_Load_Table_Func load_font_dir;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ TT_Load_SFNT_HeaderRec_Func load_sfnt_header;
+ TT_Load_Directory_Func load_directory;
+#endif
/* these functions are called by `load_face' but they can also */
/* be called from external modules, if there is a need to do so */
TT_Load_Table_Func load_head;
TT_Load_Metrics_Func load_hhea;
- TT_Load_Metrics_Func load_hmtx;
TT_Load_Table_Func load_cmap;
TT_Load_Table_Func load_maxp;
TT_Load_Table_Func load_os2;
TT_Load_Table_Func load_post;
+
TT_Load_Table_Func load_name;
TT_Free_Table_Func free_name;
/* optional tables */
- TT_Load_Table_Func load_kern;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ TT_Load_Table_Func load_hdmx_stub;
+ TT_Free_Table_Func free_hdmx_stub;
+#endif
+ TT_Load_Table_Func load_kern; /* a.k.a load_kerning <= 2.1.10 */
+
TT_Load_Table_Func load_gasp;
TT_Load_Table_Func load_pclt;
/* see `ttload.h' */
- TT_Load_Table_Func load_bhed;
+ TT_Load_Table_Func load_bhed; /* a.k.a load_bitmap_header <= 2.1.10 */
/* see `ttsbit.h' */
- TT_Load_Table_Func load_eblc;
- TT_Free_Table_Func free_eblc;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub;
+ TT_Load_Table_Func load_sbits_stub;
+#endif
- TT_Set_SBit_Strike_Func set_sbit_strike;
- TT_Load_Strike_Metrics_Func load_strike_metrics;
- TT_Find_SBit_Image_Func find_sbit_image;
- TT_Load_SBit_Metrics_Func load_sbit_metrics;
TT_Load_SBit_Image_Func load_sbit_image;
-
- /* see `ttkern.h' */
- TT_Face_GetKerningFunc get_kerning;
-
- TT_Get_Metrics_Func get_metrics;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ TT_Free_Table_Func free_sbits_stub;
+#endif
/* see `ttpost.h' */
TT_Get_PS_Name_Func get_psname;
TT_Free_Table_Func free_psnames;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS /* the following disappeared in 2.1.8, but were there before */
+ TT_CharMap_Load_Func load_charmap_stub;
+ TT_CharMap_Free_Func free_charmap_stub;
+#endif
+
+ /* from here, the structure differs from 2.1.7 */
+
+ /* since FT 2.1.8, but appeared before 'get_psname' */
+ TT_Face_GetKerningFunc get_kerning;
+
+ /* the following appeared in 2.1.8, but were placed
+ * between 'load_sbits' and 'load_sbit_image'. BOOOOH
+ */
+ TT_Find_SBit_Image_Func find_sbit_image; /* NULL if FT_OPTIMIZE_MEMORY */
+ TT_Load_SBit_Metrics_Func load_sbit_metrics; /* NULL if FT_OPTIMIZE_MEMORY */
+
+ /* since FreeType 2.2 */
+ /* load the font directory, i.e., the offset table and */
+ /* the table directory */
+ TT_Load_Table_Func load_font_dir;
+ TT_Load_Metrics_Func load_hmtx;
+
+ TT_Load_Table_Func load_eblc;
+ TT_Free_Table_Func free_eblc;
+
+ TT_Set_SBit_Strike_Func set_sbit_strike;
+ TT_Load_Strike_Metrics_Func load_strike_metrics;
+
+ TT_Get_Metrics_Func get_metrics;
+
} SFNT_Interface;
diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h
index 66bf0d9..d66d109 100644
--- a/include/freetype/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
@@ -200,7 +200,9 @@ FT_BEGIN_HEADER
const void* afm_data;
FT_CharMapRec charmaprecs[2];
FT_CharMap charmaps[2];
- PS_UnicodesRec unicode_map;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ PS_Unicodes unicode_map; /* apparently unused, keep for old internals */
+#endif
/* support for Multiple Masters fonts */
PS_Blend blend;
@@ -218,13 +220,15 @@ FT_BEGIN_HEADER
void* psaux;
CID_FaceInfoRec cid;
void* afm_data;
- FT_Byte* binary_data; /* used if hex data has been converted */
- FT_Stream cid_stream;
CID_Subrs subrs;
/* since FT 2.1 - interface to PostScript hinter */
void* pshinter;
+ /* since FT 2.1.8, but was originally after 'afm_data' */
+ FT_Byte* binary_data; /* used if hex data has been converted */
+ FT_Stream cid_stream;
+
} CID_FaceRec;
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 4b6b88d..3e71b30 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -311,7 +311,7 @@ FT_BEGIN_HEADER
} TT_GaspRec;
-#ifndef FT_OPTIMIZE_MEMORY
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*************************************************************************/
/* */
@@ -389,7 +389,7 @@ FT_BEGIN_HEADER
} TT_Kern0_PairRec, *TT_Kern0_Pair;
-#endif /* !OPTIMIZE_MEMORY */
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/
@@ -1267,19 +1267,14 @@ FT_BEGIN_HEADER
TT_Header header; /* TrueType header table */
TT_HoriHeader horizontal; /* TrueType horizontal header */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* horz_metrics;
- FT_ULong horz_metrics_size;
-#endif
TT_MaxProfile max_profile;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_ULong max_components; /* stubbed to 0 */
+#endif
FT_Bool vertical_info;
TT_VertHeader vertical; /* TT Vertical header, if present */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* vert_metrics;
- FT_ULong vert_metrics_size;
-#endif
FT_UShort num_names; /* number of name records */
TT_NameTableRec name_table; /* name table */
@@ -1314,13 +1309,7 @@ FT_BEGIN_HEADER
/***********************************************************************/
/* horizontal device metrics */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* hdmx_table;
- FT_ULong hdmx_table_size;
- FT_UInt hdmx_record_count;
- FT_ULong hdmx_record_size;
- FT_Byte* hdmx_record_sizes;
-#else
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
TT_HdmxRec hdmx;
#endif
@@ -1331,11 +1320,7 @@ FT_BEGIN_HEADER
TT_PCLT pclt;
/* embedded bitmaps support */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* sbit_table;
- FT_ULong sbit_table_size;
- FT_UInt sbit_num_strikes;
-#else
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_ULong num_sbit_strikes;
TT_SBit_Strike sbit_strikes;
#endif
@@ -1354,16 +1339,11 @@ FT_BEGIN_HEADER
/***********************************************************************/
/* the glyph locations */
-#ifdef FT_OPTIMIZE_MEMORY
- FT_UInt num_locations;
- FT_Byte* glyph_locations;
-#else
- FT_UShort num_locations;
- FT_Long* glyph_locations;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_UShort num_locations_stub;
+ FT_Long* glyph_locations_stub;
#endif
- FT_ULong glyf_len;
-
/* the font program, if any */
FT_ULong font_program_size;
FT_Byte* font_program;
@@ -1376,13 +1356,7 @@ FT_BEGIN_HEADER
FT_ULong cvt_size;
FT_Short* cvt;
-#ifdef FT_OPTIMIZE_MEMORY
- FT_Byte* kern_table;
- FT_ULong kern_table_size;
- FT_UInt num_kern_tables;
- FT_UInt32 kern_avail_bits;
- FT_UInt32 kern_order_bits;
-#else
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/* the format 0 kerning table, if any */
FT_Int num_kern_pairs;
FT_Int kern_table_index;
@@ -1398,15 +1372,6 @@ FT_BEGIN_HEADER
FT_Bool unpatented_hinting;
#endif
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_Bool doblend;
- GX_Blend blend;
-#endif
-
-#ifdef TT_CONFIG_OPTION_BDF
- TT_BDFRec bdf;
-#endif /* TT_CONFIG_OPTION_BDF */
-
/***********************************************************************/
/* */
/* Other tables or fields. This is used by derivative formats like */
@@ -1418,6 +1383,48 @@ FT_BEGIN_HEADER
const char* postscript_name;
+ /* since FreeType 2.1.8, but was originally placed after 'glyph_locations_stub' */
+ FT_ULong glyf_len;
+
+ /* since FreeType 2.1.8, but was originally placed before 'extra' */
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+ FT_Bool doblend;
+ GX_Blend blend;
+#endif
+
+ /* since FreeType 2.2 */
+
+#ifdef FT_OPTIMIZE_MEMORY
+ FT_Byte* horz_metrics;
+ FT_ULong horz_metrics_size;
+
+ FT_Byte* vert_metrics;
+ FT_ULong vert_metrics_size;
+
+ FT_UInt num_locations;
+ FT_Byte* glyph_locations;
+
+ FT_Byte* hdmx_table;
+ FT_ULong hdmx_table_size;
+ FT_UInt hdmx_record_count;
+ FT_ULong hdmx_record_size;
+ FT_Byte* hdmx_record_sizes;
+
+ FT_Byte* sbit_table;
+ FT_ULong sbit_table_size;
+ FT_UInt sbit_num_strikes;
+
+ FT_Byte* kern_table;
+ FT_ULong kern_table_size;
+ FT_UInt num_kern_tables;
+ FT_UInt32 kern_avail_bits;
+ FT_UInt32 kern_order_bits;
+#endif
+
+#ifdef TT_CONFIG_OPTION_BDF
+ TT_BDFRec bdf;
+#endif /* TT_CONFIG_OPTION_BDF */
+
} TT_FaceRec;
@@ -1488,15 +1495,11 @@ FT_BEGIN_HEADER
FT_BBox bbox;
FT_Int left_bearing;
FT_Int advance;
- FT_Int top_bearing;
- FT_Int vadvance;
FT_Int linear;
FT_Bool linear_def;
FT_Bool preserve_pps;
FT_Vector pp1;
FT_Vector pp2;
- FT_Vector pp3;
- FT_Vector pp4;
FT_ULong glyf_offset;
@@ -1511,6 +1514,12 @@ FT_BEGIN_HEADER
/* for possible extensibility in other formats */
void* other;
+ /* since FT 2.1.8 */
+ FT_Int top_bearing;
+ FT_Int vadvance;
+ FT_Vector pp3;
+ FT_Vector pp4;
+
} TT_LoaderRec;
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 36064cd..4af1849 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -99,7 +99,7 @@
}
-#if 0
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/* documentation is in ftcalc.h */
@@ -130,7 +130,7 @@
return root;
}
-#endif /* 0 */
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
#ifdef FT_LONG64
diff --git a/src/base/ftdbgmem.c b/src/base/ftdbgmem.c
index 557a05c..77d50f7 100644
--- a/src/base/ftdbgmem.c
+++ b/src/base/ftdbgmem.c
@@ -891,7 +891,7 @@
FT_BASE_DEF( FT_Pointer )
- FT_Alloc_Debug( FT_Memory memory,
+ ft_mem_alloc_debug( FT_Memory memory,
FT_Long size,
FT_Error *p_error,
const char* file_name,
@@ -906,12 +906,12 @@
table->line_no = line_no;
}
- return FT_Alloc( memory, size, p_error );
+ return ft_mem_alloc( memory, size, p_error );
}
FT_BASE_DEF( FT_Pointer )
- FT_Realloc_Debug( FT_Memory memory,
+ ft_mem_realloc_debug( FT_Memory memory,
FT_Long current,
FT_Long size,
void* block,
@@ -928,12 +928,12 @@
table->line_no = line_no;
}
- return FT_Realloc( memory, current, size, block, p_error );
+ return ft_mem_realloc( memory, current, size, block, p_error );
}
FT_BASE_DEF( FT_Pointer )
- FT_QAlloc_Debug( FT_Memory memory,
+ ft_mem_qalloc_debug( FT_Memory memory,
FT_Long size,
FT_Error *p_error,
const char* file_name,
@@ -948,12 +948,12 @@
table->line_no = line_no;
}
- return FT_QAlloc( memory, size, p_error );
+ return ft_mem_qalloc( memory, size, p_error );
}
FT_BASE_DEF( FT_Pointer )
- FT_QRealloc_Debug( FT_Memory memory,
+ ft_mem_qrealloc_debug( FT_Memory memory,
FT_Long current,
FT_Long size,
void* block,
@@ -970,12 +970,12 @@
table->line_no = line_no;
}
- return FT_QRealloc( memory, current, size, block, p_error );
+ return ft_mem_qrealloc( memory, current, size, block, p_error );
}
FT_BASE_DEF( void )
- FT_Free_Debug( FT_Memory memory,
+ ft_mem_free_debug( FT_Memory memory,
const void *P,
const char* file_name,
FT_Long line_no )
@@ -989,7 +989,7 @@
table->line_no = line_no;
}
- FT_Free( memory, (void *)P );
+ ft_mem_free( memory, (void *)P );
}
@@ -997,7 +997,7 @@
FT_BASE_DEF( FT_Error )
- FT_Alloc_Debug( FT_Memory memory,
+ ft_mem_alloc_debug( FT_Memory memory,
FT_Long size,
void* *P,
const char* file_name,
@@ -1012,12 +1012,12 @@
table->line_no = line_no;
}
- return FT_Alloc( memory, size, P );
+ return ft_mem_alloc( memory, size, P );
}
FT_BASE_DEF( FT_Error )
- FT_Realloc_Debug( FT_Memory memory,
+ ft_mem_realloc_debug( FT_Memory memory,
FT_Long current,
FT_Long size,
void* *P,
@@ -1033,12 +1033,12 @@
table->line_no = line_no;
}
- return FT_Realloc( memory, current, size, P );
+ return ft_mem_realloc( memory, current, size, P );
}
FT_BASE_DEF( FT_Error )
- FT_QAlloc_Debug( FT_Memory memory,
+ ft_mem_qalloc_debug( FT_Memory memory,
FT_Long size,
void* *P,
const char* file_name,
@@ -1053,12 +1053,12 @@
table->line_no = line_no;
}
- return FT_QAlloc( memory, size, P );
+ return ft_mem_qalloc( memory, size, P );
}
FT_BASE_DEF( FT_Error )
- FT_QRealloc_Debug( FT_Memory memory,
+ ft_mem_qrealloc_debug( FT_Memory memory,
FT_Long current,
FT_Long size,
void* *P,
@@ -1074,12 +1074,12 @@
table->line_no = line_no;
}
- return FT_QRealloc( memory, current, size, P );
+ return ft_mem_qrealloc( memory, current, size, P );
}
FT_BASE_DEF( void )
- FT_Free_Debug( FT_Memory memory,
+ ft_mem_free_debug( FT_Memory memory,
FT_Pointer block,
const char* file_name,
FT_Long line_no )
@@ -1093,7 +1093,7 @@
table->line_no = line_no;
}
- FT_Free( memory, (void **)block );
+ ft_mem_free( memory, (void **)block );
}
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 7afd630..a6a62d6 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1734,7 +1734,7 @@
{
FT_Int i;
-
+
for ( i = 0; i < face->num_fixed_sizes; i++ )
{
FT_Bitmap_Size* bsize = face->available_sizes + i;
@@ -3674,5 +3674,61 @@
library->debug_hooks[hook_index] = debug_hook;
}
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ FT_BASE_DEF( FT_Error )
+ ft_stub_set_char_sizes( FT_Size size,
+ FT_F26Dot6 width,
+ FT_F26Dot6 height,
+ FT_UInt horz_res,
+ FT_UInt vert_res )
+ {
+ FT_Size_RequestRec req;
+ FT_Driver driver = size->face->driver;
+
+ if ( driver->clazz->request_size )
+ {
+ req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
+ req.width = width;
+ req.height = height;
+
+ if ( horz_res == 0 )
+ horz_res = vert_res;
+
+ if ( vert_res == 0 )
+ vert_res = horz_res;
+
+ if ( horz_res == 0 )
+ horz_res = vert_res = 72;
+
+ req.horiResolution = horz_res;
+ req.vertResolution = vert_res;
+
+ return driver->clazz->request_size( size, &req );
+ }
+ return 0;
+ }
+
+
+ FT_BASE_DEF( FT_Error )
+ ft_stub_set_pixel_sizes( FT_Size size,
+ FT_UInt width,
+ FT_UInt height )
+ {
+ FT_Size_RequestRec req;
+ FT_Driver driver = size->face->driver;
+
+ if ( driver->clazz->request_size )
+ {
+ req.type = FT_SIZE_REQUEST_TYPE_NOMINAL;
+ req.width = width << 6;
+ req.height = height << 6;
+ req.horiResolution = 0;
+ req.vertResolution = 0;
+
+ return driver->clazz->request_size( size, &req );
+ }
+ return 0;
+ }
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* END */
diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c
index b703323..86b5df6 100644
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -46,7 +46,7 @@
/* */
/* It is not necessary to do any error checking for the */
/* allocation-related functions. This will be done by the higher level */
- /* routines like FT_Alloc() or FT_Realloc(). */
+ /* routines like ft_mem_alloc() or ft_mem_realloc(). */
/* */
/*************************************************************************/
diff --git a/src/base/ftutil.c b/src/base/ftutil.c
index cb99f88..ef59353 100644
--- a/src/base/ftutil.c
+++ b/src/base/ftutil.c
@@ -50,13 +50,13 @@
FT_BASE_DEF( FT_Pointer )
- FT_Alloc( FT_Memory memory,
+ ft_mem_alloc( FT_Memory memory,
FT_Long size,
FT_Error *p_error )
{
FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL;
-
+
if ( size > 0 )
{
@@ -70,16 +70,16 @@
*p_error = error;
return block;
}
-
+
FT_BASE_DEF( FT_Pointer )
- FT_QAlloc( FT_Memory memory,
+ ft_mem_qalloc( FT_Memory memory,
FT_Long size,
FT_Error *p_error )
{
FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL;
-
+
if ( size > 0 )
{
@@ -91,28 +91,28 @@
*p_error = error;
return block;
}
-
+
FT_BASE_DEF( FT_Pointer )
- FT_Realloc( FT_Memory memory,
+ ft_mem_realloc( FT_Memory memory,
FT_Long current,
FT_Long size,
void* block,
FT_Error *p_error )
{
FT_Error error = FT_Err_Ok;
-
+
if ( size <= 0 )
{
- FT_Free( memory, block );
+ ft_mem_free( memory, block );
block = NULL;
}
else if ( current <= 0 )
{
FT_ASSERT( block == NULL );
-
- block = FT_Alloc( memory, size, &error );
+
+ block = ft_mem_alloc( memory, size, &error );
}
else
{
@@ -133,28 +133,28 @@
*p_error = error;
return block;
}
-
+
FT_BASE_DEF( FT_Pointer )
- FT_QRealloc( FT_Memory memory,
+ ft_mem_qrealloc( FT_Memory memory,
FT_Long current,
FT_Long size,
void* block,
FT_Error *p_error )
{
FT_Error error = FT_Err_Ok;
-
+
if ( size <= 0 )
{
- FT_Free( memory, block );
+ ft_mem_free( memory, block );
block = NULL;
}
else if ( current <= 0 )
{
FT_ASSERT( block == NULL );
-
- block = FT_QAlloc( memory, size, &error );
+
+ block = ft_mem_qalloc( memory, size, &error );
}
else
{
@@ -170,15 +170,15 @@
*p_error = error;
return block;
- }
+ }
FT_BASE_DEF( void )
- FT_Free( FT_Memory memory,
+ ft_mem_free( FT_Memory memory,
const void *P )
{
if ( P )
memory->free( memory, (void*)P );
- }
+ }
#else /* !FT_STRICT_ALIASING */
@@ -187,7 +187,7 @@
/* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error )
- FT_Alloc( FT_Memory memory,
+ ft_mem_alloc( FT_Memory memory,
FT_Long size,
void* *P )
{
@@ -198,7 +198,7 @@
*P = memory->alloc( memory, size );
if ( !*P )
{
- FT_ERROR(( "FT_Alloc:" ));
+ FT_ERROR(( "ft_mem_alloc:" ));
FT_ERROR(( " Out of memory? (%ld requested)\n",
size ));
@@ -209,7 +209,7 @@
else
*P = NULL;
- FT_TRACE7(( "FT_Alloc:" ));
+ FT_TRACE7(( "ft_mem_alloc:" ));
FT_TRACE7(( " size = %ld, block = 0x%08p, ref = 0x%08p\n",
size, *P, P ));
@@ -220,7 +220,7 @@
/* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error )
- FT_QAlloc( FT_Memory memory,
+ ft_mem_qalloc( FT_Memory memory,
FT_Long size,
void* *P )
{
@@ -231,7 +231,7 @@
*P = memory->alloc( memory, size );
if ( !*P )
{
- FT_ERROR(( "FT_QAlloc:" ));
+ FT_ERROR(( "ft_mem_qalloc:" ));
FT_ERROR(( " Out of memory? (%ld requested)\n",
size ));
@@ -241,7 +241,7 @@
else
*P = NULL;
- FT_TRACE7(( "FT_QAlloc:" ));
+ FT_TRACE7(( "ft_mem_qalloc:" ));
FT_TRACE7(( " size = %ld, block = 0x%08p, ref = 0x%08p\n",
size, *P, P ));
@@ -252,7 +252,7 @@
/* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error )
- FT_Realloc( FT_Memory memory,
+ ft_mem_realloc( FT_Memory memory,
FT_Long current,
FT_Long size,
void** P )
@@ -262,14 +262,14 @@
FT_ASSERT( P != 0 );
- /* if the original pointer is NULL, call FT_Alloc() */
+ /* if the original pointer is NULL, call ft_mem_alloc() */
if ( !*P )
- return FT_Alloc( memory, size, P );
+ return ft_mem_alloc( memory, size, P );
/* if the new block if zero-sized, clear the current one */
if ( size <= 0 )
{
- FT_Free( memory, P );
+ ft_mem_free( memory, P );
return FT_Err_Ok;
}
@@ -284,7 +284,7 @@
return FT_Err_Ok;
Fail:
- FT_ERROR(( "FT_Realloc:" ));
+ FT_ERROR(( "ft_mem_realloc:" ));
FT_ERROR(( " Failed (current %ld, requested %ld)\n",
current, size ));
return FT_Err_Out_Of_Memory;
@@ -294,7 +294,7 @@
/* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error )
- FT_QRealloc( FT_Memory memory,
+ ft_mem_qrealloc( FT_Memory memory,
FT_Long current,
FT_Long size,
void** P )
@@ -304,14 +304,14 @@
FT_ASSERT( P != 0 );
- /* if the original pointer is NULL, call FT_QAlloc() */
+ /* if the original pointer is NULL, call ft_mem_qalloc() */
if ( !*P )
- return FT_QAlloc( memory, size, P );
+ return ft_mem_qalloc( memory, size, P );
/* if the new block if zero-sized, clear the current one */
if ( size <= 0 )
{
- FT_Free( memory, P );
+ ft_mem_free( memory, P );
return FT_Err_Ok;
}
@@ -323,7 +323,7 @@
return FT_Err_Ok;
Fail:
- FT_ERROR(( "FT_QRealloc:" ));
+ FT_ERROR(( "ft_mem_qrealloc:" ));
FT_ERROR(( " Failed (current %ld, requested %ld)\n",
current, size ));
return FT_Err_Out_Of_Memory;
@@ -333,10 +333,10 @@
/* documentation is in ftmemory.h */
FT_BASE_DEF( void )
- FT_Free( FT_Memory memory,
+ ft_mem_free( FT_Memory memory,
void** P )
{
- FT_TRACE7(( "FT_Free:" ));
+ FT_TRACE7(( "ft_mem_free:" ));
FT_TRACE7(( " Freeing block 0x%08p, ref 0x%08p\n",
P, P ? *P : (void*)0 ));
@@ -561,5 +561,66 @@
return value;
}
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ FT_BASE_DEF( FT_Error )
+ FT_Alloc( FT_Memory memory,
+ FT_Long size,
+ void* *P )
+ {
+ FT_Error error;
+
+ (void)FT_ALLOC( *P, size );
+ return error;
+ }
+
+ FT_BASE_DEF( FT_Error )
+ FT_QAlloc( FT_Memory memory,
+ FT_Long size,
+ void* *p )
+ {
+ FT_Error error;
+
+ (void)FT_QALLOC( *p, size );
+ return error;
+ }
+
+ FT_BASE_DEF( FT_Error )
+ FT_Realloc( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* *P )
+ {
+ FT_Error error;
+
+ (void)FT_REALLOC( *P, current, size );
+ return error;
+ }
+
+
+ FT_BASE_DEF( FT_Error )
+ FT_QRealloc( FT_Memory memory,
+ FT_Long current,
+ FT_Long size,
+ void* *p )
+ {
+ FT_Error error;
+
+ (void)FT_QREALLOC( *p, current, size );
+ return error;
+ }
+
+ FT_BASE_DEF( void )
+ FT_Free( FT_Memory memory,
+ void* *P )
+ {
+ if ( *P )
+ {
+ ft_mem_free( memory, *P );
+ *P = NULL;
+ }
+ }
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* END */
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index 93592f5..39198eb 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -251,7 +251,7 @@ THE SOFTWARE.
{
if ( FT_ALLOC( face->style_name, ft_strlen( "Regular" ) + 1 ) )
return error;
-
+
ft_strcpy( face->style_name, "Regular" );
}
else
@@ -475,7 +475,7 @@ THE SOFTWARE.
(face->en_table[n]).enc = cur[n].encoding;
FT_TRACE4(( "idx %d, val 0x%lX\n", n, cur[n].encoding ));
(face->en_table[n]).glyph = (FT_Short)n;
-
+
if ( cur[n].encoding == font->default_char )
face->default_glyph = n;
}
@@ -639,6 +639,7 @@ THE SOFTWARE.
}
+
FT_CALLBACK_DEF( FT_Error )
BDF_Glyph_Load( FT_GlyphSlot slot,
FT_Size size,
@@ -704,7 +705,7 @@ THE SOFTWARE.
slot->metrics.width = bitmap->width << 6;
slot->metrics.height = bitmap->rows << 6;
- /*
+ /*
* XXX DWIDTH1 and VVECTOR should be parsed and
* used here, provided such fonts do exist.
*/
@@ -837,14 +838,18 @@ THE SOFTWARE.
0, /* FT_Slot_InitFunc */
0, /* FT_Slot_DoneFunc */
- BDF_Size_Request,
- BDF_Size_Select,
-
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
BDF_Glyph_Load,
0, /* FT_Face_GetKerningFunc */
0, /* FT_Face_AttachFunc */
0, /* FT_Face_GetAdvancesFunc */
+
+ BDF_Size_Request,
+ BDF_Size_Select
};
diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c
index 22ec06c..89d51c7 100644
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -256,7 +256,7 @@
/* remove a node from the cache manager */
- FT_LOCAL_DEF( void )
+ FT_BASE_DEF( void )
ftc_node_destroy( FTC_Node node,
FTC_Manager manager )
{
diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h
index 5c4741f..b0aa3e9 100644
--- a/src/cache/ftccback.h
+++ b/src/cache/ftccback.h
@@ -79,11 +79,11 @@
FT_LOCAL( void )
ftc_cache_done( FTC_Cache cache );
-
+#ifndef FT_CONFIG_OPTION_OLD_INTERNALS
FT_LOCAL( void )
ftc_node_destroy( FTC_Node node,
FTC_Manager manager );
-
+#endif
#endif /* __FTCCBACK_H__ */
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index 02b8148..c14378d 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -300,4 +300,5 @@
}
+
/* END */
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index ccb9eda..16b4158 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -677,5 +677,48 @@
node->ref_count--;
}
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ FT_EXPORT_DEF( FT_Error )
+ FTC_Manager_Lookup_Face( FTC_Manager manager,
+ FTC_FaceID face_id,
+ FT_Face *aface )
+ {
+ return FTC_Manager_LookupFace( manager, face_id, aface );
+ }
+
+
+ FT_EXPORT( FT_Error )
+ FTC_Manager_Lookup_Size( FTC_Manager manager,
+ FTC_Font font,
+ FT_Face *aface,
+ FT_Size *asize )
+ {
+ FTC_ScalerRec scaler;
+ FT_Error error;
+ FT_Size size;
+
+ scaler.face_id = font->face_id;
+ scaler.width = font->pix_width;
+ scaler.height = font->pix_height;
+ scaler.pixel = TRUE;
+ scaler.x_res = 0;
+ scaler.y_res = 0;
+
+ error = FTC_Manager_LookupSize( manager, &scaler, &size );
+ if ( error )
+ {
+ *aface = NULL;
+ *asize = NULL;
+ }
+ else
+ {
+ *aface = size->face;
+ *asize = size;
+ }
+ return error;
+ }
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* END */
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 3b09499..e90e2b0 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -313,8 +313,8 @@
/*
* TT CMAP INFO
*
- * If the charmap is a synthetic Unicode encoding cmap or
- * a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO
+ * If the charmap is a synthetic Unicode encoding cmap or
+ * a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO
* service defined in SFNT module.
*
* Otherwise call the service function in the sfnt module.
@@ -330,7 +330,7 @@
cmap_info->language = 0;
- if ( cmap->clazz != &cff_cmap_encoding_class_rec &&
+ if ( cmap->clazz != &cff_cmap_encoding_class_rec &&
cmap->clazz != &cff_cmap_unicode_class_rec )
{
FT_Face face = FT_CMAP_FACE( cmap );
@@ -433,19 +433,24 @@
cff_slot_init,
cff_slot_done,
- cff_size_request,
-
-#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
- cff_size_select,
-#else
- 0, /* FT_Size_SelectFunc */
-#endif
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
Load_Glyph,
cff_get_kerning,
0, /* FT_Face_AttachFunc */
- 0 /* FT_Face_GetAdvancesFunc */
+ 0, /* FT_Face_GetAdvancesFunc */
+
+ cff_size_request,
+
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+ cff_size_select
+#else
+ 0 /* FT_Size_SelectFunc */
+#endif
};
diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c
index 01378d5..5c5a729 100644
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -143,15 +143,20 @@
cid_slot_init,
cid_slot_done,
- cid_size_request,
- 0, /* FT_Size_SelectFunc */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
cid_slot_load_glyph,
0, /* FT_Face_GetKerningFunc */
0, /* FT_Face_AttachFunc */
- 0 /* FT_Face_GetAdvancesFunc */
+ 0, /* FT_Face_GetAdvancesFunc */
+
+ cid_size_request,
+ 0 /* FT_Size_SelectFunc */
};
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index 719e58f..91de2b2 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -643,14 +643,18 @@ THE SOFTWARE.
0, /* FT_Slot_InitFunc */
0, /* FT_Slot_DoneFunc */
- PCF_Size_Request,
- PCF_Size_Select,
-
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
PCF_Glyph_Load,
0, /* FT_Face_GetKerningFunc */
0, /* FT_Face_AttachFunc */
- 0 /* FT_Face_GetAdvancesFunc */
+ 0, /* FT_Face_GetAdvancesFunc */
+
+ PCF_Size_Request,
+ PCF_Size_Select
};
diff --git a/src/pfr/pfrdrivr.c b/src/pfr/pfrdrivr.c
index 2183a69..4020672 100644
--- a/src/pfr/pfrdrivr.c
+++ b/src/pfr/pfrdrivr.c
@@ -190,13 +190,17 @@
pfr_slot_init,
pfr_slot_done,
- 0, /* FT_Size_RequestFunc */
- 0, /* FT_Size_SelectFunc */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
pfr_slot_load,
pfr_get_kerning,
0, /* FT_Face_AttachFunc */
- 0 /* FT_Face_GetAdvancesFunc */
+ 0, /* FT_Face_GetAdvancesFunc */
+ 0, /* FT_Size_RequestFunc */
+ 0, /* FT_Size_SelectFunc */
};
diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c
index bbb6c01..4c3579f 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -107,15 +107,15 @@
&ps_parser_funcs,
&t1_builder_funcs,
&t1_decoder_funcs,
+ t1_decrypt,
+
+ (const T1_CMap_ClassesRec*) &t1_cmap_classes,
+
#ifndef T1_CONFIG_OPTION_NO_AFM
&afm_parser_funcs,
#else
0,
#endif
-
- t1_decrypt,
-
- (const T1_CMap_ClassesRec*) &t1_cmap_classes,
};
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 829a57e..8895853 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -312,7 +312,7 @@
/* XXX: I don't know whether this is correct, since
* tt_face_find_bdf_prop only returns something correct if we have
- * previously selected a size that is listed in the BDF table.
+ * previously selected a size that is listed in the BDF table.
* Should we change the BDF table format to include single offsets
* for `CHARSET_REGISTRY' and `CHARSET_ENCODING'?
*/
@@ -376,6 +376,112 @@
}
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ FT_CALLBACK_DEF( FT_Error )
+ tt_face_load_sfnt_header_stub( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header header )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( stream );
+ FT_UNUSED( face_index );
+ FT_UNUSED( header );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ tt_face_load_directory_stub( TT_Face face,
+ FT_Stream stream,
+ SFNT_Header header )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( stream );
+ FT_UNUSED( header );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ tt_face_load_hdmx_stub( TT_Face face,
+ FT_Stream stream )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( stream );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+
+ FT_CALLBACK_DEF( void )
+ tt_face_free_hdmx_stub( TT_Face face )
+ {
+ FT_UNUSED( face );
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ tt_face_set_sbit_strike_stub( TT_Face face,
+ FT_UInt x_ppem,
+ FT_UInt y_ppem,
+ FT_ULong* astrike_index )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( x_ppem );
+ FT_UNUSED( y_ppem );
+
+ *astrike_index = 0x7FFFFFFFUL;
+ return FT_Err_Unimplemented_Feature;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ tt_face_load_sbit_stub( TT_Face face,
+ FT_Stream stream )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( stream );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+
+ FT_CALLBACK_DEF( void )
+ tt_face_free_sbit_stub( TT_Face face )
+ {
+ FT_UNUSED( face );
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ tt_face_load_charmap_stub( TT_Face face,
+ void* cmap,
+ FT_Stream input )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( cmap );
+ FT_UNUSED( input );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ tt_face_free_charmap_stub( TT_Face face,
+ void* cmap )
+ {
+ FT_UNUSED( face );
+ FT_UNUSED( cmap );
+
+ return 0;
+ }
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
static
const SFNT_Interface sfnt_interface =
{
@@ -387,11 +493,14 @@
sfnt_get_interface,
tt_face_load_any,
- tt_face_load_font_dir,
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ tt_face_load_sfnt_header_stub,
+ tt_face_load_directory_stub,
+#endif
tt_face_load_head,
tt_face_load_hhea,
- tt_face_load_hmtx,
tt_face_load_cmap,
tt_face_load_maxp,
tt_face_load_os2,
@@ -400,62 +509,82 @@
tt_face_load_name,
tt_face_free_name,
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ tt_face_load_hdmx_stub,
+ tt_face_free_hdmx_stub,
+#endif
+
tt_face_load_kern,
tt_face_load_gasp,
tt_face_load_pclt,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-
/* see `ttload.h' */
tt_face_load_bhed,
-
-
- /* see `ttsbit.h' and `sfnt.h' */
- tt_face_load_eblc,
- tt_face_free_eblc,
-
- tt_face_set_sbit_strike,
- tt_face_load_strike_metrics,
-#ifdef FT_OPTIMIZE_MEMORY
- 0,
- 0,
#else
- tt_find_sbit_image,
- tt_load_sbit_metrics,
+ 0,
#endif
- tt_face_load_sbit_image,
-#else /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ tt_face_set_sbit_strike_stub,
+ tt_face_load_sbit_stub,
+#endif
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+ tt_face_load_sbit_image,
+#else /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
-
-#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
-
- /* see `ttkern.h' */
- tt_face_get_kerning,
+#endif /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
- tt_face_get_metrics,
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ tt_face_free_sbit_stub,
+#endif
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
-
/* see `ttpost.h' */
tt_face_get_ps_name,
tt_face_free_ps_names,
-
#else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+ 0,
+ 0,
+#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ tt_face_load_charmap_stub,
+ tt_face_free_charmap_stub,
+#endif
+
+ /* since FT 2.1.8 */
+
+ tt_face_get_kerning,
+
+# ifndef FT_OPTIMIZE_MEMORY
+ tt_find_sbit_image,
+ tt_load_sbit_metrics,
+# else
0,
0,
+# endif
-#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+ /* since FT 2.2 */
+ tt_face_load_font_dir,
+ tt_face_load_hmtx,
+
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+ /* see `ttsbit.h' and `sfnt.h' */
+ tt_face_load_eblc,
+ tt_face_free_eblc,
+
+ tt_face_set_sbit_strike,
+ tt_face_load_strike_metrics,
+#else
+ 0,
+ 0,
+ 0,
+ 0,
+#endif
+ tt_face_get_metrics
};
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 037480b..4a7e66b 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -113,7 +113,7 @@
if ( sfnt )
kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph );
-
+
return 0;
}
@@ -365,18 +365,22 @@
tt_slot_init,
0, /* FT_Slot_DoneFunc */
- tt_size_request,
-#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
- tt_size_select,
-#else
- 0, /* FT_Size_SelectFunc */
-#endif
-
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
Load_Glyph,
tt_get_kerning,
0, /* FT_Face_AttachFunc */
- 0 /* FT_Face_GetAdvancesFunc */
+ 0, /* FT_Face_GetAdvancesFunc */
+
+ tt_size_request,
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+ tt_size_select
+#else
+ 0 /* FT_Size_SelectFunc */
+#endif
};
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 09be57d..806d35d 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -306,8 +306,10 @@
(FT_Slot_InitFunc) T1_GlyphSlot_Init,
(FT_Slot_DoneFunc) T1_GlyphSlot_Done,
- (FT_Size_RequestFunc) T1_Size_Request,
- (FT_Size_SelectFunc) 0,
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
(FT_Slot_LoadFunc) T1_Load_Glyph,
#ifdef T1_CONFIG_OPTION_NO_AFM
@@ -317,7 +319,9 @@
(FT_Face_GetKerningFunc) Get_Kerning,
(FT_Face_AttachFunc) T1_Read_Metrics,
#endif
- (FT_Face_GetAdvancesFunc) 0
+ (FT_Face_GetAdvancesFunc) 0,
+ (FT_Size_RequestFunc) T1_Size_Request,
+ (FT_Size_SelectFunc) 0
};
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 74b925a..fae69c1 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -115,8 +115,8 @@
FT_Size_Request req )
{
PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size );
-
-
+
+
FT_Request_Metrics( size->root.face, req );
if ( funcs )
@@ -240,8 +240,11 @@
#endif
/* release unicode map, if any */
- FT_FREE( face->unicode_map.maps );
- face->unicode_map.num_maps = 0;
+#if 0
+ FT_FREE( face->unicode_map_rec.maps );
+ face->unicode_map_rec.num_maps = 0;
+ face->unicode_map = NULL;
+#endif
face->root.family_name = 0;
face->root.style_name = 0;
diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c
index b293e18..e3c4697 100644
--- a/src/type42/t42drivr.c
+++ b/src/type42/t42drivr.c
@@ -229,14 +229,18 @@
(FT_Slot_InitFunc) T42_GlyphSlot_Init,
(FT_Slot_DoneFunc) T42_GlyphSlot_Done,
- (FT_Size_RequestFunc) T42_Size_Request,
- (FT_Size_SelectFunc) T42_Size_Select,
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
(FT_Slot_LoadFunc) T42_GlyphSlot_Load,
(FT_Face_GetKerningFunc) 0,
(FT_Face_AttachFunc) 0,
- (FT_Face_GetAdvancesFunc) 0
+ (FT_Face_GetAdvancesFunc) 0,
+ (FT_Size_RequestFunc) T42_Size_Request,
+ (FT_Size_SelectFunc) T42_Size_Select
};
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 8f74300..553cddb 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -479,7 +479,7 @@
bsize->y_ppem = FT_MulDiv( bsize->size, y_res, 72 );
bsize->y_ppem = FT_PIX_ROUND( bsize->y_ppem );
- /*
+ /*
* this reads:
*
* the nominal height is larger than the bbox's height
@@ -801,13 +801,18 @@
(FT_Slot_InitFunc) 0,
(FT_Slot_DoneFunc) 0,
- (FT_Size_RequestFunc) FNT_Size_Request,
- (FT_Size_SelectFunc) FNT_Size_Select,
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+ ft_stub_set_char_sizes,
+ ft_stub_set_pixel_sizes,
+#endif
(FT_Slot_LoadFunc) FNT_Load_Glyph,
(FT_Face_GetKerningFunc) 0,
(FT_Face_AttachFunc) 0,
- (FT_Face_GetAdvancesFunc) 0
+ (FT_Face_GetAdvancesFunc) 0,
+
+ (FT_Size_RequestFunc) FNT_Size_Request,
+ (FT_Size_SelectFunc) FNT_Size_Select
};