formatting - removed trailing spaces
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105
diff --git a/BUILD b/BUILD
index ccaa15b..9a03572 100644
--- a/BUILD
+++ b/BUILD
@@ -17,19 +17,19 @@ I. QUICK COMMAND-LINE GUIDE:
----------------------------
Install GNU Make, then try the following on Unix or any system with gcc:
-
+
make // this will setup the build
make // this will build the library
-
+
On Win32+Visual C++:
-
+
make setup visualc // setup the build for VisualC++ on Win32
make // build the library
-
+
Then, go to the "demos" directory and type
-
+
make
-
+
To compile the demo programs..
If this doesn't work, read the following..
@@ -45,58 +45,58 @@ II. COMMAND-LINE COMPILATION:
FreeType 2 includes a powerful and flexible build system that allows you
to easily compile it on a great variety of platforms from the command
line. To do so, just follow these simple instructions:
-
+
a/ Install GNU Make:
-
+
Because GNU Make is the only Make tool supported to compile FreeType 2,
you should install it on your machine.
Because the FT2 build system relies on many important features of GNU
Make, trying to build the library with any other Make tool will *fail*.
-
+
b/ Invoke "make":
-
+
Go to the root FT2 directory, then simply invoke GNU Make from the
command line, this will launch the FreeType 2 Host Platform detection
routines. A summary will be displayed, for example, on Win32:
-
+
========================================================================
FreeType build system -- automatic system detection
-
+
The following settings are used:
-
+
platform win32
compiler gcc
configuration directory ./config/win32
- configuration rules ./config/win32/w32-gcc.mk
-
+ configuration rules ./config/win32/w32-gcc.mk
+
If this does not correspond to your system or settings please remove
the file 'config.mk' from this directory then read the INSTALL file
for help.
-
+
Otherwise, simply type 'make' again to build the library.
=========================================================================
-
+
If the detected settings correspond to your platform and compiler,
skip to step e/. Note that if your platform is completely alien to
the build system, the detected platform will be "ansi".
-
-
+
+
c/ Configure the build system for a different compiler:
If the build system correctly detected your platform, but you want to
use a different compiler than the one specified in the summary (for
most platforms, gcc is the defaut compiler), simply invoke GNU Make
like :
-
+
make setup <compiler>
-
+
For example:
-
+
to use Visual C++ on Win32, type: "make setup visualc"
to use LCC-Win32 on Win32, type: "make setup lcc"
-
+
The <compiler> name to use is platform-dependent. The list of available
compilers for your system is available in the file
"config/<system>/detect.mk" (note that we hope to make the list
@@ -106,50 +106,50 @@ II. COMMAND-LINE COMPILATION:
d/ Configure the build system for an unknown platform/compiler:
-
+
What the auto-detection/setup phase of the build system does is simply
copy a file to the current directory under the name "config.mk".
-
+
For example, on OS/2+gcc, it would simply copy "config/os2/os2-gcc.mk"
to "./config.mk"
-
+
If for some reason your platform isn't correctly detected, simply copy
manually the configuration sub-makefile to "./config.mk" and go to
step e/.
-
+
Note that this file is a sub-Makefile used to specify Make variables
used to invoke the compiler and linker during the build, you can easily
create your own version from one of the existing configuration files,
then copy it to the current directory under the name "./config.mk".
-
-
+
+
e/ Build the library:
-
+
The auto-detection/setup phase should have copied a file in the current
directory, called "./config.mk". This file contains definitions of various
Make variables used to invoke the compiler and linker during the build.
-
+
To launch the build, simply invoke GNU Make again: the top Makefile will
detect the configuration file and run the build with it..
-
-
+
+
f/ Build the demonstration programs:
-
+
Once the library is compiled, go to "demos", then invoke GNU Make.
-
+
Note that the demonstration programs include a tiny graphics sub-system
that includes "drivers" to display Windows on Win32, X11 and OS/2. The
build system should automatically detect which driver to use based on
the current platform.
UNIX USERS TAKE NOTE: XXXXXX
-
+
When building the demos, the build system tries to detect your X11 path
by looking for the patterns "X11R5/bin", "X11R6/bin" or "X11/bin" in
your current path. If no X11 path is found, the demo programs will not
be able to display graphics and will fail. Change your current path
if you encounter this problem.
-
+
Note that the release version will use Autoconf to detect everything
on Unix, so this will not be necessary !!
@@ -165,7 +165,7 @@ II. DETAILED COMPILATION PROCEDURE:
Each component must be compiled as a stand-alone object file, even when it
is really made of several C source files. For example, the "base layer"
component is made of the following C files:
-
+
src/
base/
ftcalc.c - computations
@@ -174,10 +174,10 @@ II. DETAILED COMPILATION PROCEDURE:
ftlist.c - simple list management
ftoutln.c - simple outline processing
ftextend.c - extensions support
-
+
However, you can create a single object file by compiling the file
"src/base/ftbase.c", whose content is:
-
+
#include <ftcalc.c>
#include <ftobjs.c>
#include <ftstream.c>
@@ -187,7 +187,7 @@ II. DETAILED COMPILATION PROCEDURE:
Similarly, each component has a single "englobing" C file to compile it
as a stand-alone object, i.e. :
-
+
src/base/ftbase.c - the base layer, high-level interface
src/sfnt/sfnt.c - the "sfnt" module
src/psnames/psnames.c - the Postscript Names module
@@ -196,9 +196,9 @@ II. DETAILED COMPILATION PROCEDURE:
To compile one component, do the following:
-
+
- add the top-level "include" directory to your compilation include path
-
+
- add the component's path to your compilation include path too. Being
in the component's directory isn't enough !!
@@ -206,18 +206,18 @@ II. DETAILED COMPILATION PROCEDURE:
For example, the following line can be used to compile the truetype driver
on Unix:
-
+
cd freetype2/
cc -c -Iinclude -Isrc/truetype src/truetype/truetype.c
Alternatively:
-
+
cd freetype2/src/truetype
cc -c -I../../include -I. src/truetype/truetype.c
The complete list of files to compile for a feature-complete build of
FreeType 2 is:
-
+
src/base/ftsystem.c - system-specific memory and i/o support
src/base/ftinit.c - initialisation layer
src/base/ftdebug.c - debugging component (empty in release build)
diff --git a/CHANGES b/CHANGES
index 7178efc..f1d4389 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-LATEST CHANGES -
+LATEST CHANGES -
- tagged "BETA-6" in the CVS tree. This one is a serious release candidate
even though it doesn't incorporate the auto-hinter yet..
@@ -9,7 +9,7 @@ LATEST CHANGES -
+ re-enable support for 5-gray levels anti-aliasing (suck, suck..)
- created new header files, and modified sources accordingly:
-
+
<freetype/fttypes.h> - simple FreeType types, without the API
<freetype/internal/ftmemory.h> - definition of memory-management macros
@@ -26,15 +26,15 @@ LATEST CHANGES -
| It seems the C pre-processor that comes with LCC is broken, it
| doesn't recognize the ANSI standard directives # and ## correctly
| when one of the argument is a macro. Also, something like:
- |
+ |
| #define F(x) print##x
- |
+ |
| F(("hello"))
- |
+ |
| will get incorrectly translated to:
- |
+ |
| print "hello")
- |
+ |
| by its pre-processor. For this reason, you simply cannot build
| FreeType 2 in debug mode with this compiler..
@@ -42,12 +42,12 @@ LATEST CHANGES -
- yet another massive grunt work. I've changed the definition of the
EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take
an argument, which is the function's return value type.
-
+
This is necessary to compile FreeType as a DLL on Windows and OS/2.
Depending on the compiler used, a compiler-specific keyword like __export
or __system must be placed before (VisualC++) or after (BorlandC++)
the type..
-
+
Of course, this needed a lot of changes throughout the source code
to make it compile again... All cleaned up now, apparently..
@@ -80,7 +80,7 @@ LATEST CHANGES -
within it for more information.
- major directory hierarchy re-organisation. This was done for two things:
-
+
* first, to ease the "manual" compilation of the library by requiring
at lot less include paths :-)
@@ -90,19 +90,19 @@ LATEST CHANGES -
Basically, you should now use the 'freetype/' prefix for header inclusion,
as in:
-
+
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
Some new include sub-directories are available:
-
+
a. the "freetype/config" directory, contains two files used to
configure the build of the library. Client applications should
not need to look at these normally, but they can if they want.
-
+
#include <freetype/config/ftoption.h>
#include <freetype/config/ftconfig.h>
-
+
b. the "freetype/internal" directory, contains header files that
describes library internals. These are the header files that were
previously found in the "src/base" and "src/shared" directories.
@@ -110,9 +110,9 @@ LATEST CHANGES -
As usual, the build system and the demos have been updated to reflect
the change..
-
+
Here's a layout of the new directory hierarchy:
-
+
TOP
include/
freetype/
@@ -122,17 +122,17 @@ LATEST CHANGES -
ftoption.h
ftconfig.h
ftmodule.h
-
+
internal/
ftobjs.h
ftstream.h
ftcalc.h
...
-
+
src/
base/
...
-
+
sfnt/
psnames/
truetype/
@@ -142,7 +142,7 @@ LATEST CHANGES -
Compiling a module is now much easier, for example, the following should
work when in the TOP directory on an ANSI build:
-
+
gcc -c -I./include -I./src/base src/base/ftbase.c
gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
etc..
@@ -178,9 +178,9 @@ OLD CHANGES - 14-apr-2000
- fixed a bug in the TrueType glyph loader that prevented the correct
loading of some CJK glyphs in mingli.ttf
-
+
- improved the standard Type 1 hinter in "src/type1"
-
+
- fixed two bugs in the experimental Type 1 driver in "src/type1z"
to handle the new XFree86 4.0 fonts (and a few other ones..)
@@ -189,7 +189,7 @@ OLD CHANGES - 14-apr-2000
in "demos/src/ftgrays.c" and should move to the library itself
in the next beta.. NOTE: The smooth renderer doesn't compile in
stand-alone mode anymore, but this should be fixed RSN..
-
+
- introduced convenience functions to more easily deal with glyph
images, see "include/ftglyph.h" for more details, as well as the
new demo program named "demos/src/ftstring.c" that demonstrates
@@ -214,11 +214,11 @@ OLD CHANGES - 12-mar-2000
- changed the layout of configuration files : now, all ANSI configuration
files are located in "freetype2/config". System-specific over-rides
can be placed in "freetype2/config/<system>".
-
+
- moved all configuration macros to "config/ftoption.h"
-
+
- improvements in the Type 1 driver with AFM support
-
+
- changed the fields in the FT_Outline structure : the old "flags"
array is re-named "tags", while all ancient flags are encoded into
a single unsigned int named "flags".
@@ -230,10 +230,10 @@ OLD CHANGES - 12-mar-2000
- added a smooth anti-alias renderer to the demonstration programs
- added Mac graphics driver (thanks Just)
-
+
- FT_Open_Face changed in order to received a pointer to a FT_Open_Args
descriptor..
-
+
- various cleanups, a few more API functions implemented (see FT_Attach_File)
- updated some docs
@@ -314,11 +314,11 @@ OLDER CHANGES - 27-jan-2000
- updated the "sfnt" module interface to allow several SFNT-based
drivers to co-exist peacefully
-
+
- updated the "T1_Face" type to better separate Postscript font content
from the rest of the FT_Face structure. Might be used later by the
CFF/Type2 driver..
-
+
- added an experimental replacement Type 1 driver featuring advanced
(and speedy) pattern matching to retrieve the data from postscript
fonts.
@@ -351,27 +351,27 @@ High-Level Interface :
- resource objects have disappeared. this means that face objects can
now be created with a single function call (see FT_New_Face and
FT_Open_Face)
-
+
- when calling either FT_New_Face & FT_Open_Face, a size object and a
glyph slot object are automatically created for the face, and can be
accessed through "face->glyph" and "face->size" if one really needs to.
In most cases, there's no need to call FT_New_Size or FT_New_Glyph.
-
+
- similarly, FT_Load_Glyph now only takes a "face" argument (instead of
a glyph slot and a size). Also, it's "result" parameter is gone, as
the glyph image type is returned in the field "face->glyph.format"
-
+
- the list of available charmaps is directly accessible through
"face->charmaps", counting "face->num_charmaps" elements. Each
charmap has an 'encoding' field which specifies which known encoding
it deals with. Valid values are, for example :
-
+
ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
ft_encoding_apple_roman
ft_encoding_sjis
ft_encoding_adobe_standard
ft_encoding_adobe_expert
-
+
other values may be added in the future. Each charmap still holds its
"platform_id" and "encoding_id" values in case the encoding is too
exotic for the current library
@@ -510,7 +510,7 @@ Portability :
-----------------------------------------------------------------------------------------
Font Drivers :
-
+
The Font Driver interface has been modified in order to support
extensions & versioning.
@@ -561,10 +561,10 @@ Extensions support :
driver = FT_Get_Driver( library, "truetype" );
if (!driver) return FT_Err_Unimplemented_Feature;
- return FT_Register_Extension( driver, &extension_class );
+ return FT_Register_Extension( driver, &extension_class );
}
-
+
// Implementing the extensions
//
FT_Error FT_Proceed_Extension_XXX( FT_Face face )
diff --git a/demos/graph/graph.h b/demos/graph/graph.h
index e5f3b32..e09667d 100644
--- a/demos/graph/graph.h
+++ b/demos/graph/graph.h
@@ -33,7 +33,7 @@
/* initialisation */
extern int grInit( void );
-
+
/* finalisation */
extern void grDone( void );
@@ -52,13 +52,13 @@
gr_pixel_mode_rgb32, /* 32-bits mode - 16 million colors */
gr_pixel_mode_max /* don't remove */
-
+
} grPixelMode;
/* forward declaration of the surface class */
typedef struct grSurface_ grSurface;
-
+
/*********************************************************************
*
@@ -106,7 +106,7 @@
{
grPos x;
grPos y;
-
+
} grVector;
@@ -114,7 +114,7 @@
{
long value;
unsigned char chroma[4];
-
+
} grColor;
@@ -125,7 +125,7 @@
* grNewBitmap
*
* <Description>
- * creates a new bitmap
+ * creates a new bitmap
*
* <Input>
* pixel_mode :: the target surface's pixel_mode
@@ -163,7 +163,7 @@
* writes a given glyph bitmap to a target surface.
*
* <Input>
- * target :: handle to target bitmap
+ * target :: handle to target bitmap
* glyph :: handle to source glyph bitmap
* x :: position of left-most pixel of glyph image in target surface
* y :: position of top-most pixel of glyph image in target surface
@@ -185,7 +185,7 @@
* This function performs clipping
*
**********************************************************************/
-
+
extern int grBlitGlyphToBitmap( grBitmap* target,
grBitmap* glyph,
grPos x,
@@ -199,7 +199,7 @@
* grFillRectangle
*
* <Description>
- * this function is used to fill a given rectangle on a surface
+ * this function is used to fill a given rectangle on a surface
*
* <Input>
* surface :: handle to target surface
@@ -210,7 +210,7 @@
* color :: fill color
*
**********************************************************************/
-
+
extern void grFillRectangle( grBitmap* surface,
grPos x,
grPos y,
@@ -240,7 +240,7 @@
* color :: color to be used to draw the character
*
**********************************************************************/
-
+
extern
void grWriteCellChar( grBitmap* target,
int x,
@@ -262,14 +262,14 @@
* This function writes a string with the internal font
*
* <Input>
- * target :: handle to target bitmap
+ * target :: handle to target bitmap
* x :: x pixel position of string's top left corner
* y :: y pixel position of string's top left corner
* string :: Latin-1 text string
* color :: color to be used to draw the character
*
**********************************************************************/
-
+
extern
void grWriteCellString( grBitmap* target,
int x,
@@ -283,7 +283,7 @@
* grDoneBitmap
*
* <Description>
- * destroys a bitmap
+ * destroys a bitmap
*
* <Input>
* bitmap :: handle to bitmap descriptor
@@ -336,7 +336,7 @@
* client applications..
*
**********************************************************************/
-
+
typedef struct grDeviceChain_ grDeviceChain;
struct grDeviceChain_
@@ -372,7 +372,7 @@
* If no driver could be initialised, this function returns NULL.
*
**********************************************************************/
-
+
extern
grDeviceChain* grInitDevices( void );
@@ -411,12 +411,12 @@
* 2 and 256.
*
* the pixel modes do not provide the number of grays in the case
- * of "gray" devices. You should try to create a surface with the
+ * of "gray" devices. You should try to create a surface with the
* maximal number (256, that is) and see the value returned in
* the bitmap descriptor.
*
**********************************************************************/
-
+
extern void grGetDeviceModes( const char* device_name,
int *num_modes,
grPixelMode* *pixel_modes );
@@ -469,7 +469,7 @@
* you can thus discard the 'bitmap' parameter after the call.
*
**********************************************************************/
-
+
extern grSurface* grNewSurface( const char* device,
grBitmap* bitmap );
@@ -493,7 +493,7 @@
* height :: rectangle height in pixels
*
**********************************************************************/
-
+
extern void grRefreshRectangle( grSurface* surface,
grPos x,
grPos y,
@@ -508,7 +508,7 @@
*
* <Description>
* a variation of grRefreshRectangle which repaints the whole surface
- * to the screen.
+ * to the screen.
*
* <Input>
* surface :: handle to target surface
@@ -542,7 +542,7 @@
* color :: color to be used to draw the character
*
**********************************************************************/
-
+
extern
void grWriteSurfaceChar( grSurface* target,
int x,
@@ -567,14 +567,14 @@
* This function writes a string with the internal font
*
* <Input>
- * target :: handle to target bitmap
+ * target :: handle to target bitmap
* x :: x pixel position of string's top left corner
* y :: y pixel position of string's top left corner
* string :: Latin-1 text string
* color :: color to be used to draw the character
*
**********************************************************************/
-
+
extern
void grWriteSurfaceString( grSurface* target,
int x,
@@ -622,7 +622,7 @@
* XXX : For now, only keypresses are supported.
*
**********************************************************************/
-
+
extern
int grListenSurface( grSurface* surface,
int event_mask,
diff --git a/demos/graph/grblit.c b/demos/graph/grblit.c
index f0346e1..b8d1b6e 100644
--- a/demos/graph/grblit.c
+++ b/demos/graph/grblit.c
@@ -32,7 +32,7 @@
case gr_pixel_mode_pal4:
width = (width + 1) & -2;
break;
-
+
default:
;
}
@@ -82,7 +82,7 @@
case gr_pixel_mode_pal4:
target_width = (target_width + 1) & -2;
break;
-
+
default:
;
}
@@ -104,7 +104,7 @@
blit->read_line = blit->source.pitch;
blit->write_line = blit->target.pitch;
-
+
if ( blit->read_line < 0 )
blit->read -= (blit->source.rows-1) * blit->read_line;
@@ -247,7 +247,7 @@
{
if ( mask == 0x80 )
val = *_read++;
-
+
if ( val & mask )
*_write = (unsigned char)color.value;
@@ -344,7 +344,7 @@
unsigned int left_mask;
unsigned char* read;
unsigned char* write;
-
+
read = blit->read + (blit->xread >> 3);
write = blit->write + blit->xwrite*2;
@@ -396,7 +396,7 @@
unsigned int left_mask;
unsigned char* read;
unsigned char* write;
-
+
read = blit->read + (blit->xread >> 3);
write = blit->write + blit->xwrite*3;
@@ -452,7 +452,7 @@
unsigned int left_mask;
unsigned char* read;
unsigned char* write;
-
+
read = blit->read + (blit->xread >> 3);
write = blit->write + blit->xwrite*4;
@@ -523,19 +523,19 @@
{
int count;
const byte* table;
-
+
} grSaturation;
-
-
+
+
static
const byte gr_saturation_5[8] = { 0, 1, 2, 3, 4, 4, 4, 4 };
-
+
static
const byte gr_saturation_17[32] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
};
@@ -565,7 +565,7 @@
grError = gr_err_bad_argument;
return 0;
}
-
+
for ( ; sat < limit; sat++ )
{
if ( sat->count == num_grays )
@@ -574,25 +574,25 @@
return sat->table;
}
}
-
+
/* not found, simply create a new entry if there is room */
if (gr_num_saturations < GR_MAX_SATURATIONS)
{
int i;
const byte* table;
-
+
table = (const byte*)grAlloc( (3*num_grays-1)*sizeof(byte) );
if (!table) return 0;
-
+
sat->count = num_grays;
sat->table = table;
-
+
for ( i = 0; i < num_grays; i++, table++ )
- *(unsigned char*)table = (unsigned char)i;
-
+ *(unsigned char*)table = (unsigned char)i;
+
for ( i = 2*num_grays-1; i > 0; i--, table++ )
- *(unsigned char*)table = (unsigned char)(num_grays-1);
-
+ *(unsigned char*)table = (unsigned char)(num_grays-1);
+
gr_num_saturations++;
gr_last_saturation = sat;
return sat->table;
@@ -614,11 +614,11 @@
int target_grays;
int source_grays;
const byte* table;
-
+
} grConversion;
-
-
-
+
+
+
static
const byte gr_gray5_to_gray17[5] = { 0, 4, 8, 12, 16 };
@@ -654,13 +654,13 @@
{
grConversion* conv = gr_conversions;
grConversion* limit = conv + gr_num_conversions;
-
+
if ( target_grays < 2 || source_grays < 2 )
{
grError = gr_err_bad_argument;
return 0;
}
-
+
/* otherwise, scan table */
for ( ; conv < limit; conv++ )
{
@@ -671,7 +671,7 @@
return conv->table;
}
}
-
+
/* not found, add a new conversion to the table */
if (gr_num_conversions < GR_MAX_CONVERSIONS)
{
@@ -681,15 +681,15 @@
table = (const byte*)grAlloc( source_grays*sizeof(byte) );
if (!table)
return 0;
-
+
conv->target_grays = target_grays;
conv->source_grays = source_grays;
conv->table = table;
for ( n = 0; n < source_grays; n++ )
- ((unsigned char*)table)[n] = (unsigned char)(n*(target_grays-1)) /
+ ((unsigned char*)table)[n] = (unsigned char)(n*(target_grays-1)) /
(source_grays-1);
-
+
gr_num_conversions++;
gr_last_conversion = conv;
return table;
@@ -720,7 +720,7 @@
max1 = (unsigned char)(blit->source.grays-1);
max2 = (unsigned char)(blit->target.grays-1);
-
+
read = (unsigned char*)blit->read + blit->xread;
write = (unsigned char*)blit->write + blit->xwrite;
@@ -735,7 +735,7 @@
{
#ifdef GR_CONFIG_GRAY_SKIP_WHITE
unsigned char val = *_read;
-
+
if (val)
{
if (val == max)
@@ -750,7 +750,7 @@
_read++;
x--;
}
-
+
read += blit->read_line;
write += blit->write_line;
y--;
@@ -775,7 +775,7 @@
unsigned char max;
max = (unsigned char)(blit->source.grays-1);
-
+
read = (unsigned char*)blit->read + blit->xread;
write = (unsigned char*)blit->write + blit->xwrite;
@@ -790,7 +790,7 @@
{
#ifdef GR_CONFIG_GRAY_SKIP_WHITE
unsigned char val = *_read;
-
+
if (val)
{
if (val == max)
@@ -805,7 +805,7 @@
_read++;
x--;
}
-
+
read += blit->read_line;
write += blit->write_line;
y--;
@@ -834,7 +834,7 @@
color.chroma[0] = (pixel >> 10) & 0x1F; \
color.chroma[1] = (pixel >> 5) & 0x1F; \
color.chroma[2] = (pixel ) & 0x1F;
-
+
#define extract565( pixel, color ) \
color.chroma[0] = (pixel >> 11) & 0x1F; \
@@ -846,13 +846,13 @@
( ( (unsigned short)color.chroma[0] << 10 ) | \
( (unsigned short)color.chroma[1] << 5 ) | \
color.chroma[2] )
-
+
#define inject565( color ) \
( ( (unsigned short)color.chroma[0] << 11 ) | \
( (unsigned short)color.chroma[1] << 5 ) | \
color.chroma[2] )
-
+
/**************************************************************************/
/* */
@@ -872,7 +872,7 @@
read = blit->read + blit->xread;
write = blit->write + 2*blit->xwrite;
-
+
/* convert color to R:G:B triplet */
color2 = color.value;
extract555( color2, color );
@@ -887,12 +887,12 @@
while (x > 0)
{
unsigned char val;
-
+
val = *_read;
if (val)
{
unsigned short* pixel = (unsigned short*)_write;
-
+
if (val == max)
{
pixel[0] = (short)color2;
@@ -902,18 +902,18 @@
/* compose gray value */
unsigned short pix16 = *pixel;
grColor pix;
-
+
extract555( pix16, pix );
compose_pixel( pix, color, val, max );
*pixel = inject555(pix);
- }
+ }
}
_write += 2;
_read ++;
x--;
}
-
+
read += blit->read_line;
write += blit->write_line;
y--;
@@ -940,7 +940,7 @@
read = blit->read + blit->xread;
write = blit->write + 2*blit->xwrite;
-
+
color2 = color.value;
extract565( color2, color );
@@ -954,12 +954,12 @@
while (x > 0)
{
unsigned char val;
-
+
val = *_read;
if (val)
{
unsigned short* pixel = (unsigned short*)_write;
-
+
if (val == max)
{
pixel[0] = (short)color2;
@@ -970,17 +970,17 @@
unsigned short pix16 = *pixel;
grColor pix;
- extract565( pix16, pix );
+ extract565( pix16, pix );
compose_pixel( pix, color, val, max );
*pixel = inject565( pix );
- }
+ }
}
_write +=2;
_read ++;
x--;
}
-
+
read += blit->read_line;
write += blit->write_line;
y--;
@@ -1006,7 +1006,7 @@
read = blit->read + blit->xread;
write = blit->write + 3*blit->xwrite;
-
+
y = blit->height;
do
{
@@ -1017,7 +1017,7 @@
while (x > 0)
{
unsigned char val;
-
+
val = *_read;
if (val)
{
@@ -1031,23 +1031,23 @@
{
/* compose gray value */
grColor pix;
-
+
pix.chroma[0] = _write[0];
pix.chroma[1] = _write[1];
pix.chroma[2] = _write[2];
compose_pixel( pix, color, val, max );
-
+
_write[0] = pix.chroma[0];
_write[1] = pix.chroma[1];
_write[2] = pix.chroma[2];
- }
+ }
}
_write += 3;
_read ++;
x--;
}
-
+
read += blit->read_line;
write += blit->write_line;
y--;
@@ -1073,7 +1073,7 @@
read = blit->read + blit->xread;
write = blit->write + 4*blit->xwrite;
-
+
y = blit->height;
do
{
@@ -1084,7 +1084,7 @@
while (x > 0)
{
unsigned char val;
-
+
val = *_read;
if (val)
{
@@ -1099,23 +1099,23 @@
{
/* compose gray value */
grColor pix;
-
+
pix.chroma[0] = _write[0];
pix.chroma[1] = _write[1];
pix.chroma[2] = _write[2];
compose_pixel( pix, color, val, max );
-
+
_write[0] = pix.chroma[0];
_write[1] = pix.chroma[1];
_write[2] = pix.chroma[2];
- }
+ }
}
_write += 4;
_read ++;
x--;
}
-
+
read += blit->read_line;
write += blit->write_line;
y--;
@@ -1142,7 +1142,7 @@
* Error code. 0 means success
*
**********************************************************************/
-
+
typedef void (*grColorGlyphBlitter)( grBlitter* blit,
grColor color,
int max_gray );
@@ -1158,9 +1158,9 @@
blit_gray_to_565,
blit_gray_to_24,
blit_gray_to_32
- };
+ };
+
-
extern int grBlitGlyphToBitmap( grBitmap* target,
grBitmap* glyph,
grPos x,
@@ -1169,14 +1169,14 @@
{
grBlitter blit;
grPixelMode mode;
-
+
/* check arguments */
if (!target || !glyph)
{
grError = gr_err_bad_argument;
return -1;
}
-
+
/* set up blitter and compute clipping. Return immediately if needed */
blit.source = *glyph;
@@ -1185,7 +1185,7 @@
if ( compute_clips( &blit, x, y ) )
return 0;
-
+
/* handle monochrome bitmap blitting */
if (glyph->mode == gr_pixel_mode_mono)
@@ -1195,11 +1195,11 @@
grError = gr_err_bad_source_depth;
return -1;
}
-
+
gr_mono_blitters[mode]( &blit, color );
- goto End;
+ goto End;
}
-
+
/* handle gray bitmap composition */
if (glyph->mode == gr_pixel_mode_gray &&
glyph->grays > 1 )
@@ -1207,7 +1207,7 @@
int target_grays = target->grays;
int source_grays = glyph->grays;
const byte* saturation;
-
+
if ( mode == gr_pixel_mode_gray && target_grays > 1 )
{
/* rendering into a gray target - use special composition */
@@ -1235,7 +1235,7 @@
conversion = grGetConversion( target_grays, source_grays );
if (!conversion) return -3;
};
-
+
blit_gray_to_gray( &blit, saturation, conversion );
}
}
@@ -1248,18 +1248,18 @@
grError = gr_err_bad_target_depth;
return -1;
}
-
+
gr_color_blitters[mode]( &blit, color, source_grays-1 );
}
- goto End;
+ goto End;
}
-
+
/* we don't support the blitting of bitmaps of the following */
/* types : pal4, pal8, rgb555, rgb565, rgb24, rgb32 */
/* */
grError = gr_err_bad_source_depth;
return -2;
-
+
End:
return 0;
}
diff --git a/demos/graph/grdevice.c b/demos/graph/grdevice.c
index ba367dd..901f4e2 100644
--- a/demos/graph/grdevice.c
+++ b/demos/graph/grdevice.c
@@ -10,20 +10,20 @@
grDevice* find_device( const char* device_name )
{
int index = 0;
-
+
if (device_name)
{
for ( index = gr_num_devices-1; index > 0; index-- )
if ( strcmp( device_name, gr_device_chain[index].name ) == 0 )
break;
}
-
+
if ( index < 0 || gr_num_devices <= 0 || !gr_device_chain[index].device )
{
grError = gr_err_invalid_device;
return 0;
}
-
+
return gr_device_chain[index].device;
}
@@ -62,18 +62,18 @@
* 2 and 256.
*
* the pixel modes do not provide the number of grays in the case
- * of "gray" devices. You should try to create a surface with the
+ * of "gray" devices. You should try to create a surface with the
* maximal number (256, that is) and see the value returned in
* the bitmap descriptor.
*
**********************************************************************/
-
+
extern void grGetDeviceModes( const char* device_name,
int *num_modes,
grPixelMode* *pixel_modes )
{
grDevice* device;
-
+
*num_modes = 0;
*pixel_modes = 0;
@@ -132,7 +132,7 @@
* you can thus discard the 'bitmap' parameter after the call.
*
**********************************************************************/
-
+
extern grSurface* grNewSurface( const char* device_name,
grBitmap* bitmap )
{
@@ -145,7 +145,7 @@
surface = (grSurface*)grAlloc( device->surface_objsize );
if (!surface) return 0;
-
+
if ( !device->init_surface( surface, bitmap ) )
{
grFree( surface );
@@ -173,7 +173,7 @@
* height :: rectangle height in pixels
*
**********************************************************************/
-
+
extern void grRefreshRectangle( grSurface* surface,
grPos x,
grPos y,
@@ -185,7 +185,7 @@
}
-
+
/**********************************************************************
*
* <Function>
@@ -209,7 +209,7 @@
* color :: color to be used to draw the character
*
**********************************************************************/
-
+
extern
void grWriteSurfaceChar( grSurface* target,
int x,
@@ -239,14 +239,14 @@
* This function writes a string with the internal font
*
* <Input>
- * target :: handle to target bitmap
+ * target :: handle to target bitmap
* x :: x pixel position of string's top left corner
* y :: y pixel position of string's top left corner
* string :: Latin-1 text string
* color :: color to be used to draw the character
*
**********************************************************************/
-
+
extern
void grWriteSurfaceString( grSurface* target,
int x,
@@ -270,7 +270,7 @@
*
* <Description>
* a variation of grRefreshRectangle which repaints the whole surface
- * to the screen.
+ * to the screen.
*
* <Input>
* surface :: handle to target surface
@@ -330,7 +330,7 @@
* XXX : For now, only keypresses are supported.
*
**********************************************************************/
-
+
extern
int grListenSurface( grSurface* surface,
int event_mask,
@@ -348,12 +348,12 @@
{
/* first of all, call the device-specific destructor */
surface->done(surface);
-
+
/* then remove the bitmap if we're owner */
if (surface->owner)
grFree( surface->bitmap.buffer );
-
- surface->owner = 0;
+
+ surface->owner = 0;
surface->bitmap.buffer = 0;
grFree( surface );
}
diff --git a/demos/graph/grdevice.h b/demos/graph/grdevice.h
index a434609..9ffea16 100644
--- a/demos/graph/grdevice.h
+++ b/demos/graph/grdevice.h
@@ -108,14 +108,14 @@
{
int surface_objsize;
const char* device_name; /* name of device */
-
+
grDeviceInitFunc init;
grDeviceDoneFunc done;
grDeviceInitSurfaceFunc init_surface;
int num_pixel_modes;
- grPixelMode* pixel_modes;
+ grPixelMode* pixel_modes;
};
diff --git a/demos/graph/grevents.h b/demos/graph/grevents.h
index c32f75b..36dd52d 100644
--- a/demos/graph/grevents.h
+++ b/demos/graph/grevents.h
@@ -19,13 +19,13 @@
#define gr_event_mouse 0x3C
#define gr_event_key 0xC0
-#define gr_event_type (gr_event_mouse | gr_event_key)
+#define gr_event_type (gr_event_mouse | gr_event_key)
typedef enum grKey_
{
grKeyNone = 0,
-
+
grKeyF1,
grKeyF2,
grKeyF3,
@@ -38,12 +38,12 @@
grKeyF10,
grKeyF11,
grKeyF12,
-
+
grKeyLeft,
grKeyRight,
grKeyUp,
grKeyDown,
-
+
grKeyIns,
grKeyDel,
grKeyHome,
@@ -51,7 +51,7 @@
grKeyPageUp,
grKeyPageDown,
- grKeyEsc,
+ grKeyEsc,
grKeyTab,
grKeyBackSpace,
grKeyReturn,
@@ -59,7 +59,7 @@
grKeyMax,
grKeyForceShort = 0x7FFF /* this forces the grKey to be stored */
/* on at least one short ! */
-
+
} grKey;
#define grKEY(c) ((grKey)(c))
@@ -102,7 +102,7 @@
#define grKeyAt grKEY('@')
#define grKeyUnder grKEY('_')
-
+
typedef struct grEvent_
{
int type;
diff --git a/demos/graph/grfont.c b/demos/graph/grfont.c
index b96715e..9902423 100644
--- a/demos/graph/grfont.c
+++ b/demos/graph/grfont.c
@@ -283,12 +283,12 @@
{
if (charcode < 0 || charcode > 255)
return;
-
+
gr_charcell.buffer = (char*)font_8x8 + 8*charcode;
grBlitGlyphToBitmap( target, &gr_charcell, x, y, color );
}
-
-
+
+
void grWriteCellString( grBitmap* target,
int x,
int y,
@@ -302,7 +302,7 @@
x += 8;
}
}
-
+
static int gr_cursor_x = 0;
static int gr_cursor_y = 0;
static grBitmap* gr_text_bitmap = 0;
@@ -313,19 +313,19 @@
{
gr_text_bitmap = bitmap;
}
-
+
extern void grSetMargin( int right, int top )
{
gr_margin_top = top << 3;
gr_margin_right = right << 3;
}
-
+
extern void grGotoxy ( int x, int y )
{
gr_cursor_x = x;
gr_cursor_y = y;
}
-
+
extern void grWrite ( const char* string )
{
if (string)
@@ -338,11 +338,11 @@
gr_margin_top + (gr_cursor_y << 3),
string,
color );
-
+
gr_cursor_x += strlen(string);
}
}
-
+
extern void grLn()
{
gr_cursor_y ++;
@@ -355,4 +355,4 @@
grLn();
}
-
+
diff --git a/demos/graph/grfont.h b/demos/graph/grfont.h
index 1456af2..2697e00 100644
--- a/demos/graph/grfont.h
+++ b/demos/graph/grfont.h
@@ -11,6 +11,6 @@
extern void grWrite ( const char* string );
extern void grWriteln( const char* string );
- extern void grLn();
+ extern void grLn();
#endif /* GRFONT_H */
diff --git a/demos/graph/grinit.c b/demos/graph/grinit.c
index 3949885..4da1db6 100644
--- a/demos/graph/grinit.c
+++ b/demos/graph/grinit.c
@@ -62,7 +62,7 @@
device = chain->device;
if ( device->init() == 0 &&
gr_num_devices < GR_MAX_DEVICES )
-
+
{
/* successful device initialisation - add it to our chain */
cur->next = 0;
diff --git a/demos/graph/grobjs.c b/demos/graph/grobjs.c
index f2bdd2b..ae106dd 100644
--- a/demos/graph/grobjs.c
+++ b/demos/graph/grobjs.c
@@ -25,16 +25,16 @@
char* grAlloc( long size )
{
char* p;
-
+
p = (char*)malloc(size);
if (!p && size > 0)
{
- grError = gr_err_memory;
+ grError = gr_err_memory;
}
-
+
if (p)
memset( p, 0, size );
-
+
return p;
}
@@ -59,7 +59,7 @@
char* grRealloc( const char* block, long size )
{
char* p;
-
+
p = realloc( (char*)block, size );
if (!p && size > 0)
{
@@ -97,7 +97,7 @@
if ( pixel_mode <= gr_pixel_mode_none ||
pixel_mode >= gr_pixel_mode_max )
goto Fail;
-
+
if ( pixel_mode != gr_pixel_mode_gray ||
( num_grays >= 2 && num_grays < 256 ) )
return 0;
@@ -114,7 +114,7 @@
* grNewBitmap
*
* <Description>
- * creates a new bitmap
+ * creates a new bitmap
*
* <Input>
* pixel_mode :: the target surface's pixel_mode
@@ -160,28 +160,28 @@
{
case gr_pixel_mode_mono : pitch = (width+7) >> 3; break;
case gr_pixel_mode_pal4 : pitch = (width+3) >> 2; break;
-
+
case gr_pixel_mode_pal8 :
case gr_pixel_mode_gray : pitch = width; break;
-
+
case gr_pixel_mode_rgb555:
case gr_pixel_mode_rgb565: pitch = width*2; break;
-
+
case gr_pixel_mode_rgb24 : pitch = width*3; break;
-
+
case gr_pixel_mode_rgb32 : pitch = width*4; break;
-
+
default:
grError = gr_err_bad_target_depth;
return 0;
}
-
+
bit->pitch = pitch;
bit->buffer = grAlloc( (long)bit->pitch * bit->rows );
if (!bit->buffer) goto Fail;
-
+
return 0;
-
+
Fail:
return grError;
}
@@ -192,7 +192,7 @@
* grDoneBitmap
*
* <Description>
- * destroys a bitmap
+ * destroys a bitmap
*
* <Input>
* bitmap :: handle to bitmap descriptor
diff --git a/demos/graph/grobjs.h b/demos/graph/grobjs.h
index 79eb31d..5f99d05 100644
--- a/demos/graph/grobjs.h
+++ b/demos/graph/grobjs.h
@@ -23,7 +23,7 @@
{
grColor foreground;
grColor background;
-
+
int num_levels;
int max_levels;
grColor* levels;
@@ -97,13 +97,13 @@
int y,
int width,
int height );
-
+
typedef void (*grDoneSurfaceFunc)( grSurface* surface );
typedef int (*grListenEventFunc)( grSurface* surface,
int event_mode,
grEvent *event );
-
+
struct grSurface_
@@ -112,7 +112,7 @@
grBitmap bitmap;
grBool refresh;
grBool owner;
-
+
const byte* saturation; /* used for gray surfaces only */
grBlitterFunc blit_mono; /* 0 by default, set by grBlit.. */
@@ -141,7 +141,7 @@
********************************************************************/
extern char* grAlloc( long size );
-
+
/********************************************************************
*
diff --git a/demos/graph/grtypes.h b/demos/graph/grtypes.h
index aca1856..7c39e2a 100644
--- a/demos/graph/grtypes.h
+++ b/demos/graph/grtypes.h
@@ -23,7 +23,7 @@
typedef unsigned short ushort;
typedef unsigned int uint;
#endif
-
+
typedef struct grDimension_
{
int x;
diff --git a/demos/graph/mac/grmac.c b/demos/graph/mac/grmac.c
index 189776a..359aac8 100644
--- a/demos/graph/mac/grmac.c
+++ b/demos/graph/mac/grmac.c
@@ -298,7 +298,7 @@ grSurface* init_surface( grSurface* surface,
case gr_pixel_mode_gray:
thePixMap.cmpSize = 8;
thePixMap.pixelSize = 8;
- thePixMap.pmTable = GetCTable(256); /* color palette matching FT's idea
+ thePixMap.pmTable = GetCTable(256); /* color palette matching FT's idea
of grayscale. See ftview.rsrc */
break;
diff --git a/demos/graph/os2/gros2pm.c b/demos/graph/os2/gros2pm.c
index e234365..1aba61c 100644
--- a/demos/graph/os2/gros2pm.c
+++ b/demos/graph/os2/gros2pm.c
@@ -35,9 +35,9 @@
{
ULONG os2key;
grKey grkey;
-
+
} Translator;
-
+
static
Translator key_translators[] =
@@ -296,7 +296,7 @@
WinUpdateWindow( surface->frame_window );
}
-
+
static
void set_title( grPMSurface* surface,
const char* title )
@@ -319,7 +319,7 @@
- static
+ static
void listen_event( grPMSurface* surface,
int event_mask,
grEvent* grevent )
@@ -517,7 +517,7 @@
the_surface = surface;
LOG(( "Os2PM: RunPMWindow( %08lx )\n", (long)surface ));
-
+
/* create an anchor to allow this thread to use PM */
surface->anchor = WinInitialize(0);
if (!surface->anchor)
@@ -546,8 +546,8 @@
}
/* create the PM window */
- class_flags = FCF_TITLEBAR | FCF_MINBUTTON | FCF_DLGBORDER |
- FCF_TASKLIST | FCF_SYSMENU;
+ class_flags = FCF_TITLEBAR | FCF_MINBUTTON | FCF_DLGBORDER |
+ FCF_TASKLIST | FCF_SYSMENU;
LOG(( "Os2PM: RunPMWindow: Creating window\n" ));
surface->frame_window = WinCreateStdWindow(
@@ -669,7 +669,7 @@
case WM_MINMAXFRAME:
/* to update minimized if changed */
swp = *((PSWP) parm1);
- if ( swp.fl & SWP_MINIMIZE )
+ if ( swp.fl & SWP_MINIMIZE )
minimized = TRUE;
if ( swp.fl & SWP_RESTORE )
minimized = FALSE;
@@ -677,11 +677,11 @@
break;
case WM_ERASEBACKGROUND:
- case WM_PAINT:
+ case WM_PAINT:
/* copy the memory image of the screen out to the real screen */
DosRequestMutexSem( surface->image_lock, SEM_INDEFINITE_WAIT );
WinBeginPaint( handle, screen_ps, NULL );
-
+
/* main image and magnified picture */
GpiBitBlt( screen_ps,
surface->image_ps,
@@ -690,7 +690,7 @@
ROP_SRCCOPY, BBO_AND );
WinEndPaint( screen_ps );
- DosReleaseMutexSem( surface->image_lock );
+ DosReleaseMutexSem( surface->image_lock );
break;
case WM_HELP: /* this really is a F1 Keypress !! */
@@ -740,15 +740,15 @@
{
sizeof( grPMSurface ),
"os2pm",
-
+
init_device,
done_device,
-
+
(grDeviceInitSurfaceFunc) init_surface,
-
+
0,
0
-
+
};
diff --git a/demos/graph/win32/grwin32.c b/demos/graph/win32/grwin32.c
index 28bd363..69b44d4 100644
--- a/demos/graph/win32/grwin32.c
+++ b/demos/graph/win32/grwin32.c
@@ -64,9 +64,9 @@
{
ULONG winkey;
grKey grkey;
-
+
} Translator;
-
+
static
Translator key_translators[] =
{
@@ -105,7 +105,7 @@
/* This is a minimalist driver, it is only able to display */
/* a _single_ window. Moreover, only monochrome and gray */
/* bitmaps are supported.. */
-
+
/* handle of the window. */
static HWND hwndGraphic;
@@ -170,7 +170,7 @@ void done_surface( grSurface* surface )
row_bytes = surface->bitmap.pitch;
if (row_bytes < 0) row_bytes = -row_bytes;
-
+
if ( row_bytes*8 != pbmi->bmiHeader.biWidth * pbmi->bmiHeader.biBitCount )
pbmi->bmiHeader.biWidth = row_bytes * 8 / pbmi->bmiHeader.biBitCount;
@@ -181,7 +181,7 @@ void done_surface( grSurface* surface )
surface->bitmap.buffer,
pbmi,
DIB_RGB_COLORS );
-
+
ReleaseDC ( hwndGraphic, hDC );
ShowWindow( hwndGraphic, SW_SHOW );
@@ -193,7 +193,7 @@ void done_surface( grSurface* surface )
void set_title( grSurface* surface, const char* title )
{
(void)surface;
-
+
/* the title will be set on the next listen_event, just */
/* record it there.. */
the_title = title;
@@ -206,17 +206,17 @@ void done_surface( grSurface* surface )
grEvent* grevent )
{
MSG msg;
-
+
(void)surface;
(void)event_mask;
-
+
if ( hwndGraphic && !title_set )
{
SetWindowText( hwndGraphic, the_title );
title_set = 1;
}
- eventToProcess = 0;
+ eventToProcess = 0;
while (GetMessage( &msg, 0, 0, 0 ))
{
TranslateMessage( &msg );
@@ -224,7 +224,7 @@ void done_surface( grSurface* surface )
if (eventToProcess)
break;
}
-
+
*grevent = ourevent;
}
@@ -243,7 +243,7 @@ grSurface* init_surface( grSurface* surface,
{
static RGBQUAD black = { 0, 0, 0, 0 };
static RGBQUAD white = { 0xFF, 0xFF, 0xFF, 0 };
-
+
if( ! RegisterTheClass() ) return 0; /* if already running, fails. */
/* find some memory for the bitmap header */
@@ -298,7 +298,7 @@ grSurface* init_surface( grSurface* surface,
int count = bitmap->grays;
int x;
RGBQUAD* color = pbmi->bmiColors;
-
+
for ( x = 0; x < count; x++, color++ )
{
color->rgbRed =
@@ -324,7 +324,7 @@ grSurface* init_surface( grSurface* surface,
free ( pbmi );
return 0;
}
-
+
surface->done = (grDoneSurfaceFunc) done_surface;
surface->refresh_rect = (grRefreshRectFunc) refresh_rectangle;
surface->set_title = (grSetTitleFunc) set_title;
@@ -452,7 +452,7 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
return DefWindowProc( handle, mess, wParam, lParam );
}
-
+
case WM_KEYDOWN:
switch ( wParam )
{
@@ -476,7 +476,7 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
goto Do_Key_Event;
}
}
-
+
/* the key isn't found, default processing */
/* return DefWindowProc( handle, mess, wParam, lParam ); */
return DefWindowProc( handle, mess, wParam, lParam );
@@ -485,7 +485,7 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
case WM_CHAR:
{
ourevent.key = wParam;
-
+
Do_Key_Event:
ourevent.type = gr_event_key;
eventToProcess = 1;
@@ -511,12 +511,12 @@ LRESULT CALLBACK Message_Process( HWND handle, UINT mess,
{
sizeof( grSurface ),
"win32",
-
+
init_device,
done_device,
-
+
(grDeviceInitSurfaceFunc) init_surface,
-
+
0,
0
};
diff --git a/demos/graph/x11/grx11.c b/demos/graph/x11/grx11.c
index b73fa9e..8ca4f7f 100644
--- a/demos/graph/x11/grx11.c
+++ b/demos/graph/x11/grx11.c
@@ -24,9 +24,9 @@
{
KeySym xkey;
grKey grkey;
-
+
} Translator;
-
+
static
Translator key_translators[] =
{
@@ -59,9 +59,9 @@
#ifdef TEST
-
+
#define grAlloc malloc
-
+
#endif
@@ -76,7 +76,7 @@
typedef XPixmapFormatValues XDepth;
static int num_pixel_modes = 0;
- static grPixelMode pixel_modes[ MAX_PIXEL_MODES ];
+ static grPixelMode pixel_modes[ MAX_PIXEL_MODES ];
static XDepth pixel_depth[ MAX_PIXEL_MODES ];
typedef struct grXSurface_
@@ -90,9 +90,9 @@
int depth;
XDepth* xdepth;
Bool gray;
-
+
GC gc;
-
+
XColor color[256]; /* gray levels palette for 8-bit modes */
XImage* ximage;
@@ -100,10 +100,10 @@
int win_org_y;
int win_width;
int win_height;
-
+
int image_width;
int image_height;
-
+
} grXSurface;
@@ -133,10 +133,10 @@
{
if ( num_pixel_modes >= MAX_PIXEL_MODES )
Panic( "X11.Too many pixel modes\n" );
-
+
pixel_modes[ num_pixel_modes ] = pixel_mode;
pixel_depth[ num_pixel_modes ] = *depth;
-
+
num_pixel_modes++;
}
@@ -146,21 +146,21 @@
int init_device( void )
{
XDepth dummy;
-
+
XrmInitialize();
-
+
display = XOpenDisplay( displayname );
if (!display)
{
return -1;
/* Panic( "Gr:error: cannot open X11 display\n" ); */
}
-
+
idle = XCreateFontCursor( display, XC_left_ptr );
busy = XCreateFontCursor( display, XC_watch );
-
+
num_pixel_modes = 0;
-
+
/* always enable the 8-bit gray levels pixel mode */
/* even if its display is emulated through a constrained palette */
/* or another color mode */
@@ -177,45 +177,45 @@
formats = XListPixmapFormats( display, &count );
format = formats;
-
+
#ifdef TEST
printf( "available pixmap formats\n" );
printf( "depth pixbits scanpad\n" );
#endif
-
+
while ( count-- > 0 )
{
-#ifdef TEST
+#ifdef TEST
printf( " %3d %3d %3d\n",
format->depth,
format->bits_per_pixel,
format->scanline_pad );
#endif
-
+
if ( format->depth == 1 )
/* usually, this should be the first format */
add_pixel_mode( gr_pixel_mode_mono, format );
-
+
else if ( format->depth == 8 )
add_pixel_mode( gr_pixel_mode_pal8, format );
- /* note, the 32-bit modes return a depth of 24, and 32 bits per pixel */
+ /* note, the 32-bit modes return a depth of 24, and 32 bits per pixel */
else if ( format->depth == 24 )
{
-#ifdef TEST
+#ifdef TEST
{
int count2;
XVisualInfo* visuals;
XVisualInfo* visual;
const char* string = "unknown";
-
+
template.depth = format->depth;
visuals = XGetVisualInfo( display,
VisualDepthMask,
&template,
&count2 );
visual = visuals;
-
+
switch (visual->class)
{
case TrueColor: string = "TrueColor"; break;
@@ -234,15 +234,15 @@
visual->bits_per_rgb,
string );
visual++;
- }
+ }
#endif
if ( format->bits_per_pixel == 24 )
add_pixel_mode( gr_pixel_mode_rgb24, format );
-
+
else if ( format->bits_per_pixel == 32 )
add_pixel_mode( gr_pixel_mode_rgb32, format );
}
-
+
else if ( format->depth == 16 )
{
int count2;
@@ -255,12 +255,12 @@
&template,
&count2 );
visual = visuals;
-
+
while ( count2-- > 0 )
{
-#ifdef TEST
+#ifdef TEST
const char* string = "unknown";
-
+
switch (visual->class)
{
case TrueColor: string = "TrueColor"; break;
@@ -278,34 +278,34 @@
visual->colormap_size,
visual->bits_per_rgb,
string );
-
+
#endif
if ( visual->red_mask == 0xf800 &&
visual->green_mask == 0x07e0 &&
visual->blue_mask == 0x001f )
add_pixel_mode( gr_pixel_mode_rgb565, format );
-
+
else if ( visual->red_mask == 0x7c00 &&
visual->green_mask == 0x03e0 &&
visual->blue_mask == 0x001f )
add_pixel_mode( gr_pixel_mode_rgb555, format );
-
- /* other 16-bit modes are ignored */
+
+ /* other 16-bit modes are ignored */
visual++;
}
-
+
XFree( visuals );
}
-
+
format++;
}
-
+
XFree( formats );
}
-
+
gr_x11_device.num_pixel_modes = num_pixel_modes;
gr_x11_device.pixel_modes = pixel_modes;
-
+
return 0;
}
@@ -327,13 +327,13 @@
byte* write = (byte*)target->buffer + y*target->pitch + x;
byte* read = (byte*)source->buffer + y*source->pitch + x;
XColor* palette = surface->color;
-
+
while (h > 0)
{
byte* _write = write;
byte* _read = read;
byte* limit = _write + w;
-
+
for ( ; _write < limit; _write++, _read++ )
*_write = (byte) palette[ *_read ].pixel;
@@ -356,13 +356,13 @@
byte* write = (byte*)target->buffer + y*target->pitch + 2*x;
byte* read = (byte*)source->buffer + y*source->pitch + x;
XColor* palette = surface->color;
-
+
while (h > 0)
{
byte* _write = write;
byte* _read = read;
byte* limit = _write + 2*w;
-
+
for ( ; _write < limit; _write += 2, _read++ )
*(short*)_write = (short)palette[ *_read ].pixel;
@@ -384,17 +384,17 @@
grBitmap* source = &surface->root.bitmap;
byte* write = (byte*)target->buffer + y*target->pitch + 3*x;
byte* read = (byte*)source->buffer + y*source->pitch + x;
-
+
while (h > 0)
{
byte* _write = write;
byte* _read = read;
byte* limit = _write + 3*w;
-
+
for ( ; _write < limit; _write += 3, _read++ )
{
XColor* color = surface->color + *_read;
-
+
_write[0] = color->red;
_write[1] = color->green;
_write[2] = color->blue;
@@ -418,13 +418,13 @@
grBitmap* source = &surface->root.bitmap;
byte* write = (byte*)target->buffer + y*target->pitch + 4*x;
byte* read = (byte*)source->buffer + y*source->pitch + x;
-
+
while (h > 0)
{
byte* _write = write;
byte* _read = read;
byte* limit = _write + 4*w;
-
+
for ( ; _write < limit; _write += 4, _read++ )
{
byte color = *_read;
@@ -447,28 +447,28 @@
int h )
{
int z;
-
+
/* first of all, clip to the surface's area */
if ( x >= surface->image.width ||
x+w <= 0 ||
y >= surface->image.rows ||
y+h <= 0 )
return;
-
+
if ( x < 0 )
{
w += x;
x = 0;
}
-
+
z = (x + w) - surface->image.width;
if (z > 0)
w -= z;
-
+
z = (y + h) - surface->image.rows;
if (z > 0)
h -= z;
-
+
/* convert the rectangle to the target depth for gray surfaces */
if (surface->gray)
{
@@ -480,7 +480,7 @@
case 32: convert_gray_to_32 ( surface, x, y, w, h ); break;
}
}
- }
+ }
static
@@ -492,7 +492,7 @@
{
if (surface->gray)
convert_rectangle( surface, x, y, w, h );
-
+
XPutImage( display,
surface->win,
surface->gc,
@@ -500,7 +500,7 @@
x, y, x, y, w, h );
}
-
+
static
void set_title( grXSurface* surface,
const char* title )
@@ -535,7 +535,7 @@
- static
+ static
void listen_event( grXSurface* surface,
int event_mask,
grEvent* grevent )
@@ -565,7 +565,7 @@
switch ( x_event.type )
{
- case KeyPress:
+ case KeyPress:
key_number = XLookupString( &x_event.xkey,
key_buffer,
sizeof ( key_buffer ),
@@ -579,7 +579,7 @@
/* this may be a special key like F1, F2, etc.. */
grkey = KeySymTogrKey(key);
if (grkey != grKeyNone)
- goto Set_Key;
+ goto Set_Key;
}
else
bool_exit = 1;
@@ -588,7 +588,7 @@
case MappingNotify:
XRefreshKeyboardMapping( &x_event.xmapping );
break;
-
+
case Expose:
refresh_rectangle( surface,
x_event.xexpose.x,
@@ -608,7 +608,7 @@
/* If this wasn't part of the simple translated keys, simply get the charcode */
/* from the character buffer */
grkey = grKEY(key_buffer[key_cursor++]);
-
+
Set_Key:
grevent->type = gr_key_down;
grevent->key = grkey;
@@ -625,12 +625,12 @@
char grays;
XDepth* format;
int image_depth;
-
+
screen = DefaultScreen( display );
-
+
surface->colormap = DefaultColormap( display, screen );
surface->depth = DefaultDepth( display, screen );
- surface->visual = DefaultVisual( display, screen );
+ surface->visual = DefaultVisual( display, screen );
image = &surface->image;
@@ -644,7 +644,7 @@
bitmap->grays >= 2 );
surface->gray = grays;
-
+
/* copy dimensions */
image->width = bitmap->width;
image->rows = bitmap->rows;
@@ -656,7 +656,7 @@
/* find the supported format corresponding to the request */
format = 0;
- if (grays)
+ if (grays)
{
/* choose the default depth in case of grays rendering */
int i;
@@ -672,7 +672,7 @@
{
/* otherwise, select the format depending on the pixel mode */
int i;
-
+
format = 0;
for ( i = 0; i < num_pixel_modes; i++ )
if ( pixel_modes[i] == bitmap->mode )
@@ -682,7 +682,7 @@
break;
}
}
-
+
if (!format)
{
grError = gr_err_bad_argument;
@@ -695,17 +695,17 @@
if ( format->depth == 24 &&
format->bits_per_pixel == 32 )
image_depth = 32;
-
+
/* allocate surface image */
{
int bits, over;
bits = image->width * format->bits_per_pixel;
over = bits % format->scanline_pad;
-
+
if (over)
bits += format->scanline_pad - over;
-
+
if (!grays)
{
image->width = bits;
@@ -733,9 +733,9 @@
}
surface->root.bitmap = *bitmap;
-
+
/* Now create the surface X11 image */
- surface->ximage = XCreateImage( display,
+ surface->ximage = XCreateImage( display,
surface->visual,
format->depth,
format->depth == 1 ? XYBitmap : ZPixmap,
@@ -747,20 +747,20 @@
0 );
if ( !surface->ximage )
Panic( "grX11: cannot create surface X11 image\n" );
-
+
/* allocate gray levels in the case of gray surface */
if ( grays )
{
XColor* color = surface->color;
int i;
-
+
for ( i = 0; i < bitmap->grays; i++, color++ )
{
color->red =
color->green =
color->blue = 65535 - ( i * 65535 ) / bitmap->grays;
-
+
if ( !XAllocColor( display, surface->colormap, color ) )
Panic( "ERROR: cannot allocate Color\n" );
}
@@ -775,13 +775,13 @@
XTextProperty xtp;
XSizeHints xsh;
XSetWindowAttributes xswa;
-
+
xswa.border_pixel = BlackPixel( display, screen );
xswa.background_pixel = WhitePixel( display, screen );
xswa.cursor = busy;
-
+
xswa.event_mask = KeyPressMask | ExposureMask;
-
+
surface->win = XCreateWindow( display,
RootWindow( display, screen ),
0,
@@ -790,45 +790,45 @@
image->rows,
10,
surface->depth,
- InputOutput,
+ InputOutput,
surface->visual,
CWBackPixel | CWBorderPixel |
CWEventMask | CWCursor,
&xswa );
-
+
XMapWindow( display, surface->win );
-
+
surface->gc = XCreateGC( display, RootWindow( display, screen ), 0L, NULL );
XSetForeground( display, surface->gc, xswa.border_pixel );
XSetBackground( display, surface->gc, xswa.background_pixel );
-
-
+
+
/* make window manager happy :-) */
xtp.value = (unsigned char*)"FreeType";
xtp.encoding = 31;
xtp.format = 8;
xtp.nitems = strlen( (char*)xtp.value );
-
+
xsh.x = 0;
xsh.y = 0;
-
+
xsh.width = image->width;
xsh.height = image->rows;
xsh.flags = (PPosition | PSize);
xsh.flags = 0;
-
+
XSetWMProperties( display, surface->win, &xtp, &xtp, NULL, 0, &xsh, NULL, NULL );
}
-
+
surface->root.done = (grDoneSurfaceFunc) done_surface;
surface->root.refresh_rect = (grRefreshRectFunc) refresh_rectangle;
surface->root.set_title = (grSetTitleFunc) set_title;
surface->root.listen_event = (grListenEventFunc) listen_event;
-
+
convert_rectangle( surface, 0, 0, bitmap->width, bitmap->rows );
return surface;
}
-
+
@@ -836,15 +836,15 @@
{
sizeof( grXSurface ),
"x11",
-
+
init_device,
done_device,
-
+
(grDeviceInitSurfaceFunc) init_surface,
-
+
0,
0
-
+
};
#ifdef TEST
@@ -875,7 +875,7 @@ const grKeyName key_names[] =
{ grKeyEsc, "Esc" },
{ grKeyHome, "Home" },
{ grKeyEnd, "End" },
-
+
{ grKeyPageUp, "Page_Up" },
{ grKeyPageDown, "Page_Down" },
{ grKeyLeft, "Left" },
@@ -891,7 +891,7 @@ int main( void )
{
grSurface* surface;
int n;
-
+
grInit();
surface = grNewScreenSurface( 0, gr_pixel_mode_gray, 320, 400, 128 );
if (!surface)
@@ -902,10 +902,10 @@ int main( void )
grEvent event;
const char* string;
int x;
-
+
grSetSurfaceRefresh( surface, 1 );
grSetTitle(surface,"X11 driver demonstration" );
-
+
for ( x = -10; x < 10; x++ )
{
for ( n = 0; n < 128; n++ )
@@ -919,15 +919,15 @@ int main( void )
}
color.value = 64;
grWriteCellString( surface, 0, 0, "just an example", color );
-
+
do
{
listen_event((grXSurface*)surface, 0, &event);
-
+
/* return if ESC was pressed */
if ( event.key == grKeyEsc )
return 0;
-
+
/* otherwise, display key string */
color.value = (color.value + 8) & 127;
{
@@ -936,7 +936,7 @@ int main( void )
grKeyName* limit = name + count;
const char* kname = 0;
char kname_temp[16];
-
+
while (name < limit)
{
if ( name->key == event.key )
@@ -946,23 +946,23 @@ int main( void )
}
name++;
}
-
+
if (!kname)
{
sprintf( kname_temp, "char '%c'", (char)event.key );
kname = kname_temp;
}
-
+
grWriteCellString( surface, 30, 30, kname, color );
grRefreshSurface(surface);
paint_rectangle( surface, 0, 0, surface->bitmap.width, surface->bitmap.rows );
}
} while (1);
}
-
+
return 0;
-
-
+
+
}
#endif /* O */
#endif /* TEST */
diff --git a/demos/graph/xtest.c b/demos/graph/xtest.c
index 4c6295e..7bc806b 100644
--- a/demos/graph/xtest.c
+++ b/demos/graph/xtest.c
@@ -37,7 +37,7 @@ const grKeyName key_names[] =
{ grKeyEsc, "Esc" },
{ grKeyHome, "Home" },
{ grKeyEnd, "End" },
-
+
{ grKeyPageUp, "Page_Up" },
{ grKeyPageDown, "Page_Down" },
{ grKeyLeft, "Left" },
@@ -52,7 +52,7 @@ int main( void )
{
grSurface* surface;
int n;
-
+
grInit();
surface = grNewScreenSurface( 0, gr_pixel_mode_gray, 320, 400, 128 );
if (!surface)
@@ -63,10 +63,10 @@ int main( void )
grEvent event;
const char* string;
int x;
-
+
grSetSurfaceRefresh( surface, 1 );
grSetTitle(surface,"X11 driver demonstration" );
-
+
for ( x = -10; x < 10; x++ )
{
for ( n = 0; n < 128; n++ )
@@ -80,15 +80,15 @@ int main( void )
}
color.value = 64;
grWriteCellString( surface, 0, 0, "just an example", color );
-
+
do
{
grListenSurface( surface, 0, &event);
-
+
/* return if ESC was pressed */
if ( event.key == grKeyEsc )
return 0;
-
+
/* otherwise, display key string */
color.value = (color.value + 8) & 127;
{
@@ -97,7 +97,7 @@ int main( void )
grKeyName* limit = name + count;
const char* kname = 0;
char kname_temp[16];
-
+
while (name < limit)
{
if ( name->key == event.key )
@@ -107,13 +107,13 @@ int main( void )
}
name++;
}
-
+
if (!kname)
{
sprintf( kname_temp, "char '%c'", (char)event.key );
kname = kname_temp;
}
-
+
grWriteCellString( surface, 30, 30, kname, color );
grRefreshSurface(surface);
}
diff --git a/demos/src/common.c b/demos/src/common.c
index fe59e9b..0c96347 100644
--- a/demos/src/common.c
+++ b/demos/src/common.c
@@ -209,7 +209,7 @@
current = name;
c = *current;
-
+
while ( c )
{
#ifndef macintosh
diff --git a/demos/src/compos.c b/demos/src/compos.c
index 2ae0b0f..976d4ab 100644
--- a/demos/src/compos.c
+++ b/demos/src/compos.c
@@ -56,7 +56,7 @@
}
- int main( int argc, char** argv )
+ int main( int argc, char** argv )
{
int i, file_index;
unsigned int id;
@@ -112,7 +112,7 @@
fname = filename + i + 1;
i = -1;
}
- else
+ else
i--;
printf( "%s:\n", fname );
@@ -136,7 +136,7 @@
for ( id = 0; id < num_glyphs; id++ )
{
int has_scale;
-
+
error = FT_Load_Glyph( face, id, FT_LOAD_NO_RECURSE );
if (!error && slot->format == ft_glyph_format_composite)
{
@@ -150,19 +150,19 @@
FT_SUBGLYPH_FLAG_SCALE |
FT_SUBGLYPH_FLAG_XY_SCALE |
FT_SUBGLYPH_FLAG_2X2 );
-
+
printf( " [%d%c",
subg->index,
subg->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS ? '*' : ' ' );
-
+
if ( subg->arg1|subg->arg2 )
{
- if ( subg->flags & FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES )
+ if ( subg->flags & FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES )
printf( "(%d,%d)", subg->arg1, subg->arg2 );
else
printf( "<%d,%d>", subg->arg1, subg->arg2 );
}
-
+
if (has_scale)
printf( "-{%0.3f %0.3f %0.3f %0.3f}",
subg->transform.xx/65536.0,
diff --git a/demos/src/ftlint.c b/demos/src/ftlint.c
index 5066906..3df69e0 100644
--- a/demos/src/ftlint.c
+++ b/demos/src/ftlint.c
@@ -56,7 +56,7 @@
}
- int main( int argc, char** argv )
+ int main( int argc, char** argv )
{
int i, file_index;
unsigned int id;
@@ -115,7 +115,7 @@
fname = filename + i + 1;
i = -1;
}
- else
+ else
i--;
printf( "%s: ", fname );
diff --git a/demos/src/ftsbit.c b/demos/src/ftsbit.c
index 14f3553..11e3108 100644
--- a/demos/src/ftsbit.c
+++ b/demos/src/ftsbit.c
@@ -115,14 +115,14 @@
}
-
+
static
void dump_range( FT_GlyphSlot glyph,
int first_glyph,
int last_glyph )
{
int i;
-
+
for ( i = first_glyph; i <= last_glyph; i++ )
{
error = FT_Load_Glyph( glyph,
@@ -137,7 +137,7 @@
TT_ErrToString18( error ) );
continue;
}
-
+
dump_bitmap(glyph,i);
}
}
@@ -270,7 +270,7 @@
char* base = argv[i];
char* cur = base;
int first, last;
-
+
while (*cur)
{
if (*cur == '-')
@@ -285,14 +285,14 @@
{
if ( sscanf( argv[i], "%d-%d", &first, &last ) != 2 )
Usage( execname );
-
+
dump_range( glyph, first, last );
}
else
{
if ( sscanf( argv[i], "%d", &first ) != 1 )
Usage( execname );
-
+
dump_range( glyph, first, first );
}
}
diff --git a/demos/src/ftstring.c b/demos/src/ftstring.c
index 859fcfe..c0c1349 100644
--- a/demos/src/ftstring.c
+++ b/demos/src/ftstring.c
@@ -37,7 +37,7 @@
static char* new_header = 0;
static char* Text = "The quick brown fox jumps over the lazy dog";
-
+
static FT_Library library; /* the FreeType library */
static FT_Face face; /* the font face */
static FT_Error error; /* error returned by FreeType ? */
@@ -49,7 +49,7 @@
static int Num;
static int Rotation = 0;
static int Fail;
-
+
static int hinted = 1; /* is glyph hinting active ? */
static int antialias = 1; /* is anti-aliasing active ? */
static int use_sbits = 1; /* do we use embedded bitmaps ? */
@@ -68,7 +68,7 @@
static FT_Matrix trans_matrix;
static int transform = 0;
-
+
static FT_Vector string_center;
typedef struct TGlyph_
@@ -76,7 +76,7 @@
FT_UInt glyph_index; /* glyph index in face */
FT_Vector pos; /* position of glyph origin */
FT_Glyph image; /* glyph image */
-
+
} TGlyph, *PGlyph;
#define FLOOR(x) ((x) & -64)
@@ -176,7 +176,7 @@
static void clear_display( void )
{
long size = (long)bit.pitch * bit.rows;
-
+
if (size < 0) size = -size;
memset( bit.buffer, 0, size );
}
@@ -192,7 +192,7 @@
res );
return FT_Err_Ok;
}
-
+
/**************************************************************
*
@@ -204,17 +204,17 @@
PGlyph glyph = glyphs;
FT_BBox bbox;
int n;
-
+
bbox.xMin = 32000; bbox.xMax = -32000;
bbox.yMin = 32000; bbox.yMax = -32000;
-
+
for ( n = 0; n < num_glyphs; n++, glyph++ )
{
FT_BBox cbox;
FT_Pos x, y;
-
+
if (!glyph->image) continue;
-
+
x = glyph->pos.x >> 6;
y = glyph->pos.y >> 6;
@@ -224,7 +224,7 @@
cbox.yMin += y;
cbox.xMax += x;
cbox.yMax += y;
-
+
if (cbox.xMin < bbox.xMin) bbox.xMin = cbox.xMin;
if (cbox.xMax > bbox.xMax) bbox.xMax = cbox.xMax;
if (cbox.yMin < bbox.yMin) bbox.yMin = cbox.yMin;
@@ -253,11 +253,11 @@
load_flags = FT_LOAD_DEFAULT;
if( !hinted )
load_flags |= FT_LOAD_NO_HINTING;
-
+
num_grays = 128;
if (!antialias)
num_grays = 0;
-
+
for ( n = 0; n < num_glyphs; n++, glyph++ )
{
/* compute glyph origin */
@@ -266,11 +266,11 @@
if (prev_index)
{
FT_Vector kern;
-
+
FT_Get_Kerning( face, prev_index, glyph->glyph_index, &kern );
kern.x = FT_MulFix( kern.x, face->size->metrics.x_scale );
if (hinted) kern.x = (kern.x+32) & -64;
-
+
origin_x += kern.x;
}
prev_index = glyph->glyph_index;
@@ -285,7 +285,7 @@
/* clear existing image if there is one */
if (glyph->image)
FT_Done_Glyph(glyph->image);
-
+
/* load the glyph image */
/* for now, we take a monochrome glyph bitmap */
error = FT_Get_Glyph_Bitmap( face, glyph->glyph_index,
@@ -294,9 +294,9 @@
&origin,
(FT_BitmapGlyph*)&glyph->image );
if (error) continue;
-
+
glyph->pos = origin;
-
+
origin_x += glyph->image->advance;
}
string_center.x = origin_x / 2;
@@ -315,12 +315,12 @@
PGlyph glyph = glyphs;
grBitmap bit3;
int n;
-
+
for ( n = 0; n < num_glyphs; n++, glyph++ )
{
if (!glyph->image)
continue;
-
+
switch (glyph->image->glyph_type)
{
case ft_glyph_type_bitmap:
@@ -329,42 +329,42 @@
FT_BitmapGlyph bitm = (FT_BitmapGlyph)glyph->image;
FT_Bitmap* source = &bitm->bitmap;
FT_Pos x_top, y_top;
-
+
bit3.rows = source->rows;
bit3.width = source->width;
bit3.pitch = source->pitch;
bit3.buffer = source->buffer;
-
+
switch (source->pixel_mode)
{
case ft_pixel_mode_mono:
bit3.mode = gr_pixel_mode_mono;
break;
-
+
case ft_pixel_mode_grays:
bit3.mode = gr_pixel_mode_gray;
bit3.grays = source->num_grays;
break;
-
+
default:
continue;
}
-
+
/* now render the bitmap into the display surface */
x_top = x + (glyph->pos.x >> 6) + bitm->left;
y_top = y - (glyph->pos.y >> 6) - bitm->top;
grBlitGlyphToBitmap( &bit, &bit3, x_top, y_top, fore_color );
}
break;
-#if 0
+#if 0
case ft_glyph_type_outline:
{
/* in the case of outlines, we directly render it into the */
/* target surface with the smooth renderer.. */
FT_OutlineGlyph out = (FT_OutlineGlyph)glyph->image;
-
+
FT_Outline_Translate( (x+pen_pos[n]) << 6, (y+
- error = FT_Outline_Render(
+ error = FT_Outline_Render(
}
break;
#endif
@@ -387,7 +387,7 @@
const unsigned char* p = (const unsigned char*)string;
PGlyph glyph = glyphs;
FT_UInt glyph_index;
-
+
num_glyphs = 0;
while (*p)
{
@@ -399,7 +399,7 @@
break;
p++;
}
- }
+ }
static void reset_transform( void )
@@ -407,13 +407,13 @@
double angle = Rotation*3.14159/64.0;
FT_Fixed cosinus = (FT_Fixed)(cos(angle)*65536.0);
FT_Fixed sinus = (FT_Fixed)(sin(angle)*65536.0);
-
+
transform = (angle != 0);
trans_matrix.xx = cosinus;
trans_matrix.xy = -sinus;
trans_matrix.yx = sinus;
trans_matrix.yy = cosinus;
-
+
FT_Set_Transform(face,&trans_matrix, 0);
}
@@ -437,7 +437,7 @@
grGotoxy( 0, 0 );
grSetMargin( 2, 1 );
grGotobitmap( &bit );
-
+
grWriteln("FreeType String Viewer - part of the FreeType test suite" );
grLn();
grWriteln("This program is used to display a string of text using" );
@@ -462,7 +462,7 @@
grWriteln(" F8 : big rotate clockwise");
grLn();
grWriteln("press any key to exit this help screen");
-
+
grRefreshSurface( surface );
grListenSurface( surface, gr_event_key, &dummy_event );
}
@@ -471,11 +471,11 @@
static void reset_raster( void )
{
FT_Error error;
-
+
error = 1;
if ( use_grays && antialias )
error = FT_Set_Raster( library, &ft_grays_raster );
-
+
if (error)
(void)FT_Set_Raster( library, &std_raster );
}
@@ -484,7 +484,7 @@
static int Process_Event( grEvent* event )
{
int i;
-
+
switch ( event->key )
{
case grKeyEsc: /* ESC or q */
@@ -497,7 +497,7 @@
? "kerning is now active"
: "kerning is now ignored" );
return 1;
-
+
case grKEY('a'):
antialias = !antialias;
new_header = ( antialias
@@ -512,7 +512,7 @@
? "embedded bitmaps are now used when available"
: "embedded bitmaps are now ignored" );
return 1;
-
+
case grKEY('n'):
case grKEY('p'):
return (int)event->key;
@@ -524,7 +524,7 @@
: "now using the standard anti-aliaser" );
reset_raster();
break;
-
+
case grKEY('h'):
hinted = !hinted;
new_header = ( hinted
@@ -575,13 +575,13 @@
if (ptsize > MAXPTSIZE) ptsize = MAXPTSIZE;
return 1;
-#if 0
+#if 0
Do_Glyph:
Num += i;
if (Num < 0) Num = 0;
if (Num >= num_glyphs) Num = num_glyphs-1;
return 1;
-#endif
+#endif
}
@@ -614,7 +614,7 @@
}
- int main( int argc, char** argv )
+ int main( int argc, char** argv )
{
int i, old_ptsize, orig_ptsize, file;
int first_glyph = 0;
@@ -627,7 +627,7 @@
FT_Error error;
grEvent event;
-
+
execname = ft_basename( argv[0] );
while ( 1 )
@@ -650,7 +650,7 @@
usage( execname );
Text = optarg;
break;
-
+
default:
usage( execname );
break;
@@ -686,7 +686,7 @@
{
if ( argv[file][i] == '.' )
i = 0;
- i--;
+ i--;
}
#endif
@@ -713,10 +713,10 @@
prepare_text( (unsigned char*)Text );
file_loaded++;
-
+
error = reset_scale( ptsize );
if (error) goto Display_Font;
-
+
Display_Font:
/* initialise graphics if needed */
if ( !XisSetup )
@@ -724,7 +724,7 @@
XisSetup = 1;
init_display();
}
-
+
grSetTitle( surface, "FreeType String Viewer - press F1 for help" );
old_ptsize = ptsize;
@@ -732,10 +732,10 @@
{
Fail = 0;
Num = first_glyph;
-
+
if ( Num >= num_glyphs )
Num = num_glyphs-1;
-
+
if ( Num < 0 )
Num = 0;
}
@@ -751,7 +751,7 @@
/* layout & render string */
{
FT_BBox bbox;
-
+
reset_transform();
layout_glyphs();
compute_bbox( &bbox );
@@ -766,7 +766,7 @@
if (!new_header)
new_header = Header;
-
+
grWriteCellString( &bit, 0, 0, new_header, fore_color );
new_header = 0;
@@ -782,7 +782,7 @@
grWriteCellString( &bit, 0, 8, Header, fore_color );
grRefreshSurface( surface );
-
+
grListenSurface( surface, 0, &event );
if ( !( key = Process_Event( &event ) ) )
goto Fin;
@@ -791,7 +791,7 @@
{
if (file_loaded >= 1)
FT_Done_Face( face );
-
+
if ( file < argc - 1 )
file++;
@@ -802,7 +802,7 @@
{
if (file_loaded >= 1)
FT_Done_Face( face );
-
+
if ( file > 1 )
file--;
diff --git a/demos/src/fttimer.c b/demos/src/fttimer.c
index 78a3ec0..5e057db 100644
--- a/demos/src/fttimer.c
+++ b/demos/src/fttimer.c
@@ -63,7 +63,7 @@
int cur_glyph;
int cur_point;
unsigned short cur_contour;
-
+
int pixel_size = CHARSIZE;
int repeat_count = 1;
int use_grays = 0;
@@ -80,7 +80,7 @@
short antialias; /* smooth fonts with gray levels */
short force_low;
-
+
#define RASTER_BUFF_SIZE 128000
char raster_buff[ RASTER_BUFF_SIZE ];
@@ -176,8 +176,8 @@
/* create a new outline */
FT_Outline_New( library,
- glyph->outline.n_points,
- glyph->outline.n_contours,
+ glyph->outline.n_points,
+ glyph->outline.n_contours,
&outlines[cur_glyph] );
/* copy the glyph outline into it */
@@ -190,7 +190,7 @@
/* center outline around 0 */
{
FT_BBox bbox;
-
+
FT_Outline_Get_CBox( &glyph->outline, &bbox );
FT_Outline_Translate( &outlines[cur_glyph],
- ( bbox.xMax - bbox.xMin )/2,
@@ -265,7 +265,7 @@
case 'a':
use_grays = 1;
break;
-
+
case 'l':
force_low = 1;
break;
@@ -334,7 +334,7 @@
error = FT_Set_Raster( library, &ft_grays_raster );
if (error) Panic( "Could not initialize smooth anti-aliasing renderer" );
}
-
+
/* Load face */
error = FT_New_Face( library, filename, 0, &face );
@@ -347,7 +347,7 @@
num_glyphs = face->num_glyphs;
glyph = face->glyph;
-
+
tab_glyphs = MAX_GLYPHS;
if ( tab_glyphs > num_glyphs )
tab_glyphs = num_glyphs;
@@ -361,12 +361,12 @@
bit.width = 640;
bit.rows = 480;
bit.grays = 128;
-
+
if ( visual )
{
if ( !grInitDevices() )
Panic( "Could not initialize graphics.\n" );
-
+
surface = grNewSurface( 0, &bit );
if (!surface)
Panic( "Could not open graphics window/screen.\n" );
@@ -398,12 +398,12 @@
while ( total > 0 )
{
int repeat;
-
+
/* First, preload 'tab_glyphs' in memory */
cur_glyph = 0;
cur_point = 0;
cur_contour = 0;
-
+
printf( "loading %d glyphs", tab_glyphs );
for ( Num = 0; Num < tab_glyphs; Num++ )
@@ -417,7 +417,7 @@
base += tab_glyphs;
- if ( tab_glyphs > total )
+ if ( tab_glyphs > total )
tab_glyphs = total;
printf( ", rendering... " );
@@ -432,7 +432,7 @@
{
if ( (error = ConvertRaster( Num )) )
Fail++;
-
+
else
{
rendered_glyphs ++;
@@ -468,7 +468,7 @@
printf( "rendered glyphs = %d\n", rendered_glyphs );
printf( "render time = %f s\n", (double)t0 / 10000 );
printf( "fails = %d\n", Fail );
- printf( "average glyphs/s = %f\n",
+ printf( "average glyphs/s = %f\n",
(double)rendered_glyphs / t0 * 10000 );
printf( "total timing = %f s\n", (double)tz0 / 10000 );
diff --git a/demos/src/fttry.c b/demos/src/fttry.c
index 1dd878e..c0b9cac 100644
--- a/demos/src/fttry.c
+++ b/demos/src/fttry.c
@@ -53,7 +53,7 @@
exit(1);
}
- int main( int argc, char** argv )
+ int main( int argc, char** argv )
{
int i, file_index, glyph_index;
char filename[128 + 4];
@@ -119,7 +119,7 @@
fname = filename + i + 1;
i = -1;
}
- else
+ else
i--;
printf( "%s: ", fname );
@@ -132,7 +132,7 @@
error = FT_Set_Char_Size( face, ptsize << 6, 0, 0, 0 );
if (error) Panic( "Could not set character size" );
-
+
error = FT_Load_Glyph( face,
glyph_index,
load_unscaled ? FT_LOAD_NO_SCALE
diff --git a/demos/src/ftview.c b/demos/src/ftview.c
index 3448e86..dca3a69 100644
--- a/demos/src/ftview.c
+++ b/demos/src/ftview.c
@@ -49,7 +49,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
FT_Face face; /* the font face */
FT_Size size; /* the font size */
FT_GlyphSlot glyph; /* the glyph slot */
-
+
FT_Error error; /* error returned by FreeType ? */
grSurface* surface; /* current display surface */
@@ -57,7 +57,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
int num_glyphs; /* number of glyphs */
int ptsize; /* current point size */
-
+
int hinted = 1; /* is glyph hinting active ? */
int antialias = 0; /* is anti-aliasing active ? */
int use_sbits = 1; /* do we use embedded bitmaps ? */
@@ -146,7 +146,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
static
char bit_buffer[ MAX_BUFFER ];
-
+
/* Render a single glyph with the "grays" component */
static FT_Error Render_Glyph( int x_offset,
int y_offset )
@@ -161,19 +161,19 @@ $\243^\250*\265\371%!\247:/;.,?<>";
left = FLOOR( glyph->metrics.horiBearingX );
right = CEIL( glyph->metrics.horiBearingX + glyph->metrics.width );
width = TRUNC(right - left);
-
+
top = CEIL( glyph->metrics.horiBearingY );
bottom = FLOOR( glyph->metrics.horiBearingY - glyph->metrics.height );
height = TRUNC( top - bottom );
if ( glyph->format == ft_glyph_format_outline )
- {
+ {
pitch = ( antialias ? (width+3) & -4 : (width+7) >> 3 );
- size = pitch*height;
+ size = pitch*height;
if (size > MAX_BUFFER)
return FT_Err_Out_Of_Memory;
-
+
bit2.width = width;
bit2.rows = height;
bit2.pitch = pitch;
@@ -192,7 +192,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
if (low_prec)
glyph->outline.flags &= ~ft_outline_high_precision;
-
+
error = FT_Outline_Get_Bitmap( library, &glyph->outline, &bit2 );
}
else
@@ -230,14 +230,14 @@ $\243^\250*\265\371%!\247:/;.,?<>";
}
return FT_Err_Ok;
}
-
+
static FT_Error LoadChar( int idx, int hint )
{
int flags;
flags = FT_LOAD_DEFAULT;
-
+
if ( !hint )
flags |= FT_LOAD_NO_HINTING;
@@ -287,7 +287,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
LOG(( "-------------------------\n"));
}
#endif
-
+
Render_Glyph( x, y );
x += ( glyph->metrics.horiAdvance >> 6 ) + 1;
@@ -348,7 +348,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
LOG(( "-------------------------\n"));
}
#endif
-
+
Render_Glyph( x, y );
x += ( glyph->metrics.horiAdvance >> 6 ) + 1;
@@ -381,7 +381,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
grGotoxy( 0, 0 );
grSetMargin( 2, 1 );
grGotobitmap( &bit );
-
+
grWriteln("FreeType Glyph Viewer - part of the FreeType test suite" );
grLn();
grWriteln("This program is used to display all glyphs from one or" );
@@ -413,7 +413,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
grWriteln(" F10 : increment first glyph index by 1000");
grLn();
grWriteln("press any key to exit this help screen");
-
+
grRefreshSurface( surface );
grListenSurface( surface, gr_event_key, &dummy_event );
}
@@ -430,7 +430,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
static int Process_Event( grEvent* event )
{
int i;
-
+
switch ( event->key )
{
case grKeyEsc: /* ESC or q */
@@ -451,7 +451,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
? "embedded bitmaps are now used when available"
: "embedded bitmaps are now ignored" );
return 1;
-
+
case grKEY('n'):
case grKEY('p'):
return (int)event->key;
@@ -463,14 +463,14 @@ $\243^\250*\265\371%!\247:/;.,?<>";
: "now using the standard anti-aliaser" );
reset_raster();
break;
-
+
case grKEY('l'):
low_prec = !low_prec;
new_header = ( low_prec
? "rendering precision is now forced to low"
: "rendering precision is now normal" );
break;
-
+
case grKEY('h'):
hinted = !hinted;
new_header = ( hinted
@@ -515,7 +515,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
}
return 1;
-#if 0
+#if 0
Do_Rotate:
Rotation = (Rotation + i) & 1023;
return 1;
@@ -526,7 +526,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
if (ptsize < 1) ptsize = 1;
if (ptsize > MAXPTSIZE) ptsize = MAXPTSIZE;
return 1;
-
+
Do_Glyph:
Num += i;
if (Num < 0) Num = 0;
@@ -553,7 +553,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
}
- int main( int argc, char** argv )
+ int main( int argc, char** argv )
{
int i, old_ptsize, orig_ptsize, file;
int first_glyph = 0;
@@ -566,7 +566,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
FT_Error error;
grEvent event;
-
+
execname = ft_basename( argv[0] );
while ( 1 )
@@ -581,7 +581,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
case 'f':
first_glyph = atoi( optarg );
break;
-
+
case 'r':
res = atoi( optarg );
if ( res < 1 )
@@ -624,7 +624,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
{
if ( argv[file][i] == '.' )
i = 0;
- i--;
+ i--;
}
#endif
@@ -648,10 +648,10 @@ $\243^\250*\265\371%!\247:/;.,?<>";
if (error) goto Display_Font;
file_loaded++;
-
+
error = Reset_Scale( ptsize );
if (error) goto Display_Font;
-
+
num_glyphs = face->num_glyphs;
glyph = face->glyph;
size = face->size;
@@ -663,7 +663,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
XisSetup = 1;
Init_Display();
}
-
+
grSetTitle( surface, "FreeType Glyph Viewer - press F1 for help" );
old_ptsize = ptsize;
@@ -671,10 +671,10 @@ $\243^\250*\265\371%!\247:/;.,?<>";
{
Fail = 0;
Num = first_glyph;
-
+
if ( Num >= num_glyphs )
Num = num_glyphs-1;
-
+
if ( Num < 0 )
Num = 0;
}
@@ -692,7 +692,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
case 0:
Render_Text( Num, ptsize );
break;
-
+
default:
Render_All( Num, ptsize );
}
@@ -704,7 +704,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
if (!new_header)
new_header = Header;
-
+
grWriteCellString( &bit, 0, 0, new_header, fore_color );
new_header = 0;
@@ -720,7 +720,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
grWriteCellString( &bit, 0, 8, Header, fore_color );
grRefreshSurface( surface );
-
+
grListenSurface( surface, 0, &event );
if ( !( key = Process_Event( &event ) ) )
goto Fin;
@@ -729,7 +729,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
{
if (file_loaded >= 1)
FT_Done_Face( face );
-
+
if ( file < argc - 1 )
file++;
@@ -740,7 +740,7 @@ $\243^\250*\265\371%!\247:/;.,?<>";
{
if (file_loaded >= 1)
FT_Done_Face( face );
-
+
if ( file > 1 )
file--;
diff --git a/demos/src/memtest.c b/demos/src/memtest.c
index 1cb9279..b510ef3 100644
--- a/demos/src/memtest.c
+++ b/demos/src/memtest.c
@@ -51,11 +51,11 @@ void record_my_block( void* base, long size )
fprintf( stderr, "adding a block with non-positive length - should not happen \n" );
exit(1);
}
-
+
if ( num_my_blocks < MAX_RECORDED_BLOCKS )
{
MyBlock* block;
-
+
#ifdef CHECK_DUPLICATES
MyBlock* limit;
block = my_blocks;
@@ -86,7 +86,7 @@ static
void forget_my_block( void* base )
{
MyBlock* block = my_blocks + num_my_blocks-1;
-
+
/* we scan in reverse, because transient blocks are always located */
/* at the end of the table.. (it supposedly faster then..) */
for ( ; block >= my_blocks; block-- )
@@ -118,7 +118,7 @@ void* my_alloc( FT_Memory memory,
void* p = malloc(size);
if (p)
record_my_block(p,size);
-
+
return p;
}
@@ -161,7 +161,7 @@ static void dump_mem( void )
int bad = 0;
printf( "total allocated blocks = %d\n", num_my_blocks );
-
+
/* we scan in reverse, because transient blocks are always located */
/* at the end of the table.. (it supposedly faster then..) */
for ( ; block >= my_blocks; block-- )
@@ -221,7 +221,7 @@ int main( int argc, char** argv )
/* Create a new library with our own memory manager */
error = FT_New_Library( &my_memory, &library );
if (error) Panic( "Could not create library object" );
-
+
/* the new library has no drivers in it, add the default ones */
/* (implemented in ftinit.c).. */
FT_Default_Drivers(library);
@@ -265,7 +265,7 @@ int main( int argc, char** argv )
fname = filename + i + 1;
i = -1;
}
- else
+ else
i--;
printf( "%s: ", fname );
diff --git a/demos/src/ttdebug.c b/demos/src/ttdebug.c
index c983013..a7c45dd 100644
--- a/demos/src/ttdebug.c
+++ b/demos/src/ttdebug.c
@@ -617,20 +617,20 @@ TT_CodeRange_Tag debug_coderange = tt_coderange_glyph;
#ifdef UNIX
struct termios old_termio;
-
+
static
void Init_Keyboard( void )
{
struct termios termio;
#ifndef HAVE_TCGETATTR
- ioctl( 0, TCGETS, &old_termio );
+ ioctl( 0, TCGETS, &old_termio );
#else
tcgetattr( 0, &old_termio );
#endif
termio = old_termio;
-
+
/* termio.c_lflag &= ~(ICANON+ECHO+ECHOE+ECHOK+ECHONL+ECHOKE); */
termio.c_lflag &= ~(ICANON+ECHO+ECHOE+ECHOK+ECHONL);
@@ -838,7 +838,7 @@ TT_CodeRange_Tag debug_coderange = tt_coderange_glyph;
exc->pts.n_contours = exc->zp0.n_contours;
pts = exc->pts;
-
+
save.n_points = pts.n_points;
save.n_contours = pts.n_contours;
@@ -1205,7 +1205,7 @@ int glyph_size;
memory = library->memory;
driver = FT_Get_Driver( library, "truetype" );
if (!driver) Panic( "could not find the TrueType driver in FreeType 2\n" );
-
+
FT_Set_Debug_Hook( library,
FT_DEBUG_HOOK_TRUETYPE,
(FT_DebugHook_Func)RunIns );
@@ -1219,7 +1219,7 @@ int glyph_size;
error = FT_Err_Invalid_File_Format;
Panic( "This is not a TrueType font" );
}
-
+
size = (TT_Size)face->root.size;
if (glyph_index < 0)
diff --git a/docs/design/build-system.html b/docs/design/build-system.html
index acc4ced..b548b45 100644
--- a/docs/design/build-system.html
+++ b/docs/design/build-system.html
@@ -56,7 +56,7 @@
<li><a href="#overview-1-b">b. Selecting another build configuration</a>
</ul>
</p>
-
+
<li><a href="#overview-2">2. Library compilation</a>
</ul>
<p><font size="+1"><a href="#setup">III. Build setup details</a></font></p>
@@ -274,17 +274,17 @@
<font color="purple">C:\FreeType> make</font>
FreeType build system -- automatic system detection
-
+
The following settings are used:
-
+
platform win32
compiler gcc
configuration directory ./config/win32
- configuration rules ./config/win32/w32-gcc.mk
-
+ configuration rules ./config/win32/w32-gcc.mk
+
If this does not correspond to your system or settings please remove the file
'config.mk' from this directory then read the INSTALL file for help.
-
+
Otherwise, simply type 'make' again to build the library.
<font color="purple">C:\FreeType></font>
@@ -353,20 +353,20 @@
<ul>
<li><p><b>Compiling the <tt>ftsystem</tt> component</b><br><ul>
- It encapsulates all low-level operations (memory management +
+ It encapsulates all low-level operations (memory management +
i/o access) for the library. Its default version, located in
<tt>./src/base/ftsystem.c</tt> uses the ANSI C library but
system-specific implementations are also available to
improve performance (e.g. memory-mapped files on Unix).
</ul></p>
-
+
<li><p><b>Compiling the <em>base layer</em> and optional components</b><br><ul>
They provide the library's high-level API as well as various useful
routines for client applications. Many features of the base layer can
be activated or not depending on a configuration file named
<tt>ftoption.h</tt>
</ul></p>
-
+
<li><p><b>Compiling the <em>modules</em></b><br><ul>
Each module is used to support a specific font format (it is then
called a <em>font driver</em>), or to provide helper services to
@@ -374,7 +374,7 @@
sub-directories of <tt>./src</tt>, like <tt>./src/truetype</tt>,
<tt>./src/type1</tt>.
</ul></p>
-
+
<li><p><b>Compiling the <tt>ftinit</tt> component</b><br><ul>
This one is in charge of implementing <tt>FT_Init_FreeType</tt>,
the library initialisation routine. It also selects what modules
@@ -414,16 +414,16 @@
<p><center>
<img src="platform-detection.png" border=0>
</center></p>
-
+
<p>Each system-specific <b><tt>detect.mk</tt></b> works as follows:</p>
<ul>
<li><p>It checks that the value of <tt>PLATFORM</tt> is currently set
to <b>ansi</b>, which indicates that no platform was detected
for now. If this isn't true, it doesn't do anything</p>
-
+
<li><p>Otherwise, it runs a series of test to see wether it is on a
system it knows about. Here are a few examples of tests:</p>
-
+
<p><center><table width="80%" cellpadding=5><tr valign=top><td>
<em><b>Unix</b></em>
</td><td>
@@ -446,10 +446,10 @@
we're on a Win32 system.</p>
</td></tr></table></center>
</p>
-
+
<li><p>It sets the value of <tt>PLATFORM</tt> to a new value corresponding
to its platform.</p>
-
+
<li><p>It then tries to select a configuration
sub-makefile, depending on the current platform and any optional
make target (like "visualc" or "devel", etc..). Note that it can
@@ -465,17 +465,17 @@
<ul>
<li>A new subdirectory, in <tt>./config</tt>, with a file named
<tt>detect.mk</tt> in it, containing relevant checks for the system.
-
+
<li>One or more configuration sub-makefiles that will get copied to
<tt>config.mk</tt> at build setup time. You can use the one in
<tt>./config/ansi/config.mk</tt> as a template.
- </ul>
+ </ul>
<p>Similary, supporting a new compiler on an existing system simply means:</p>
<ul>
<li>Writing a new config sub-makefile that contains definitions used to
specify the compiler and flags for the build.
-
+
<li>Change your <tt>./config/<em>system</em>/detect.mk</tt> to recognize
a new optional build target that will copy your new config sub-makefile
instead of the default one.
@@ -496,14 +496,14 @@
the host environment, like the compiler, compilation flags,
object file suffix, the directory where all object files are
placed, etc..</p>
-
+
<li><p>If <tt>BUILD_FREETYPE</tt> is defined, it includes the file
<tt><b>./config/freetype.mk</b></tt>, which is in charge of
defining all the rules used to build the library object files.
(The test is useful to use the <tt>config.mk</tt> file to
compile other projects that rely on FreeType 2, like its
demonstration programs).</p>
-
+
<li><p>Finally, it defines the rule(s) used to link FreeType 2 object files
into a library file (e.g. <tt>libfreetype.a</tt>, <tt>freetype.lib</tt>,
<tt>freetype.dll</tt>, ...). Unfortunately, the command line interface of link tools is
@@ -525,7 +525,7 @@
<pre><font color="blue">
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
-</font></pre>
+</font></pre>
<p>to include one the FreeType 2 public header files. <tt>freetype.mk</tt>
uses a variable named <tt><b>INCLUDES</b></tt> to hold the inclusion
@@ -535,17 +535,17 @@
<p><tt>freetype.mk</tt> uses a variable named <tt><b>INCLUDES</b></tt>
to hold directory inclusion-path to be used when compiling the library.
It always add <tt>./include</tt> to this variable, which means
-
+
</ul>
<h4>b. Configuration header files:</h4>
-<ul>
+<ul>
<p>Three header files used to configure the compilation of the
FreeType 2 library. Their default versions are all located in the
directory <tt><b>./include/freetype/config/</b></tt>, even though
project specific versions can be provided on a given build, as
described later:</p>
-
+
<ul>
<p><b><tt>#include <freetype/config/ftoption.h></tt></b><br><ul>
This file contains a set of configuration macro definitions that
@@ -557,7 +557,7 @@
You might need to provide an alternative version of <tt>ftoption.h</tt>
for one of your own projects.
</ul></p>
-
+
<p><b><tt>#include <freetype/config/ftconfig.h></tt></b><br><ul>
This file includes <tt>ftoption.h</tt> but also contains some automatic
macro definitions used to indicate some important system-specific
@@ -566,7 +566,7 @@
You shouldn't normally need to change or provide an alternative
version of this file.
</ul></p>
-
+
<p><b><tt>#include <freetype/config/ftmodule.h></tt></b><br><ul>
This file is very special, as it is normally machine-generated, and
@@ -583,13 +583,13 @@
<tt>./src</tt>.
</ul></p>
</ul>
-
+
<p>Note that we strongly advise you to avoid modifying the config files
within the FreeType 2 source directory hierarchy. Rather, it's possible
to specify alternative versions through the help of a build-specific
include path that is include before <tt>./include</tt> in the inclusion
path.</p>
-
+
<p>For example, imagine that your platform, named <em>foo</em>, needs a
specific version of <tt>ftoption.h</tt>
</ul>
@@ -600,14 +600,14 @@
and i/o access) within a single component called <tt><b>ftsystem</b></tt>.
Its default implementation uses the <em>ANSI C Library</em> and is located
in <tt>./src/base/ftsystem.c</tt>.</p>
-
+
<p>However, some alternate, system-specific, implementations of
<tt>ftsystem</tt> are provided with the library in order to support more
efficient and advanced features. As an example, the file
<tt>./config/unix/ftsystem.c</tt> is an implementation that
uses memory-mapped files rather than the slow ANSI <tt>fopen</tt>,
<tt>fread</tt> and <tt>fseek</tt>, boosting performance significantly.</p>
-
+
<p>The build system is thus capable of managing alternate implementations
of <tt>ftsystem</tt></p>
</ul>
@@ -638,7 +638,7 @@
code located in a sub-directory of <tt>./src</tt> that contains a file
named <tt><b>rules.</b></tt>, for example:
<tt>src/sfnt</tt>, <tt>src/truetype</tt>, <tt>src/type1</tt>, ...</p>
-
+
<p>The <tt><b>rules.</b></tt> file simply contains directives used by the
build system to compile the corresponding module into a single object
file.</p>
diff --git a/docs/design/io-frames.html b/docs/design/io-frames.html
index 61ad381..6bd515a 100644
--- a/docs/design/io-frames.html
+++ b/docs/design/io-frames.html
@@ -51,10 +51,10 @@ FreeType 2.0 I/O Frames</h1></center>
<font color="blue"><pre>
error = read_short(stream, &str.value1);
if (error) goto ...
-
+
error = read_ulong(stream, &str.value2);
if (error) goto ...
-
+
error = read_ulong(stream, &str.value3);
if (error) goto ...
</pre></font>
@@ -63,11 +63,11 @@ FreeType 2.0 I/O Frames</h1></center>
<font color="blue"><pre>
error = FT_Access_Frame(stream, 2+4+4);
if (error) goto ...
-
+
str.value1 = FT_Get_Short(stream);
str.value2 = FT_Get_ULong(stream);
str.value3 = FT_Get_ULong(stream);
-
+
FT_Forget_Frame(stream);
</pre></font>
<p>
@@ -126,63 +126,63 @@ FreeType 2.0 I/O Frames</h1></center>
<table>
<tr>
<td><b>Macro name</b> <td>Translation <td>Description
-
+
<tr><td><font color="purple"><tt><b>
GET_Byte()
</b></tt></font><td><font color="blue"><tt>
(FT_Get_Byte(stream))
</tt></font><td>
reads an 8-bit unsigned byte
-
+
<tr><td><font color="purple"><tt><b>
GET_Char()
</b></tt></font><td><font color="blue"><tt>
((FT_Char)FT_Get_Byte(stream))
</tt></font><td>
reads an 8-bit <em>signed</em> byte
-
+
<tr><td><font color="purple"><tt><b>
GET_Short()
</b></tt></font><td><font color="blue"><tt>
(FT_Get_Short(stream))
</tt></font><td>
reads a 16-bit signed big-endian integer
-
+
<tr><td><font color="purple"><tt><b>
GET_UShort()
</b></tt></font><td><font color="blue"><tt>
((FT_UShort)FT_Get_Short(stream))
</tt></font><td>
reads a 16-bit unsigned big-endian integer
-
+
<tr><td><font color="purple"><tt><b>
GET_Offset()
</b></tt></font><td><font color="blue"><tt>
(FT_Get_Offset(stream))
</tt></font><td>
reads a 24-bit signed big-endian integer
-
+
<tr><td><font color="purple"><tt><b>
GET_UOffset()
</b></tt></font><td><font color="blue"><tt>
((FT_UOffset)FT_Get_Offset(stream))
</tt></font><td>
reads a 24-bit unsigned big-endian integer
-
+
<tr><td><font color="purple"><tt><b>
GET_Long()
</b></tt></font><td><font color="blue"><tt>
(FT_Get_Long(stream))
</tt></font><td>
reads a 32-bit signed big-endian integer
-
+
<tr><td><font color="purple"><tt><b>
GET_ULong()
</b></tt></font><td><font color="blue"><tt>
((FT_ULong)FT_Get_Long(stream))
</tt></font><td>
reads a 32-bit unsigned big-endian integer
-
+
</table>
</ul>
<p>
@@ -192,22 +192,22 @@ FreeType 2.0 I/O Frames</h1></center>
<font color="blue"><pre>
error = FT_Access_Frame(stream, 2+4+4);
if (error) goto ...
-
+
str.value1 = FT_Get_Short(stream);
str.value2 = FT_Get_ULong(stream);
str.value3 = FT_Get_ULong(stream);
-
+
FT_Forget_Frame(stream);<br>
</pre></font>
<p>
Can be replaced with macros by:<p>
<font color="blue"><pre>
if ( ACCESS_Frame( 2+4+4 ) ) goto ...
-
+
str.value1 = GET_Short();
str.value2 = GET_ULong();
str.value3 = GET_ULong();
-
+
FORGET_Frame();
</pre></font>
<p>
diff --git a/docs/tutorial/index.html b/docs/tutorial/index.html
index f6413cb..0f4c74c 100644
--- a/docs/tutorial/index.html
+++ b/docs/tutorial/index.html
@@ -56,14 +56,14 @@ FreeType 2.0 Tutorial</h1></center>
<ul>
Simply create a variable of type <tt>FT_Library</tt> named, for example,
<tt>library</tt>, and call the function <tt>FT_Init_FreeType</tt> as in:
-
+
<font color="blue"><pre>
#include <freetype/freetype.h>
-
+
FT_Library library;
-
+
....
-
+
{
..
error = FT_Init_FreeType( &library );
@@ -76,7 +76,7 @@ FreeType 2.0 Tutorial</h1></center>
<li>Creating a new instance of the FreeType 2 library, and set
the handle <tt>library</tt> to it.
<p>
-
+
<li>Load each font driver that FreeType knows about in the library.
This means that by default, your new <tt>library</tt> object is
able to handle TrueType and Type 1 fonts gracefully.
@@ -101,13 +101,13 @@ FreeType 2.0 Tutorial</h1></center>
two different faces.
<p>
<font color="blue"><pre>
-
+
FT_Library library; /* handle to library */
FT_Face face; /* handle to face object */
error = FT_Init_FreeType( &library );
if (error) { ..... }
-
+
error = FT_New_Face( library,
"/usr/share/fonts/truetype/arial.ttf",
0,
@@ -131,17 +131,17 @@ FreeType 2.0 Tutorial</h1></center>
<tr valign="top"><td><tt><b>library</b></tt>
<td>handle to the FreeType library instance where the face object is
created
-
+
<tr valign="top"><td><tt><b>filepathname</b></tt>
<td>the font file pathname (standard C string).
-
+
<tr valign="top"><td><tt><b>face_index</b></tt>
<td>Certain font formats allow several font faces to be embedded in
a single file.<br>
This index tells which face you want to load. An
error will be returned if its value is too large.<br>
Index 0 always work though.
-
+
<tr><td><tt><b>face</b></tt>
<td>A <em>pointer</em> to the handle that will be set to
describe the new face object.<br>
@@ -155,7 +155,7 @@ FreeType 2.0 Tutorial</h1></center>
the font file.
</ul>
<p>
-
+
<h4>b. From memory:</h4>
<ul>
In the case where you have already loaded the font file in memory, you
@@ -163,13 +163,13 @@ FreeType 2.0 Tutorial</h1></center>
<tt>FT_New_Memory_Face</tt> as in:
<p>
<font color="blue"><pre>
-
+
FT_Library library; /* handle to library */
FT_Face face; /* handle to face object */
error = FT_Init_FreeType( &library );
if (error) { ..... }
-
+
error = FT_New_Memory_Face( library,
buffer, /* first byte in memory */
size, /* size in bytes */
@@ -184,7 +184,7 @@ FreeType 2.0 Tutorial</h1></center>
<tt>FT_New_Face</tt>.
</ul>
<p>
-
+
<h4>c. From other sources: (compressed files, network, etc..)</h4>
<ul>
There are cases where using a filepathname or preloading the file in
@@ -215,7 +215,7 @@ FreeType 2.0 Tutorial</h1></center>
<td>gives the number of <em>glyphs</em> available in the font face. A glyph
is simply a character image. It doesn't necessarily correspond to
a <em>character code</em> though.
-
+
<tr valign="top">
<td><tt><b>face−>flags</b></tt>
<td>a 32-bit integer containing bit flags used to describe some face
@@ -224,13 +224,13 @@ FreeType 2.0 Tutorial</h1></center>
glyph images can be rendered for all character pixel sizes. For more
information on face flags, please read the <a href="#">FreeType API
Reference</a>
-
+
<tr valign="top">
<td><tt><b>face−>units_per_EM</b></tt>
<td>This field is only valid for scalable formats (it is set to 0
otherwise). It indicates the number of font units covered by the
EM.
-
+
<tr valign="top">
<td><tt><b>face−>num_fixed_sizes</b></tt>
<td>this field gives the number of embedded bitmap <em>strikes</em> in
@@ -280,16 +280,16 @@ FreeType 2.0 Tutorial</h1></center>
You'll notice that:<p>
<ul>
<li>The character width and heights are specified in 1/64th of points.<p>
-
+
<li>The horizontal and vertical device resolutions are expressed in
<em>dots-per-inch</em>, or <em>dpi</em>. You can use 72 or 96 dpi
for display devices like the screen.<p>
-
+
<li>A value of 0 for the character width means "<em>same as character
height</em>", a value of 0 for the character height means
"<em>same as character width</em>". Otherwise, it is possible to
specify different char width and height.<p>
-
+
<li>Using a value of 0 for the horizontal or vertical resolution means
72 dpi, which is the default.
<p>
@@ -362,7 +362,7 @@ FreeType 2.0 Tutorial</h1></center>
<p>
</ul>
<p>
-
+
<h4>b. Loading a glyph from the face:</h4>
<ul>
Once you have a glyph index, you can load the corresponding glyph image.
@@ -397,13 +397,13 @@ FreeType 2.0 Tutorial</h1></center>
bitmaps are favored over outlines as they usually correspond to
higher-quality images of the same glyph).
<p>
-
+
<li>if there is an outline for the corresponding glyph, load it
unless <tt>FT_LOAD_NO_OUTLINE</tt> is set. Otherwise, scale it
to the current size, unless the <tt>FT_LOAD_NO_SCALE</tt> flag
is set.
<p>
-
+
<li>if the outline was loaded and scaled, try to grid-fit it (which
dramatically improves its quality) unless the flag
<tt>FT_LOAD_NO_HINTING</tt> is set.
@@ -413,7 +413,7 @@ FreeType 2.0 Tutorial</h1></center>
details see the <a href="#">FreeType 2 API Reference</a>.
</ul>
<p>
-
+
<h4>c. Using other charmaps:</h4>
<ul>
As said before, when a new face object is created, it will look for
@@ -445,7 +445,7 @@ FreeType 2.0 Tutorial</h1></center>
FT_CharMap found = 0;
FT_CharMap charmap;
int n;
-
+
for ( n = 0; n < face->num_charmaps; n++ )
{
charmap = face>charmaps[n];
@@ -457,7 +457,7 @@ FreeType 2.0 Tutorial</h1></center>
}
if (!found) { ... }
-
+
/* now, select the charmap for the face object */
error = FT_Set_CharMap( face, found );
if (error) { .... }
@@ -465,7 +465,7 @@ FreeType 2.0 Tutorial</h1></center>
<p>
One might now call <tt>FT_Get_Char_Index</tt> with Big5 character codes
to retrieve glyph indices.
- <p>
+ <p>
</ul>
<p>
</ul>
@@ -506,7 +506,7 @@ FreeType 2.0 Tutorial</h1></center>
<td>Indicates the type of the loaded glyph image. Can be either
<tt>ft_glyph_format_bitmap</tt>, <tt>ft_glyph_format_outline</tt>
or other values.
-
+
<tr valign="top">
<td><tt><b>glyph−>metrics</b></tt>
<td>A simple structure used to hold the glyph image's metrics. Note
@@ -526,7 +526,7 @@ FreeType 2.0 Tutorial</h1></center>
describes it. See the definition of the <tt>FT_Outline</tt>
structure.
</table>
- <p>
+ <p>
</ul>
<h3>8. Rendering glyph outlines into bitmaps:</h3>
@@ -542,9 +542,9 @@ FreeType 2.0 Tutorial</h1></center>
or something else, the library provides a means to convert such glyph
images to bitmaps through what are called <b>rasters</b>.
<p>
-
-
-
+
+
+
On the other hand, when the image is a scalable outline, or something else,
FreeType provides a function to convert the glyph image into a
pre-existing bitmap that you'll handle to it, named
@@ -556,26 +556,26 @@ FreeType 2.0 Tutorial</h1></center>
FT_GlyphSlot glyph;
.... load glyph ...
-
+
glyph = face->glyph; /* shortcut to glyph data */
if (glyph->format == ft_glyph_format_outline )
{
FT_Bitmap bit;
-
+
/* set-up a bitmap descriptor for our target bitmap */
bit.rows = bitmap_height;
bit.width = bitmap_width;
bit.pitch = bitmap_row_bytes;
bit.pixel_mode = ft_pixel_mode_mono; /* render into a mono bitmap */
bit.buffer = bitmap_buffer;
-
+
/* render the outline directly into the bitmap */
error = FT_Get_Glyph_Bitmap( face, &bit );
if (error) { ... }
- }
+ }
}
</pre></font>
- <p>
+ <p>
You should note that <b><em><tt>FT_Get_Glyph_Bitmap</tt> doesn't create the
bitmap.</em></b> It only needs a descriptor, of type <tt>FT_Bitmap</tt>,
and writes directly into it.
@@ -590,12 +590,12 @@ FreeType 2.0 Tutorial</h1></center>
FT_GlyphSlot glyph;
.... load glyph ...
-
+
glyph = face->glyph; /* shortcut to glyph data */
if (glyph->format == ft_glyph_format_outline )
{
FT_Bitmap bit;
-
+
/* set-up a bitmap descriptor for our target bitmap */
bit.rows = bitmap_height;
bit.width = bitmap_width;
@@ -606,11 +606,11 @@ FreeType 2.0 Tutorial</h1></center>
/* clean the bitmap - IMPORTANT */
memset( bit.buffer, 0, bit.rows*bit.pitch );
-
+
/* render the outline directly into the bitmap */
error = FT_Get_Glyph_Bitmap( face, &bit );
if (error) { ... }
- }
+ }
}
</pre></font>
<p>
@@ -618,17 +618,17 @@ FreeType 2.0 Tutorial</h1></center>
<ul>
<li>As previously, <tt>FT_Get_Glyph_Bitmap</tt> doesn't generate the
bitmap, it simply renders to it.<p>
-
+
<li>The target bitmap must be cleaned before calling the function. This
is a limitation of our current anti-aliasing algorithm and is
EXTREMELY important.<p>
-
+
<li>The anti-aliaser uses 128 levels of grays exclusively for now (this
will probably change in a near future). This means that you <b>must</b>
set <tt>bit.grays</tt> to 128. The generated image uses values from
0 (back color) to 127 (foreground color).
- <p>
-
+ <p>
+
<li>It is <b>not</b> possible to render directly an anti-aliased outline into
a pre-existing gray-level bitmap, or even any colored-format one
(like RGB16 or paletted 8-bits). We will not discuss this issue in
@@ -640,6 +640,6 @@ FreeType 2.0 Tutorial</h1></center>
</ul>
</td></tr></table>
-</center>
+</center>
<p><hr>
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index c1c5253..5a6fcab 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -943,12 +943,12 @@
/* returned by FT_Load_Glyph(). */
/* */
/* */
-
+
enum
{
ft_glyph_own_bitmap = 1
};
-
+
typedef struct FT_GlyphSlotRec_
{
FT_Face face;
diff --git a/include/freetype/fterrors.h b/include/freetype/fterrors.h
index aa67c20..e918f16 100644
--- a/include/freetype/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -47,15 +47,15 @@ FT_ERROR_START_LIST
FT_ERRORDEF( FT_Err_Cannot_Open_Resource, 0x0001, "can't open stream" )
FT_ERRORDEF( FT_Err_Unknown_File_Format, 0x0002, "unknown file format" )
FT_ERRORDEF( FT_Err_Invalid_File_Format, 0x0003, "broken file" )
-
+
FT_ERRORDEF( FT_Err_Invalid_Argument, 0x0010, "invalid argument" )
FT_ERRORDEF( FT_Err_Invalid_Handle, 0x0011, "invalid object handle" )
FT_ERRORDEF( FT_Err_Invalid_Glyph_Index, 0x0012, "invalid glyph index" )
FT_ERRORDEF( FT_Err_Invalid_Character_Code, 0x0013, "invalid character code" )
-
+
FT_ERRORDEF( FT_Err_Unimplemented_Feature, 0x0020, "unimplemented feature" )
FT_ERRORDEF( FT_Err_Invalid_Glyph_Format, 0x0021, "invalid glyph image format" )
-
+
FT_ERRORDEF( FT_Err_Invalid_Library_Handle, 0x0030, "invalid library handle" )
FT_ERRORDEF( FT_Err_Invalid_Driver_Handle, 0x0031, "invalid module handle" )
FT_ERRORDEF( FT_Err_Invalid_Face_Handle, 0x0032, "invalid face handle" )
@@ -64,7 +64,7 @@ FT_ERROR_START_LIST
FT_ERRORDEF( FT_Err_Invalid_CharMap_Handle, 0x0035, "invalid charmap handle" )
FT_ERRORDEF( FT_Err_Invalid_Outline, 0x0036, "invalid outline" )
FT_ERRORDEF( FT_Err_Invalid_Dimensions, 0x0037, "invalid dimensions" )
-
+
FT_ERRORDEF( FT_Err_Unavailable_Outline, 0x0040, "unavailable outline" )
FT_ERRORDEF( FT_Err_Unavailable_Bitmap, 0x0041, "unavailable bitmap" )
FT_ERRORDEF( FT_Err_File_Is_Not_Collection, 0x0042, "file is not a font collection" )
@@ -84,7 +84,7 @@ FT_ERROR_START_LIST
FT_ERRORDEF( FT_Err_Invalid_Frame_Operation, 0x0066, "invalid frame operation" )
FT_ERRORDEF( FT_Err_Nested_Frame_Access, 0x0067, "nested frame access" )
FT_ERRORDEF( FT_Err_Invalid_Frame_Read, 0x0068, "invalid frame read" )
-
+
FT_ERRORDEF( FT_Err_Too_Many_Points, 0x0070, "too many points in glyph" )
FT_ERRORDEF( FT_Err_Too_Many_Contours, 0x0071, "too many contours in glyph" )
FT_ERRORDEF( FT_Err_Invalid_Composite, 0x0072, "invalid composite glyph" )
@@ -97,7 +97,7 @@ FT_ERROR_START_LIST
/* range 0x500 - 0x5FF is reserved for TrueDoc specific stuff */
/* range 0x600 - 0x6FF is reserved for Type1 specific stuff */
-
+
FT_ERRORDEF( FT_Err_Raster_Uninitialized, 0x0080, "raster uninitialized" )
FT_ERRORDEF( FT_Err_Raster_Corrupted, 0x0081, "raster corrupted !!" )
FT_ERRORDEF( FT_Err_Raster_Overflow, 0x0082, "raster overflow !!" )
diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h
index 71138ca..853dc25 100644
--- a/include/freetype/ftglyph.h
+++ b/include/freetype/ftglyph.h
@@ -29,11 +29,11 @@
#include <freetype/freetype.h>
typedef enum {
-
+
ft_glyph_type_none = 0,
ft_glyph_type_bitmap = 1,
ft_glyph_type_outline = 2
-
+
} FT_GlyphType;
/***********************************************************************
@@ -68,7 +68,7 @@
* float sub-pixels (i.e. 1/64th of pixels).
*
* the vertical bearing has a positive value when the glyph top is
- * above the baseline, and negative when it is under..
+ * above the baseline, and negative when it is under..
*
***********************************************************************/
@@ -81,7 +81,7 @@
FT_Int bearingX;
FT_Int bearingY;
FT_Int advance;
-
+
} FT_GlyphRec, *FT_Glyph;
@@ -91,7 +91,7 @@
* FT_BitmapGlyphRec
*
* <Description>
- * A structure used to describe a bitmap glyph image..
+ * A structure used to describe a bitmap glyph image..
* Note that the FT_BitmapGlyph type is a pointer to FT_BitmapGlyphRec
*
* <Field>
@@ -111,14 +111,14 @@
* and is thus creatde and destroyed with it..
*
***********************************************************************/
-
+
typedef struct FT_BitmapGlyphRec_
{
FT_GlyphRec metrics;
FT_Int left;
FT_Int top;
FT_Bitmap bitmap;
-
+
} FT_BitmapGlyphRec_, *FT_BitmapGlyph;
@@ -128,7 +128,7 @@
* FT_OutlineGlyphRec
*
* <Description>
- * A structure used to describe a vectorial outline glyph image..
+ * A structure used to describe a vectorial outline glyph image..
* Note that the FT_OutlineGlyph type is a pointer to FT_OutlineGlyphRec
*
* <Field>
@@ -147,12 +147,12 @@
* function FT_OutlineGlyph_Render()
*
***********************************************************************/
-
+
typedef struct FT_OutlineGlyphRec_
{
FT_GlyphRec metrics;
FT_Outline outline;
-
+
} FT_OutlineGlyphRec_, *FT_OutlineGlyph;
@@ -221,7 +221,7 @@
* face :: handle to source face object
* glyph_index :: glyph index in face
* load_flags :: load flags, see FT_LOAD_FLAG_XXXX constants..
- *
+ *
* <Output>
* vecglyph :: pointer to the new outline glyph
*
@@ -236,7 +236,7 @@
* FT_LOAD_NO_RECURSE are set..
*
***********************************************************************/
-
+
EXPORT_DEF(FT_Error) FT_Get_Glyph_Outline( FT_Face face,
FT_UInt glyph_index,
FT_UInt load_flags,
@@ -250,7 +250,7 @@
*
* <Description>
* A function used to set the transform that is applied to glyph images
- * just after they're loaded in the face's glyph slot, and before they're
+ * just after they're loaded in the face's glyph slot, and before they're
* returned by either FT_Get_Glyph_Bitmap or FT_Get_Glyph_Outline
*
* <Input>
@@ -263,7 +263,7 @@
* in a font face. It is unable to transform embedded glyph bitmaps
*
***********************************************************************/
-
+
EXPORT_DEF(void) FT_Set_Transform( FT_Face face,
FT_Matrix* matrix,
FT_Vector* delta );
@@ -278,10 +278,10 @@
* Destroys a given glyph..
*
* <Input>
- * glyph :: handle to target glyph object
+ * glyph :: handle to target glyph object
*
***********************************************************************/
-
+
EXPORT_DEF(void) FT_Done_Glyph( FT_Glyph glyph );
@@ -294,7 +294,7 @@
* Returns the glyph image's bounding box in pixels.
*
* <Input>
- * glyph :: handle to target glyph object
+ * glyph :: handle to target glyph object
*
* <Output>
* box :: the glyph bounding box. Coordinates are expressed in
@@ -308,7 +308,7 @@
* The height is box.yMax - box.yMin
*
***********************************************************************/
-
+
EXPORT_DEF(void) FT_Glyph_Get_Box( FT_Glyph glyph,
FT_BBox *box );
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index c4443df..77bb368 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -857,7 +857,7 @@
*
* <Input>
* raster :: handle to new raster object
- * mode :: a 4-byte tag used to name the mode or property
+ * mode :: a 4-byte tag used to name the mode or property
* args :: a pointer to the new mode/property to use
*
**************************************************************************/
diff --git a/include/freetype/internal/autohint.h b/include/freetype/internal/autohint.h
index fced489..4a995f8 100644
--- a/include/freetype/internal/autohint.h
+++ b/include/freetype/internal/autohint.h
@@ -190,11 +190,11 @@
FT_AutoHinter_Init_Func init_autohinter;
FT_AutoHinter_Done_Func done_autohinter;
FT_AutoHinter_Load_Func load_glyph;
-
+
FT_AutoHinter_Get_Global_Func get_global_hints;
FT_AutoHinter_Done_Global_Func done_global_hints;
- } FT_AutoHinter_Interface;
+ } FT_AutoHinter_Interface;
#endif /* AUTOHINT_H */
diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h
index 5acbc6c..8a00da1 100644
--- a/include/freetype/internal/ftcalc.h
+++ b/include/freetype/internal/ftcalc.h
@@ -42,7 +42,7 @@
#define SQRT_64( z ) FT_Sqrt64( z )
EXPORT_DEF(FT_Int32) FT_Sqrt64( FT_Int64 x );
-
+
#endif /* OLD_CALCS */
#else /* LONG64 */
@@ -61,7 +61,7 @@
EXPORT_DEF(void) FT_Add64 ( FT_Int64* x, FT_Int64* y, FT_Int64* z );
EXPORT_DEF(void) FT_MulTo64 ( FT_Int32 x, FT_Int32 y, FT_Int64* z );
-
+
EXPORT_DEF(FT_Int32) FT_Div64by32( FT_Int64* x, FT_Int32 y );
#ifdef FT_CONFIG_OPTION_OLD_CALCS
@@ -69,7 +69,7 @@
#define SQRT_64( z ) FT_Sqrt64( &z )
EXPORT_DEF(FT_Int32) FT_Sqrt64( FT_Int64* x );
-
+
#endif /* OLD_CALC */
#endif /* LONG64 */
diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h
index 68d416b..b89afef 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
@@ -72,7 +72,7 @@
/* */
typedef FT_Error (*FTDriver_doneDriver)( FT_Driver driver );
-
+
typedef void (*FTDriver_Interface)( void );
/*************************************************************************/
diff --git a/include/freetype/internal/ftextend.h b/include/freetype/internal/ftextend.h
index 7c5c526..73dbb59 100644
--- a/include/freetype/internal/ftextend.h
+++ b/include/freetype/internal/ftextend.h
@@ -55,7 +55,7 @@
/* data, as the finalizer will get called later by the function's */
/* caller. */
/* */
- typedef FT_Error (*FT_Extension_Initializer)( void* ext,
+ typedef FT_Error (*FT_Extension_Initializer)( void* ext,
FT_Face face );
@@ -114,11 +114,11 @@
FT_Extension_Initializer init;
FT_Extension_Finalizer finalize;
void* interface;
-
+
FT_ULong offset;
-
+
} FT_Extension_Class;
-
+
EXPORT_DEF(FT_Error) FT_Register_Extension( FT_Driver driver,
FT_Extension_Class* clazz );
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 55eefab..ad95592 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -181,11 +181,11 @@
* n_contours :: current number of contours in zone
* org :: original glyph coordinates (font units/scaled)
* cur :: current glyph coordinates (scaled/hinted)
- * tags :: point control tags
+ * tags :: point control tags
* contours :: contour end points
*
***********************************************************************/
-
+
typedef struct FT_GlyphZone_
{
FT_Memory memory;
@@ -209,7 +209,7 @@
FT_GlyphZone* zone );
BASE_DEF(void) FT_Done_GlyphZone( FT_GlyphZone* zone );
-
+
BASE_DEF(FT_Error) FT_Update_GlyphZone( FT_GlyphZone* zone,
FT_UShort num_points,
FT_Short num_contours );
@@ -260,7 +260,7 @@
/* ideally be changed dynamically at run-time. */
/* */
typedef void (*FT_DebugHook_Func)( void* arg );
-
+
typedef struct FT_LibraryRec_
{
FT_Memory memory; /* library's memory object */
diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h
index bfb2a5e..ec9d331 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -27,15 +27,15 @@ typedef enum FT_Frame_Op_
{
ft_frame_end = 0,
ft_frame_start = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ),
-
+
ft_frame_byte = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 0 ),
ft_frame_schar = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 1 ),
-
+
ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ),
ft_frame_short_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ),
ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ),
ft_frame_short_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ),
-
+
ft_frame_ulong_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ),
ft_frame_ulong_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ),
ft_frame_long_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ),
@@ -54,7 +54,7 @@ typedef struct FT_Frame_Field_
FT_Frame_Op value;
char size;
FT_UShort offset;
-
+
} FT_Frame_Field;
/* make-up a FT_Frame_Field out of a structure type and a field name */
@@ -171,53 +171,53 @@ typedef struct FT_Frame_Field_
void* base,
unsigned long size,
FT_Stream stream );
-
+
BASE_DEF(FT_Error) FT_Seek_Stream( FT_Stream stream,
FT_ULong pos );
BASE_DEF(FT_Error) FT_Skip_Stream( FT_Stream stream,
FT_Long distance );
-
+
BASE_DEF(FT_Long) FT_Stream_Pos( FT_Stream stream );
BASE_DEF(FT_Error) FT_Read_Stream( FT_Stream stream,
void* buffer,
FT_ULong count );
-
+
BASE_DEF(FT_Error) FT_Read_Stream_At( FT_Stream stream,
FT_ULong pos,
void* buffer,
FT_ULong count );
-
+
BASE_DEF(FT_Error) FT_Access_Frame( FT_Stream stream,
FT_ULong count );
-
+
BASE_DEF(void) FT_Forget_Frame( FT_Stream stream );
BASE_DEF(FT_Char) FT_Get_Char( FT_Stream stream );
-
+
BASE_DEF(FT_Short) FT_Get_Short( FT_Stream stream );
-
+
BASE_DEF(FT_Long) FT_Get_Offset( FT_Stream stream );
-
+
BASE_DEF(FT_Long) FT_Get_Long( FT_Stream stream );
BASE_DEF(FT_Char) FT_Read_Char( FT_Stream stream,
- FT_Error* error );
+ FT_Error* error );
BASE_DEF(FT_Short) FT_Read_Short( FT_Stream stream,
- FT_Error* error );
+ FT_Error* error );
BASE_DEF(FT_Long) FT_Read_Offset( FT_Stream stream,
- FT_Error* error );
+ FT_Error* error );
BASE_DEF(FT_Long) FT_Read_Long( FT_Stream stream,
- FT_Error* error );
+ FT_Error* error );
BASE_DEF(FT_Error) FT_Read_Fields( FT_Stream stream,
const FT_Frame_Field* fields,
diff --git a/include/freetype/internal/psnames.h b/include/freetype/internal/psnames.h
index 53011f3..282a2b0 100644
--- a/include/freetype/internal/psnames.h
+++ b/include/freetype/internal/psnames.h
@@ -65,8 +65,8 @@
* uncode :: unicode value.
*
* <Return>
- * The glyph index. 0xFFFF is no glyph correspond to this Unicode
- * value..
+ * The glyph index. 0xFFFF is no glyph correspond to this Unicode
+ * value..
*
* <Note>
* This function is able to recognize several glyph names per
@@ -87,14 +87,14 @@
* PS_Macintosh_Name_Func
*
* <Description>
- * A function used to return the glyph name corresponding to one
+ * A function used to return the glyph name corresponding to one
* Apple glyph name index.
*
* <Input>
* name_index :: index of the Mac name
*
* <Return>
- * The glyph name, or 0 if the index is incorrect.
+ * The glyph name, or 0 if the index is incorrect.
*
* <Note>
* This function will not be compiled if the configuration macro
@@ -104,8 +104,8 @@
typedef const char* (*PS_Macintosh_Name_Func)( FT_UInt name_index );
-
-
+
+
typedef const char* (*PS_Adobe_Std_Strings_Func)( FT_UInt string_index );
/***************************************************************************
@@ -130,19 +130,19 @@
* corresponding to a given Unicode character code.
*
***************************************************************************/
-
+
typedef struct PS_UniMap_
{
FT_UInt unicode;
FT_UInt glyph_index;
-
+
} PS_UniMap;
-
+
typedef struct PS_Unicodes_
{
FT_UInt num_maps;
PS_UniMap* maps;
-
+
} PS_Unicodes;
@@ -155,14 +155,14 @@
FT_UInt unicode );
/*************************************************************************
- *
- * <Struct>
- * PSNames_Interface
- *
- * <Description>
- * this structure holds pointers to the functions used to load and
- * free the basic tables that are required in a `sfnt' font file.
- *
+ *
+ * <Struct>
+ * PSNames_Interface
+ *
+ * <Description>
+ * this structure holds pointers to the functions used to load and
+ * free the basic tables that are required in a `sfnt' font file.
+ *
* <Field>
* unicode_value :: a function used to convert a glyph name into
* a Unicode character code
@@ -200,11 +200,11 @@
PS_Build_Unicodes_Func build_unicodes;
PS_Lookup_Unicode_Func lookup_unicode;
PS_Macintosh_Name_Func macintosh_name;
-
+
PS_Adobe_Std_Strings_Func adobe_std_strings;
const unsigned short* adobe_std_encoding;
const unsigned short* adobe_expert_encoding;
-
+
} PSNames_Interface;
#endif /* PSNAMES_H */
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index b08492a..9e6eb11 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -161,7 +161,7 @@
/* <Note> */
/* The `map.buffer' field is always freed before the glyph is loaded. */
/* */
- typedef
+ typedef
TT_Error (*TT_Load_SBit_Image_Func)( TT_Face face,
TT_Int x_ppem,
TT_Int y_ppem,
@@ -336,7 +336,7 @@
typedef struct SFNT_Interface_
{
TT_Goto_Table_Func goto_table;
-
+
TT_Load_Any_Func load_any;
TT_Load_Format_Tag_Func load_format_tag;
TT_Load_Directory_Func load_directory;
@@ -363,7 +363,7 @@
TT_Load_Table_Func load_sbits;
TT_Load_SBit_Image_Func load_sbit_image;
TT_Free_Table_Func free_sbits;
-
+
/* see `ttpost.h' */
TT_Get_PS_Name_Func get_psname;
TT_Free_Table_Func free_psnames;
@@ -371,7 +371,7 @@
/* see `ttcmap.h' */
TT_CharMap_Load_Func load_charmap;
TT_CharMap_Free_Func free_charmap;
-
+
} SFNT_Interface;
#endif /* SFNT_H */
diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h
index 9c755f5..e4eaa35 100644
--- a/include/freetype/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
@@ -311,7 +311,7 @@
/* font info dictionary */
T1_FontInfo font_info;
-
+
/* private dictionary */
T1_Private private_dict;
@@ -341,9 +341,9 @@
T1_Long font_id;
T1_Int stroke_width;
-
+
} T1_Font;
-
+
/*************************************************************************/
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index f28c0b9..2a0f46c 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1574,7 +1574,7 @@
/* */
/* <Fields> */
/* loaded :: A flag to indicate whether the PS names are loaded. */
- /* */
+ /* */
/* format_20 :: The sub-table used for format 2.0. */
/* */
/* format_25 :: The sub-table used for format 2.5. */
@@ -1717,7 +1717,7 @@
{
FT_CharMapRec root;
TT_CMapTable cmap;
-
+
} TT_CharMapRec;
@@ -1997,7 +1997,7 @@
/* TT_Goto_Table defined in `ttload.h', but some font drivers */
/* might need something different, e.g. Type 42 fonts */
TT_Goto_Table_Func goto_table;
-
+
/* a typeless pointer to the SFNT_Interface table used to load */
/* the basic TrueType tables in the face object */
void* sfnt;
diff --git a/include/freetype/t1tables.h b/include/freetype/t1tables.h
index 0f565aa..a25d7f2 100644
--- a/include/freetype/t1tables.h
+++ b/include/freetype/t1tables.h
@@ -35,7 +35,7 @@
* FontInfo.
*
*/
-
+
typedef struct T1_FontInfo
{
FT_String* version;
@@ -47,7 +47,7 @@
FT_Bool is_fixed_pitch;
FT_Short underline_position;
FT_UShort underline_thickness;
-
+
} T1_FontInfo;
@@ -62,7 +62,7 @@
* Private dict.
*
*/
-
+
typedef struct T1_Private
{
@@ -99,18 +99,18 @@
FT_Long password;
FT_Short min_feature[2];
-
+
} T1_Private;
/*************************************************************************
*
- * <Enum>
+ * <Enum>
* T1_Blend_Flags
*
* <Description>
* A set of flags used to indicate which fields are present in a
- * given blen dictionary (font info or private). Used to support
+ * given blen dictionary (font info or private). Used to support
* multiple masters..
*
*/
@@ -122,8 +122,8 @@
t1_blend_underline_position,
t1_blend_underline_thickness,
t1_blend_italic_angle,
-
- /* required fields in a Private blend dictionary */
+
+ /* required fields in a Private blend dictionary */
t1_blend_blue_values,
t1_blend_other_blues,
t1_blend_standard_width,
@@ -138,7 +138,7 @@
/* never remove */
t1_blend_max
-
+
} T1_Flags;
@@ -146,7 +146,7 @@
{
FT_Fixed min;
FT_Fixed max;
-
+
} T1_Blend_Pos;
/*************************************************************************
@@ -163,14 +163,14 @@
{
FT_Int num_axis;
FT_String* axis_types[4];
-
- /* XXXX : add /BlendDesignMap entries */
-
+
+ /* XXXX : add /BlendDesignMap entries */
+
FT_Int num_blends;
T1_Flags* flags [17];
T1_Private* privates [17];
T1_FontInfo* fontinfos[17];
-
+
} T1_Blend;
@@ -183,16 +183,16 @@
FT_UInt num_subrs;
FT_ULong subrmap_offset;
FT_Int sd_bytes;
-
+
} CID_FontDict;
-
+
typedef struct CID_Info_
{
FT_String* cid_font_name;
FT_Fixed cid_version;
FT_Int cid_font_type;
-
+
FT_String* registry;
FT_String* ordering;
FT_Int supplement;
@@ -201,16 +201,16 @@
FT_Int num_xuid;
FT_ULong xuid[16];
-
-
+
+
FT_ULong cidmap_offset;
FT_Int fd_bytes;
FT_Int gd_bytes;
FT_ULong cid_count;
-
+
FT_Int num_font_dicts;
CID_FontDict* font_dicts;
-
+
} CID_Info;
diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h
index 7f98c20..3cd9e4d 100644
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -360,7 +360,7 @@
FT_UShort usDefaultChar;
FT_UShort usBreakChar;
FT_UShort usMaxContext;
-
+
} TT_OS2;
@@ -493,7 +493,7 @@
ft_sfnt_post = 5,
sfnt_max /* don't remove */
-
+
} FT_Sfnt_Tag;
/* internal use only */
@@ -524,7 +524,7 @@
* You can load any table with a different function.. XXX
*
***************************************************************************/
-
+
EXPORT_DEF(void*) FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag );
diff --git a/license.txt b/license.txt
index c42206a..105b6d5 100644
--- a/license.txt
+++ b/license.txt
@@ -117,7 +117,7 @@ Legal Terms
Neither the FreeType authors and contributors nor you shall use
the name of the other for commercial, advertising, or promotional
purposes without specific prior written permission.
-
+
We suggest, but do not require, that you use one or more of the
following phrases to refer to this software in your documentation
or advertising materials: `FreeType Project', `FreeType Engine',
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index c08c40b..2feee69 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -53,7 +53,7 @@
536870912, 759250125, 1073741824, 1518500250,
2147483647
};
-#else
+#else
/*************************************************************************/
/* */
/* <Function> */
@@ -243,12 +243,12 @@
/* <Return> */
/* The 32-bit square-root. */
/* */
-
+
static
int ft_order64( FT_Int64 z )
{
int j = 0;
-
+
while ( z )
{
z = (unsigned INT64)z >> 1;
@@ -678,13 +678,13 @@
/* <Return> */
/* The 32-bit square-root. */
/* */
-
+
static
int ft_order64( FT_Int64* z )
{
FT_Word32 i;
int j;
-
+
i = z->lo;
j = 0;
if ( z->hi )
@@ -692,7 +692,7 @@
i = z->hi;
j = 32;
}
-
+
while ( i > 0 )
{
i >>= 1;
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 4bfb3ce..271a6b5 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -32,11 +32,11 @@
FT_Bool vertical )
{
FT_Glyph_Metrics* metrics = &face->glyph->metrics;
-
+
glyph->memory = face->memory;
glyph->width = metrics->width;
glyph->height = metrics->height;
-
+
if (vertical)
{
glyph->bearingX = metrics->vertBearingX;
@@ -110,13 +110,13 @@
FT_Pos origin_y = 0;
*abitglyph = 0;
-
+
if (origin)
{
origin_x = origin->x & 63;
origin_y = origin->y & 63;
}
-
+
/* check arguments if the face's format is not scalable */
if ( !(face->face_flags & FT_FACE_FLAG_SCALABLE) && face->transform_flags )
{
@@ -135,10 +135,10 @@
/* disable embedded bitmaps for transformed images */
if ( face->face_flags & FT_FACE_FLAG_SCALABLE && face->transform_flags )
load_flags |= FT_LOAD_NO_BITMAP;
-
+
error = FT_Load_Glyph( face, glyph_index, load_flags );
if (error) goto Exit;
-
+
/* now, handle bitmap and outline glyph images */
memory = face->memory;
switch ( face->glyph->format )
@@ -147,22 +147,22 @@
{
FT_Long size;
FT_Bitmap* source;
-
+
if ( ALLOC( bitglyph, sizeof(*bitglyph) ) )
goto Exit;
-
+
glyph = (FT_Glyph)bitglyph;
glyph->glyph_type = ft_glyph_type_bitmap;
ft_prepare_glyph( glyph, face, 0 );
-
+
source = &face->glyph->bitmap;
size = source->rows * source->pitch;
if (size < 0) size = -size;
-
+
bitglyph->bitmap = *source;
if ( ALLOC( bitglyph->bitmap.buffer, size ) )
goto Fail;
-
+
/* copy the content of the source glyph */
MEM_Copy( bitglyph->bitmap.buffer, source->buffer, size );
}
@@ -173,49 +173,49 @@
FT_BBox cbox;
FT_Int width, height, pitch;
FT_Long size;
-
+
/* transform the outline - note that the original metrics are NOT */
/* transformed by this.. only the outline points themselves.. */
FT_Outline_Transform( &face->glyph->outline, &face->transform_matrix );
FT_Outline_Translate( &face->glyph->outline,
face->transform_delta.x + origin_x,
face->transform_delta.y + origin_y );
-
+
/* compute the size in pixels of the outline */
FT_Outline_Get_CBox( &face->glyph->outline, &cbox );
cbox.xMin &= -64;
cbox.yMin &= -64;
cbox.xMax = (cbox.xMax+63) & -64;
cbox.yMax = (cbox.yMax+63) & -64;
-
+
width = (cbox.xMax - cbox.xMin) >> 6;
height = (cbox.yMax - cbox.yMin) >> 6;
/* allocate the pixel buffer for the glyph bitmap */
if (grays) pitch = (width+3) & -4; /* some raster implementation need this */
else pitch = (width+7) >> 3;
-
+
size = pitch * height;
if ( ALLOC( bitglyph, sizeof(*bitglyph) ) )
goto Exit;
-
+
glyph = (FT_Glyph)bitglyph;
glyph->glyph_type = ft_glyph_type_bitmap;
ft_prepare_glyph( glyph, face, 0 );
-
+
if ( ALLOC( bitglyph->bitmap.buffer, size ) )
goto Fail;
-
+
bitglyph->bitmap.width = width;
bitglyph->bitmap.rows = height;
bitglyph->bitmap.pitch = pitch;
bitglyph->bitmap.pixel_mode = grays ? ft_pixel_mode_grays
: ft_pixel_mode_mono;
bitglyph->bitmap.num_grays = (short)grays;
-
+
bitglyph->left = (cbox.xMin >> 6);
bitglyph->top = (cbox.yMax >> 6);
-
+
/* render the monochrome outline into the target buffer */
FT_Outline_Translate( &face->glyph->outline, -cbox.xMin, -cbox.yMin );
error = FT_Outline_Get_Bitmap( face->driver->library,
@@ -228,22 +228,22 @@
}
}
break;
-
+
default:
error = FT_Err_Invalid_Glyph_Index;
goto Exit;
}
-
+
*abitglyph = bitglyph;
Exit:
return error;
-
+
Fail:
FREE( glyph );
goto Exit;
}
-
+
/***********************************************************************
*
* <Function>
@@ -257,7 +257,7 @@
* face :: handle to source face object
* glyph_index :: glyph index in face
* load_flags :: load flags, see FT_LOAD_FLAG_XXXX constants..
- *
+ *
* <Output>
* vecglyph :: pointer to the new outline glyph
*
@@ -269,7 +269,7 @@
* FT_LOAD_NO_RECURSE are set..
*
***********************************************************************/
-
+
EXPORT_FUNC(FT_Error) FT_Get_Glyph_Outline( FT_Face face,
FT_UInt glyph_index,
FT_UInt load_flags,
@@ -280,27 +280,27 @@
FT_OutlineGlyph glyph;
*vecglyph = 0;
-
+
/* check that NO_OUTLINE and NO_RECURSE are not set */
if (load_flags & (FT_LOAD_NO_OUTLINE|FT_LOAD_NO_RECURSE))
{
error = FT_Err_Invalid_Argument;
goto Exit;
}
-
+
/* disable the loading of embedded bitmaps */
load_flags |= FT_LOAD_NO_BITMAP;
-
+
error = FT_Load_Glyph( face, glyph_index, load_flags );
if (error) goto Exit;
-
+
/* check that we really loaded an outline */
if ( face->glyph->format != ft_glyph_format_outline )
{
error = FT_Err_Invalid_Glyph_Index;
goto Exit;
}
-
+
/* transform the outline - note that the original metrics are NOT */
/* transformed by this.. only the outline points themselves.. */
if ( face->transform_flags )
@@ -310,7 +310,7 @@
face->transform_delta.x,
face->transform_delta.y );
}
-
+
/* now, create a new outline glyph and copy everything there */
memory = face->memory;
if ( ALLOC( glyph, sizeof(*glyph) ) )
@@ -318,20 +318,20 @@
ft_prepare_glyph( (FT_Glyph)glyph, face, 0 );
glyph->metrics.glyph_type = ft_glyph_type_outline;
-
+
error = FT_Outline_New( face->driver->library,
face->glyph->outline.n_points,
face->glyph->outline.n_contours,
&glyph->outline );
if (!error)
error = FT_Outline_Copy( &face->glyph->outline, &glyph->outline );
-
+
if (error) goto Fail;
-
+
*vecglyph = glyph;
Exit:
return error;
-
+
Fail:
FREE( glyph );
goto Exit;
@@ -344,7 +344,7 @@
*
* <Description>
* A function used to set the transform that is applied to glyph images
- * just after they're loaded in the face's glyph slot, and before they're
+ * just after they're loaded in the face's glyph slot, and before they're
* returned by either FT_Get_Glyph_Bitmap or FT_Get_Glyph_Outline
*
* <Input>
@@ -357,13 +357,13 @@
* in a font face. It is unable to transform embedded glyph bitmaps
*
***********************************************************************/
-
+
EXPORT_FUNC(void) FT_Set_Transform( FT_Face face,
FT_Matrix* matrix,
FT_Vector* delta )
{
face->transform_flags = 0;
-
+
if (!matrix)
{
face->transform_matrix.xx = 0x10000L;
@@ -374,7 +374,7 @@
}
else
face->transform_matrix = *matrix;
-
+
/* set transform_flags bit flag 0 if delta isn't the null vector */
if ( (matrix->xy | matrix->yx) ||
matrix->xx != 0x10000L ||
@@ -389,7 +389,7 @@
}
else
face->transform_delta = *delta;
-
+
/* set transform_flags bit flag 1 if delta isn't the null vector */
if ( delta->x | delta->y )
face->transform_flags |= 2;
@@ -404,16 +404,16 @@
* Destroys a given glyph..
*
* <Input>
- * glyph :: handle to target glyph object
+ * glyph :: handle to target glyph object
*
***********************************************************************/
-
+
EXPORT_FUNC(void) FT_Done_Glyph( FT_Glyph glyph )
{
if (glyph)
{
FT_Memory memory = glyph->memory;
-
+
if ( glyph->glyph_type == ft_glyph_type_bitmap )
{
FT_BitmapGlyph bit = (FT_BitmapGlyph)glyph;
@@ -429,7 +429,7 @@
FREE( out->outline.tags );
}
}
-
+
FREE( glyph );
}
}
@@ -444,7 +444,7 @@
* Returns the glyph image's bounding box in pixels.
*
* <Input>
- * glyph :: handle to target glyph object
+ * glyph :: handle to target glyph object
*
* <Output>
* box :: the glyph bounding box. Coordinates are expressed in
@@ -458,13 +458,13 @@
* The height is box.yMax - box.yMin
*
***********************************************************************/
-
+
EXPORT_FUNC(void) FT_Glyph_Get_Box( FT_Glyph glyph,
FT_BBox *box )
{
box->xMin = box->xMax = 0;
box->yMin = box->yMax = 0;
-
+
if (glyph) switch (glyph->glyph_type)
{
case ft_glyph_type_bitmap:
@@ -476,11 +476,11 @@
box->yMin = box->yMax - bit->bitmap.rows;
}
break;
-
+
case ft_glyph_type_outline:
{
FT_OutlineGlyph out = (FT_OutlineGlyph)glyph;
-
+
FT_Outline_Get_CBox( &out->outline, box );
box->xMin >>= 6;
box->yMin >>= 6;
@@ -488,7 +488,7 @@
box->yMax = (box->yMax+63) >> 6;
}
break;
-
+
default:
;
}
@@ -502,7 +502,7 @@
/**** ****/
/***************************************************************************/
/***************************************************************************/
-
+
#if 0
/* Compute the norm of a vector */
@@ -542,21 +542,21 @@
hi = (FT_ULong)u >> 16;
lo = (FT_ULong)u & 0xFFFF;
med = hi*lo;
-
+
H = hi*hi + (med >> 15);
med <<= 17;
L = lo*lo + med;
if (L < med) H++;
-
+
hi = (FT_ULong)v >> 16;
lo = (FT_ULong)v & 0xFFFF;
med = hi*lo;
-
+
H += hi*hi + (med >> 15);
med <<= 17;
L2 = lo*lo + med;
if (L2 < med) H++;
-
+
L += L2;
if (L < L2) H++;
@@ -598,17 +598,17 @@
prev = cur - 1;
next = cur + 1;
- first = 0;
+ first = 0;
for ( c = 0; c < outline->n_contours; c++ )
{
last = outline->contours[c];
if ( n == first )
prev = outline->points + last;
-
+
if ( n == last )
next = outline->points + first;
-
+
first = last + 1;
}
@@ -721,7 +721,7 @@
for ( c = 0; c < outline->n_contours; c++ )
{
int last = outline->contours[c];
-
+
prev = points[last];
for ( n = first; n <= last; n++ )
@@ -777,7 +777,7 @@
x = distance + cur.x + FT_MulFix( d, u.x + v.x )/2;
y = distance + cur.y + FT_MulFix( d, u.y + v.y )/2;
-
+
outline->points[n].x = x;
outline->points[n].y = y;
}
@@ -794,4 +794,4 @@
return 0;
}
-#endif /* 0 - EXPERIMENTAL STUFF !! */
+#endif /* 0 - EXPERIMENTAL STUFF !! */
diff --git a/src/base/ftgrays.c b/src/base/ftgrays.c
index 67ef667..95550ce 100644
--- a/src/base/ftgrays.c
+++ b/src/base/ftgrays.c
@@ -120,7 +120,7 @@ typedef long TPos; /* sub-pixel coordinate */
#define FT_MAX_GRAY_SPANS 32
-#ifdef GRAYS_COMPACT
+#ifdef GRAYS_COMPACT
typedef struct TCell_
{
short x : 14;
@@ -599,12 +599,12 @@ int render_conic( RAS_ARG_ FT_Vector* control, FT_Vector* to )
/* we compute the mid-point directly in order to avoid */
/* calling split_conic().. */
TPos to_x, to_y, mid_x, mid_y;
-
+
to_x = UPSCALE(to->x);
to_y = UPSCALE(to->y);
mid_x = (ras.x + to_x + 2*UPSCALE(control->x))/4;
mid_y = (ras.y + to_y + 2*UPSCALE(control->y))/4;
-
+
return render_line( RAS_VAR_ mid_x, mid_y ) ||
render_line( RAS_VAR_ to_x, to_y );
}
@@ -613,7 +613,7 @@ int render_conic( RAS_ARG_ FT_Vector* control, FT_Vector* to )
levels = ras.lev_stack;
top = 0;
levels[0] = level;
-
+
arc[0].x = UPSCALE(to->x);
arc[0].y = UPSCALE(to->y);
arc[1].x = UPSCALE(control->x);
@@ -647,12 +647,12 @@ int render_conic( RAS_ARG_ FT_Vector* control, FT_Vector* to )
Draw:
{
TPos to_x, to_y, mid_x, mid_y;
-
+
to_x = arc[0].x;
to_y = arc[0].y;
mid_x = (ras.x + to_x + 2*arc[1].x)/4;
mid_y = (ras.y + to_y + 2*arc[1].y)/4;
-
+
if ( render_line( RAS_VAR_ mid_x, mid_y ) ||
render_line( RAS_VAR_ to_x, to_y ) ) return 1;
top--;
@@ -723,12 +723,12 @@ int render_cubic( RAS_ARG_ FT_Vector* control1,
if (level <= 1)
{
TPos to_x, to_y, mid_x, mid_y;
-
+
to_x = UPSCALE(to->x);
to_y = UPSCALE(to->y);
mid_x = (ras.x + to_x + 3*UPSCALE(control1->x+control2->x))/8;
mid_y = (ras.y + to_y + 3*UPSCALE(control1->y+control2->y))/8;
-
+
return render_line( RAS_VAR_ mid_x, mid_y ) ||
render_line( RAS_VAR_ to_x, to_y );
}
@@ -775,12 +775,12 @@ int render_cubic( RAS_ARG_ FT_Vector* control1,
Draw:
{
TPos to_x, to_y, mid_x, mid_y;
-
+
to_x = arc[0].x;
to_y = arc[0].y;
mid_x = (ras.x + to_x + 3*(arc[1].x+arc[2].x))/8;
mid_y = (ras.y + to_y + 3*(arc[1].y+arc[2].y))/8;
-
+
if ( render_line( RAS_VAR_ mid_x, mid_y ) ||
render_line( RAS_VAR_ to_x, to_y ) ) return 1;
top --;
@@ -1015,9 +1015,9 @@ int check_sort( PCell cells, int count )
for ( ; count > 0; count--, spans++ )
{
if (spans->coverage)
-#if 1
+#if 1
memset( p + spans->x, (spans->coverage+1) >> 1, spans->len );
-#else
+#else
{
q = p + spans->x;
limit = q + spans->len;
@@ -1172,7 +1172,7 @@ int check_sort( PCell cells, int count )
++cur;
if (cur >= limit || cur->y != start->y || cur->x != start->x)
break;
-
+
area += cur->area;
cover += cur->cover;
}
@@ -1226,7 +1226,7 @@ int check_sort( PCell cells, int count )
typedef struct TBand_
{
FT_Pos min, max;
-
+
} TBand;
static
@@ -1254,7 +1254,7 @@ int check_sort( PCell cells, int count )
if ( ras.max_ex <= 0 || ras.min_ex >= ras.target.width ||
ras.max_ey <= 0 || ras.min_ey >= ras.target.rows )
return 0;
-
+
if (ras.min_ex < 0) ras.min_ex = 0;
if (ras.min_ey < 0) ras.min_ey = 0;
@@ -1271,7 +1271,7 @@ int check_sort( PCell cells, int count )
level++;
if (ras.max_ex > 120 || ras.max_ey > 120)
level+=2;
-
+
ras.conic_level <<= level;
ras.cubic_level <<= level;
}
@@ -1280,7 +1280,7 @@ int check_sort( PCell cells, int count )
num_bands = (ras.max_ey - ras.min_ey)/ras.band_size;
if (num_bands == 0) num_bands = 1;
if (num_bands >= 39) num_bands = 39;
-
+
ras.band_shoot = 0;
min = ras.min_ey;
@@ -1290,24 +1290,24 @@ int check_sort( PCell cells, int count )
max = min + ras.band_size;
if (n == num_bands-1 || max > max_y)
max = max_y;
-
+
bands[0].min = min;
bands[0].max = max;
band = bands;
-
+
while (band >= bands)
{
FT_Pos bottom, top, middle;
int error;
-
+
ras.num_cells = 0;
ras.invalid = 1;
ras.min_ey = band->min;
ras.max_ey = band->max;
-
+
error = FT_Outline_Decompose( outline, &interface, &ras ) ||
record_cell( RAS_VAR );
-
+
if (!error)
{
#ifdef SHELL_SORT
@@ -1315,22 +1315,22 @@ int check_sort( PCell cells, int count )
#else
quick_sort( ras.cells, ras.num_cells );
#endif
-
+
#ifdef DEBUG_GRAYS
check_sort( ras.cells, ras.num_cells );
dump_cells( RAS_VAR );
#endif
-
+
grays_sweep( RAS_VAR_ &ras.target );
band--;
continue;
}
-
+
/* render pool overflow, we will reduce the render band by half */
bottom = band->min;
top = band->max;
middle = bottom + ((top-bottom) >> 1);
-
+
/* waoow !! this is too complex for a single scanline, something */
/* must be really rotten here !! */
if (middle == bottom)
@@ -1340,10 +1340,10 @@ int check_sort( PCell cells, int count )
#endif
return 1;
}
-
+
if (bottom-top >= ras.band_size)
ras.band_shoot++;
-
+
band[1].min = bottom;
band[1].max = middle;
band[0].min = middle;
@@ -1461,10 +1461,10 @@ int check_sort( PCell cells, int count )
long pool_size )
{
PRaster rast = (PRaster)raster;
-
+
if (raster && pool_base && pool_size >= 4096)
init_cells( rast, (char*)pool_base, pool_size );
-
+
rast->band_size = (pool_size / sizeof(TCell))/8;
}
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 29caeea..81438e2 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -227,9 +227,9 @@
memory = library->memory;
if ( ALLOC( stream, sizeof ( *stream ) ) )
goto Exit;
-
+
stream->memory = memory;
-
+
/* now, look at the stream flags */
if ( args->flags & ft_open_memory )
{
@@ -253,10 +253,10 @@
{
error = FT_Err_Invalid_Argument;
}
-
+
if ( error )
FREE( stream );
-
+
*astream = stream;
Exit:
return error;
@@ -341,7 +341,7 @@
face->generic.finalizer( face );
/* close the stream for this face */
- ft_done_stream( &face->stream );
+ ft_done_stream( &face->stream );
/* get rid of it */
FREE( face );
@@ -394,8 +394,8 @@
* FT_Get_Raster
*
* <Description>
- * Return a pointer to the raster corresponding to a given glyph
- * format tag.
+ * Return a pointer to the raster corresponding to a given glyph
+ * format tag.
*
* <Input>
* library :: handle to source library object
@@ -408,13 +408,13 @@
* a pointer to the corresponding raster object.
*
*************************************************************************/
-
+
EXPORT_FUNC(FT_Raster) FT_Get_Raster( FT_Library library,
FT_Glyph_Format glyph_format,
FT_Raster_Funcs *raster_funcs )
{
FT_Int n;
-
+
for ( n = 0; n < FT_MAX_GLYPH_FORMATS; n++ )
{
FT_Raster_Funcs* funcs = &library->raster_funcs[n];
@@ -462,18 +462,18 @@
FT_Raster raster;
FT_Error error;
FT_Int n, index;
-
+
if ( glyph_format == ft_glyph_format_none)
return FT_Err_Invalid_Argument;
-
+
/* create a new raster object */
error = raster_funcs->raster_new( library->memory, &raster );
if (error) goto Exit;
-
+
raster_funcs->raster_reset( raster,
library->raster_pool,
library->raster_pool_size );
-
+
index = -1;
for (n = 0; n < FT_MAX_GLYPH_FORMATS; n++)
{
@@ -482,7 +482,7 @@
/* record the first vacant entry in "index" */
if (index < 0 && funcs->glyph_format == ft_glyph_format_none)
index = n;
-
+
/* compare this entry's glyph format with the one we need */
if (funcs->glyph_format == glyph_format)
{
@@ -511,7 +511,7 @@
Fail:
raster_funcs->raster_done( raster );
goto Exit;
- }
+ }
/*************************************************************************/
/* */
@@ -534,8 +534,8 @@
FT_Glyph_Format glyph_format = raster_funcs->glyph_format;
FT_Error error;
FT_Int n;
-
- error = FT_Err_Invalid_Argument;
+
+ error = FT_Err_Invalid_Argument;
if ( glyph_format == ft_glyph_format_none)
goto Exit;
@@ -581,7 +581,7 @@
{
FT_Raster_Funcs funcs;
FT_Raster raster;
-
+
raster = FT_Get_Raster( library, format, &funcs );
if (raster && funcs.raster_set_mode )
return funcs.raster_set_mode( raster, mode, args );
@@ -657,7 +657,7 @@
/* now register the default raster for the `outline' glyph image format */
/* for now, ignore the error... */
error = FT_Set_Raster( library, &ft_default_raster );
-
+
/* That's ok now */
*alibrary = library;
@@ -1133,13 +1133,13 @@
{
FT_Int num_params = 0;
FT_Parameter* params = 0;
-
+
if ( args->flags & ft_open_params )
{
num_params = args->num_params;
params = args->params;
}
-
+
error = open_face( driver, stream, face_index,
num_params, params, &face );
if ( !error )
@@ -1164,13 +1164,13 @@
{
FT_Int num_params = 0;
FT_Parameter* params = 0;
-
+
if ( args->flags & ft_open_params )
{
num_params = args->num_params;
params = args->params;
}
-
+
error = open_face( driver, stream, face_index,
num_params, params, &face );
if ( !error )
@@ -1194,7 +1194,7 @@
goto Fail;
node->data = face;
- /* don't assume driver is the same as face->driver, so use
+ /* don't assume driver is the same as face->driver, so use
face->driver instead. (JvR 3/5/2000) */
FT_List_Add( &face->driver->faces_list, node );
@@ -1283,7 +1283,7 @@
return FT_Attach_Stream( face, &open );
}
-
+
/*************************************************************************/
/* */
/* <Function> */
@@ -1315,33 +1315,33 @@
FT_Stream stream;
FT_Error error;
FT_Driver driver;
-
+
FTDriver_getInterface get_interface;
-
+
if ( !face || !face->driver )
return FT_Err_Invalid_Handle;
-
+
driver = face->driver;
error = ft_new_input_stream( driver->library, parameters, &stream );
if (error) goto Exit;
-
+
/* we implement FT_Attach_Stream in each driver through the */
/* "attach_file" interface.. */
error = FT_Err_Unimplemented_Feature;
get_interface = driver->interface.get_interface;
- if (get_interface)
+ if (get_interface)
{
FT_Attach_Reader reader;
-
+
reader = (FT_Attach_Reader)(get_interface( driver, "attach_file" ));
if (reader)
error = reader( face, stream );
}
-
+
/* close the attached stream */
ft_done_stream( &stream );
-
+
Exit:
return error;
}
@@ -1653,7 +1653,7 @@
face->units_per_EM );
}
- error = interface->set_pixel_sizes( face->size,
+ error = interface->set_pixel_sizes( face->size,
pixel_width,
pixel_height );
return error;
@@ -1814,7 +1814,7 @@
return FT_Err_Invalid_Face_Handle;
driver = face->driver;
-
+
/* when the flag NO_RECURSE is set, we disable hinting and scaling */
if (load_flags & FT_LOAD_NO_RECURSE)
load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
@@ -1940,7 +1940,7 @@
{
FT_CharMap* cur = face->charmaps;
FT_CharMap* limit = cur + face->num_charmaps;
-
+
for ( ; cur < limit; cur++ )
{
if ( cur[0]->encoding == encoding )
@@ -1979,7 +1979,7 @@
{
FT_CharMap* cur = face->charmaps;
FT_CharMap* limit = cur + face->num_charmaps;
-
+
for ( ; cur < limit; cur++ )
{
if ( cur[0] == charmap )
@@ -2048,26 +2048,26 @@
* You can load any table with a different function.. XXX
*
***************************************************************************/
-
-
+
+
EXPORT_FUNC(void*) FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag )
{
void* table = 0;
FT_Get_Sfnt_Table_Func func;
FT_Driver driver;
-
+
if (!face || !FT_IS_SFNT(face))
goto Exit;
-
+
driver = face->driver;
func = (FT_Get_Sfnt_Table_Func)driver->interface.get_interface( driver, "get_sfnt" );
if (func)
table = func(face,tag);
-
+
Exit:
return table;
- }
+ }
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 10befb5..e3db124 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -88,7 +88,7 @@
v_start = outline->points[first];
v_last = outline->points[last];
-
+
v_start.x = SCALED(v_start.x); v_start.y = SCALED(v_start.y);
v_last.x = SCALED(v_last.x); v_last.y = SCALED(v_last.y);
@@ -133,91 +133,91 @@
{
point++;
tags++;
-
+
tag = FT_CURVE_TAG( tags[0] );
switch (tag)
{
case FT_Curve_Tag_On: /* emit a single line_to */
{
FT_Vector vec;
-
+
vec.x = SCALED(point->x);
vec.y = SCALED(point->y);
-
+
error = interface->line_to( &vec, user );
if (error) goto Exit;
continue;
}
-
+
case FT_Curve_Tag_Conic: /* consume conic arcs */
{
v_control.x = SCALED(point->x);
v_control.y = SCALED(point->y);
-
+
Do_Conic:
if (point < limit)
{
FT_Vector vec;
FT_Vector v_middle;
-
+
point++;
tags++;
tag = FT_CURVE_TAG( tags[0] );
-
+
vec.x = SCALED(point->x);
vec.y = SCALED(point->y);
-
+
if (tag == FT_Curve_Tag_On)
{
error = interface->conic_to( &v_control, &vec, user );
if (error) goto Exit;
continue;
}
-
+
if (tag != FT_Curve_Tag_Conic)
goto Invalid_Outline;
-
+
v_middle.x = (v_control.x + vec.x)/2;
v_middle.y = (v_control.y + vec.y)/2;
-
+
error = interface->conic_to( &v_control, &v_middle, user );
if (error) goto Exit;
-
+
v_control = vec;
goto Do_Conic;
}
-
+
error = interface->conic_to( &v_control, &v_start, user );
goto Close;
}
-
+
default: /* FT_Curve_Tag_Cubic */
{
FT_Vector vec1, vec2;
-
+
if ( point+1 > limit ||
FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
goto Invalid_Outline;
-
+
point += 2;
tags += 2;
-
+
vec1.x = SCALED(point[-2].x); vec1.y = SCALED(point[-2].y);
vec2.x = SCALED(point[-1].x); vec2.y = SCALED(point[-1].y);
if (point <= limit)
{
FT_Vector vec;
-
+
vec.x = SCALED(point->x);
vec.y = SCALED(point->y);
-
+
error = interface->cubic_to( &vec1, &vec2, &vec, user );
if (error) goto Exit;
continue;
}
-
+
error = interface->cubic_to( &vec1, &vec2, &v_start, user );
goto Close;
}
@@ -226,7 +226,7 @@
/* close the contour with a line segment */
error = interface->line_to( &v_start, user );
-
+
Close:
if (error) goto Exit;
first = last+1;
@@ -235,7 +235,7 @@
return 0;
Exit:
return error;
-
+
Invalid_Outline:
return -1;
}
@@ -389,7 +389,7 @@
FT_BBox* cbox )
{
FT_Pos xMin, yMin, xMax, yMax;
-
+
if ( outline && cbox )
{
if ( outline->n_points == 0 )
@@ -428,7 +428,7 @@
}
}
-
+
/*************************************************************************/
/* */
@@ -481,18 +481,18 @@
{
FT_UShort n;
FT_Int first, last;
-
+
first = 0;
for ( n = 0; n < outline->n_contours; n++ )
{
last = outline->contours[n];
-
+
/* reverse point table */
{
FT_Vector* p = outline->points + first;
FT_Vector* q = outline->points + last;
FT_Vector swap;
-
+
while (p < q)
{
swap = *p;
@@ -502,13 +502,13 @@
q--;
}
}
-
+
/* reverse tags table */
{
char* p = outline->tags + first;
char* q = outline->tags + last;
char swap;
-
+
while (p < q)
{
swap = *p;
@@ -518,7 +518,7 @@
q--;
}
}
-
+
first = last+1;
}
outline->flags ^= ft_outline_reverse_fill;
@@ -538,7 +538,7 @@
BASE_FUNC(void) FT_Done_GlyphZone( FT_GlyphZone* zone )
{
FT_Memory memory = zone->memory;
-
+
FREE( zone->contours );
FREE( zone->tags );
FREE( zone->cur );
@@ -547,7 +547,7 @@
zone->max_points = zone->n_points = 0;
zone->max_contours = zone->n_contours = 0;
}
-
+
/*************************************************************************/
/* */
/* <Function> */
@@ -581,7 +581,7 @@
MEM_Set( zone, 0, sizeof(*zone) );
zone->memory = memory;
-
+
if ( ALLOC_ARRAY( zone->org, maxPoints*2, FT_F26Dot6 ) ||
ALLOC_ARRAY( zone->cur, maxPoints*2, FT_F26Dot6 ) ||
ALLOC_ARRAY( zone->tags, maxPoints, FT_Byte ) ||
@@ -621,7 +621,7 @@
{
FT_Error error = FT_Err_Ok;
FT_Memory memory = zone->memory;
-
+
newPoints += 2;
if ( zone->max_points < newPoints )
{
@@ -630,16 +630,16 @@
REALLOC_ARRAY( zone->cur, zone->max_points*2, newPoints*2, FT_F26Dot6 ) ||
REALLOC_ARRAY( zone->tags, zone->max_points*2, newPoints, FT_Byte ) )
goto Exit;
-
+
zone->max_points = newPoints;
}
-
+
if ( zone->max_contours < newContours )
{
/* reallocate the contours array */
if ( REALLOC_ARRAY( zone->contours, zone->max_contours, newContours, FT_UShort ) )
goto Exit;
-
+
zone->max_contours = newContours;
}
Exit:
@@ -692,7 +692,7 @@
params.flags = 0;
if (map->pixel_mode == ft_pixel_mode_grays)
params.flags |= ft_raster_flag_aa;
-
+
error = funcs.raster_render( raster, ¶ms );
Exit:
return error;
@@ -732,7 +732,7 @@
EXPORT_FUNC(FT_Error) FT_Outline_Render( FT_Library library,
FT_Outline* outline,
FT_Raster_Params* params )
- {
+ {
FT_Error error;
FT_Raster raster;
FT_Raster_Funcs funcs;
@@ -788,7 +788,7 @@
FT_Outline* target )
{
FT_Int is_owner;
-
+
if ( !source || !target ||
source->n_points != target->n_points ||
source->n_contours != target->n_contours )
@@ -806,7 +806,7 @@
/* copy all flags, except the "ft_outline_owner" one */
is_owner = target->flags & ft_outline_owner;
target->flags = source->flags;
-
+
target->flags &= ~ft_outline_owner;
target->flags |= is_owner;
return FT_Err_Ok;
diff --git a/src/base/ftraster.c b/src/base/ftraster.c
index 93c25af..26a9a2b 100644
--- a/src/base/ftraster.c
+++ b/src/base/ftraster.c
@@ -189,14 +189,14 @@
/** **/
/****************************************************************/
/****************************************************************/
-
+
typedef int Int;
typedef unsigned int UInt;
typedef short Short;
typedef unsigned short UShort, *PUShort;
typedef long Long, *PLong;
typedef unsigned long ULong;
-
+
typedef unsigned char Byte, *PByte;
typedef char Bool;
@@ -204,7 +204,7 @@
{
Long x;
Long y;
-
+
} TPoint;
@@ -213,7 +213,7 @@
Flow_None = 0,
Flow_Up = 1,
Flow_Down = -1
-
+
} TFlow;
@@ -224,7 +224,7 @@
Ascending,
Descending,
Flat
-
+
} TStates;
@@ -257,7 +257,7 @@
{
Short y_min; /* band's minimum */
Short y_max; /* band's maximum */
-
+
} TBand;
@@ -410,7 +410,7 @@
/* in bytes of at least 'gray_width*2' */
#endif /* FT_RASTER_ANTI_ALIASING */
-
+
#if 0
PByte flags; /* current flags table */
PUShort outs; /* current outlines table */
@@ -428,7 +428,7 @@
static TRaster_Instance cur_ras;
#define ras cur_ras
-
+
#else
#define ras (*raster)
@@ -442,7 +442,7 @@
/** **/
/****************************************************************/
/****************************************************************/
-
+
/************************************************************************/
/* */
@@ -1415,7 +1415,7 @@
SWAP_(v_start.x,v_start.y);
SWAP_(v_last.x,v_last.y);
}
-
+
v_control = v_start;
point = points + first;
@@ -1457,14 +1457,14 @@
{
point++;
tags++;
-
+
tag = FT_CURVE_TAG( tags[0] );
switch (tag)
{
case FT_Curve_Tag_On: /* emit a single line_to */
{
Long x, y;
-
+
x = SCALED(point->x);
y = SCALED(point->y);
if (flipped) SWAP_(x,y);
@@ -1473,64 +1473,64 @@
continue;
}
-
+
case FT_Curve_Tag_Conic: /* consume conic arcs */
{
v_control.x = SCALED(point[0].x);
v_control.y = SCALED(point[0].y);
if (flipped) SWAP_(v_control.x,v_control.y);
-
+
Do_Conic:
if (point < limit)
{
FT_Vector v_middle;
Long x, y;
-
+
point++;
tags++;
tag = FT_CURVE_TAG( tags[0] );
-
+
x = SCALED(point[0].x);
y = SCALED(point[0].y);
if (flipped) SWAP_(x,y);
-
+
if (tag == FT_Curve_Tag_On)
{
if (Conic_To( RAS_VARS v_control.x, v_control.y, x, y ))
goto Fail;
continue;
}
-
+
if (tag != FT_Curve_Tag_Conic)
goto Invalid_Outline;
v_middle.x = (v_control.x + x)/2;
v_middle.y = (v_control.y + y)/2;
- if (Conic_To( RAS_VARS v_control.x, v_control.y,
+ if (Conic_To( RAS_VARS v_control.x, v_control.y,
v_middle.x, v_middle.y )) goto Fail;
-
+
v_control.x = x;
v_control.y = y;
goto Do_Conic;
}
-
+
if (Conic_To( RAS_VARS v_control.x, v_control.y,
v_start.x, v_start.y )) goto Fail;
goto Close;
}
-
+
default: /* FT_Curve_Tag_Cubic */
{
Long x1, y1, x2, y2, x3, y3;
-
+
if ( point+1 > limit ||
FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
goto Invalid_Outline;
-
+
point += 2;
tags += 2;
-
+
x1 = SCALED(point[-2].x);
y1 = SCALED(point[-2].y);
x2 = SCALED(point[-1].x);
@@ -1549,7 +1549,7 @@
goto Fail;
continue;
}
-
+
if (Cubic_To( RAS_VARS x1, y1, x2, y2, v_start.x, v_start.y ))
goto Fail;
goto Close;
@@ -1563,14 +1563,14 @@
Close:
return SUCCESS;
-
+
Invalid_Outline:
ras.error = Raster_Err_Invalid;
-
+
Fail:
return FAILURE;
}
-
+
/****************************************************************************/
/* */
/* Function: Convert_Glyph */
@@ -1650,7 +1650,7 @@
/** **/
/****************************************************************/
/****************************************************************/
-
+
/************************************************/
/* */
@@ -1820,14 +1820,14 @@
static void Vertical_Sweep_Init( RAS_ARGS Short* min, Short* max )
{
Long pitch = ras.target.pitch;
-
+
UNUSED(max);
-
+
ras.traceIncr = (Short)- pitch;
ras.traceOfs = - *min * pitch;
if (pitch > 0)
ras.traceOfs += (ras.target.rows-1)*pitch;
-
+
ras.gray_min_x = 0;
ras.gray_max_x = 0;
}
@@ -2039,7 +2039,7 @@
UNUSED(left);
UNUSED(right);
-
+
if ( x2-x1 < ras.precision )
{
e1 = CEILING( x1 );
@@ -2059,7 +2059,7 @@
p = bits - e1*ras.target.pitch;
if (ras.target.pitch > 0)
p += (ras.target.rows-1)*ras.target.pitch;
-
+
p[0] |= f1;
}
}
@@ -2191,7 +2191,7 @@
static void Vertical_Gray_Sweep_Init( RAS_ARGS Short* min, Short* max )
{
Long pitch, byte_len;
-
+
*min = *min & -2;
*max = ( *max + 3 ) & -2;
@@ -2232,7 +2232,7 @@
Int last_cell = last_pixel >> 2;
Int last_bit = last_pixel & 3;
Bool over = 0;
-
+
if (ras.gray_max_x >= last_cell && last_bit != 3)
{
ras.gray_max_x = last_cell-1;
@@ -2267,7 +2267,7 @@
pix += 4;
c1 --;
}
-
+
if (over)
{
c2 = count[*bit] + count[*bit2];
@@ -2800,7 +2800,7 @@ Scan_DropOuts :
ras.bWidth = ras.gray_width;
pixel_width = 2*((ras.target.width + 3) >> 2);
-
+
if ( ras.bWidth > pixel_width )
ras.bWidth = pixel_width;
@@ -2850,7 +2850,7 @@ Scan_DropOuts :
{
FT_UInt n;
FT_ULong c;
-
+
/* setup count table */
for ( n = 0; n < 256; n++ )
{
@@ -2860,14 +2860,14 @@ Scan_DropOuts :
((c << 4) & 0x0300) |
((c << 2) & 0x0030) |
(c & 0x0003);
-
+
raster->count_table[n] = c;
}
-
+
/* set default 5-levels gray palette */
for ( n = 0; n < 5; n++ )
raster->grays[n] = (n*127/4);
-
+
raster->gray_width = RASTER_GRAY_LINES/2;
}
@@ -2879,7 +2879,7 @@ Scan_DropOuts :
int ft_black_new( void* memory, FT_Raster *araster )
{
static FT_RasterRec_ the_raster;
- *araster = &the_raster;
+ *araster = &the_raster;
memset( &the_raster, sizeof(the_raster), 0 );
ft_black_init( &the_raster );
return 0;
@@ -2901,7 +2901,7 @@ Scan_DropOuts :
{
FT_Error error;
TRaster_Instance* raster;
-
+
*araster = 0;
if ( !ALLOC( raster, sizeof(*raster) ))
{
@@ -2910,17 +2910,17 @@ Scan_DropOuts :
*araster = raster;
}
-
+
return error;
}
-
+
static
void ft_black_done( TRaster_Instance* raster )
{
FT_Memory memory = (FT_Memory)raster->memory;
FREE( raster );
}
-
+
#endif
@@ -2949,8 +2949,8 @@ Scan_DropOuts :
raster->grays[3] = palette[3];
raster->grays[4] = palette[4];
}
- }
-
+ }
+
static
int ft_black_render( TRaster_Instance* raster,
@@ -2958,7 +2958,7 @@ Scan_DropOuts :
{
FT_Outline* outline = (FT_Outline*)params->source;
FT_Bitmap* target_map = params->target;
-
+
if ( !raster || !raster->buff || !raster->sizeBuff )
return Raster_Err_Not_Ini;
@@ -2981,8 +2981,8 @@ Scan_DropOuts :
ras.outline = *outline;
ras.target = *target_map;
-
- return ( params->flags & ft_raster_flag_aa
+
+ return ( params->flags & ft_raster_flag_aa
? Render_Gray_Glyph( raster )
: Render_Glyph( raster ) );
}
diff --git a/src/base/ftstream.c b/src/base/ftstream.c
index d759a43..2179ba1 100644
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -428,29 +428,29 @@
{
FT_Error error;
FT_Bool frame_accessed = 0;
-
+
if (!fields || !stream)
return FT_Err_Invalid_Argument;
-
+
error = FT_Err_Ok;
do
{
FT_ULong value;
FT_Int sign_shift;
FT_Byte* p;
-
+
switch (fields->value)
{
case ft_frame_start: /* access a new frame */
{
error = FT_Access_Frame( stream, fields->offset );
if (error) goto Exit;
-
+
frame_accessed = 1;
fields++;
continue; /* loop ! */
}
-
+
case ft_frame_byte:
case ft_frame_schar: /* read a single byte */
{
@@ -458,7 +458,7 @@
sign_shift = 24;
break;
}
-
+
case ft_frame_short_be:
case ft_frame_ushort_be: /* read a 2-byte big-endian short */
{
@@ -538,13 +538,13 @@
/* otherwise, exit the loop */
goto Exit;
}
-
+
/* now, compute the signed value is necessary */
if (fields->value & FT_FRAME_OP_SIGNED)
value = (FT_ULong)((FT_Long)(value << sign_shift) >> sign_shift);
-
+
/* finally, store the value in the object */
-
+
p = (FT_Byte*)structure + fields->offset;
switch (fields->size)
{
@@ -553,7 +553,7 @@
case 4: *(FT_ULong*)p = (FT_ULong) value; break;
default: ; /* ignore !! */
}
-
+
/* go to next field */
fields++;
}
@@ -563,7 +563,7 @@
/* close the frame if it was opened by this read */
if (frame_accessed)
FT_Forget_Frame(stream);
-
+
return error;
}
diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c
index e9dae85..165b2f1 100644
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -6,20 +6,20 @@
*
* This file contains the definition of interface used by FreeType
* to access low-level, i.e. memory management, i/o access as well
- * as thread synchronisation.
- *
- *
- * Copyright 1996-1999 by
- * David Turner, Robert Wilhelm, and Werner Lemberg
- *
- * This file is part of the FreeType project, and may only be used
- * modified and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
+ * as thread synchronisation.
+ *
+ *
+ * Copyright 1996-1999 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg
+ *
+ * This file is part of the FreeType project, and may only be used
+ * modified and distributed under the terms of the FreeType project
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * this file you indicate that you have read the license and
+ * understand and accept it fully.
+ *
**************************************************************************/
-
+
#include <freetype/config/ftconfig.h>
#include <freetype/ftsystem.h>
#include <freetype/fterrors.h>
@@ -48,7 +48,7 @@
* <Output>
* block :: address of newly allocated block
*
- * <Return>
+ * <Return>
* Error code. 0 means success.
*
* <Note>
@@ -90,7 +90,7 @@
* Error code. 0 means success.
*
* <Note>
- * This function is _never_ called when the system flag
+ * This function is _never_ called when the system flag
* FT_SYSTEM_FLAG_NO_REALLOC is set. Instead, the engine will emulate
* realloc through "alloc" and "free".
*
@@ -165,10 +165,10 @@
unsigned long count )
{
FILE* file;
-
+
file = STREAM_FILE(stream);
- fseek( file, offset, SEEK_SET );
+ fseek( file, offset, SEEK_SET );
return (unsigned long)fread( buffer, 1, count, file );
}
@@ -177,18 +177,18 @@
FT_Stream stream )
{
FILE* file;
-
+
file = fopen( filepathname, "rb" );
if (!file)
return FT_Err_Cannot_Open_Resource;
-
+
fseek( file, 0, SEEK_END );
stream->size = ftell(file);
fseek( file, 0, SEEK_SET );
-
+
stream->descriptor.pointer = file;
stream->pos = 0;
-
+
stream->read = ft_io_stream;
stream->close = ft_close_stream;
@@ -199,7 +199,7 @@
EXPORT_FUNC(FT_Memory) FT_New_Memory( void )
{
FT_Memory memory;
-
+
memory = (FT_Memory)malloc( sizeof(*memory) );
if (memory)
{
diff --git a/src/oldapi/truetype.h b/src/oldapi/truetype.h
index fbde469..e97656e 100644
--- a/src/oldapi/truetype.h
+++ b/src/oldapi/truetype.h
@@ -19,13 +19,13 @@
*
* This file is part of the FreeType project and may only be used,
* modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
* Note:
*
- * This is the only file that should be included by client
+ * This is the only file that should be included by client
* application sources. All other types and functions defined
* in the "tt*.h" files are library internals and should not be
* included.
@@ -115,7 +115,7 @@
struct TT_UnitVector_ /* guess what... */
- {
+ {
TT_F2Dot14 x;
TT_F2Dot14 y;
};
@@ -215,7 +215,7 @@
typedef struct TT_Outline_ TT_Outline;
-
+
/* A structure used to return glyph metrics. */
/* */
/* The "bearingX" isn't called "left-side bearing" anymore because */
@@ -427,7 +427,7 @@
TT_Short metric_Data_Format;
TT_UShort number_Of_HMetrics;
-
+
/* The following fields are not defined by the TrueType specification */
/* but they're used to connect the metrics header to the relevant */
/* "HMTX" or "VMTX" table. */
@@ -463,7 +463,7 @@
TT_Short metric_Data_Format;
TT_UShort number_Of_VMetrics;
-
+
/* The following fields are not defined by the TrueType specification */
/* but they're used to connect the metrics header to the relevant */
/* "HMTX" or "VMTX" table. */
@@ -979,7 +979,7 @@
-
+
/*************************************************************/
/* */
/* <Struct> TT_SBit_Component */
@@ -1225,7 +1225,7 @@
EXPORT_DEF
TT_Error TT_Set_Raster_Gray_Palette( TT_Engine engine,
const TT_Byte* palette );
-
+
/* ----------------------- face management ----------------------- */
@@ -1450,7 +1450,7 @@
/* Return glyph outline pointers in 'outline'. Note that the returned */
/* pointers are owned by the glyph object, and will be destroyed with */
/* it. The client application should _not_ change the pointers. */
-
+
EXPORT_DEF
TT_Error TT_Get_Glyph_Outline( TT_Glyph glyph,
TT_Outline* outline );
@@ -1580,7 +1580,7 @@
EXPORT_DEF
void TT_Matrix_Multiply( TT_Matrix* a,
TT_Matrix* b );
-
+
/* Invert a transformation matrix. */
@@ -1593,7 +1593,7 @@
EXPORT_DEF
TT_Long TT_MulDiv( TT_Long A, TT_Long B, TT_Long C );
-
+
/* Compute A*B/0x10000 with 64 bits intermediate precision. */
/* Useful to multiply by a 16.16 fixed float value. */
@@ -1697,7 +1697,7 @@
TT_UShort* length ); /* string length
address */
-
+
#ifdef __cplusplus
}
diff --git a/src/oldapi/ttapi.c b/src/oldapi/ttapi.c
index 6367251..1d07219 100644
--- a/src/oldapi/ttapi.c
+++ b/src/oldapi/ttapi.c
@@ -1,6 +1,6 @@
/*******************************************************************
*
- * ttapi.c
+ * ttapi.c
*
* High-level interface implementation
*
@@ -9,7 +9,7 @@
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
@@ -17,7 +17,7 @@
*
* This file is used to implement most of the functions that are
* defined in the file "freetype.h". However, two functions are
- * implemented elsewhere :
+ * implemented elsewhere :
*
******************************************************************/
@@ -47,7 +47,7 @@
static
const FT_DriverInterface* tt_interface = &tt_driver_interface;
-
+
static
const TT_DriverInterface* tt_extension = &tt_format_interface;
@@ -84,7 +84,7 @@
error = FT_New_System( &system );
if (error) return error;
-
+
error = FT_New_Library( system, &library );
if (!error)
/* Now create a new TrueType driver object */
@@ -163,12 +163,12 @@
EXPORT_FUNC
TT_Error TT_Set_Raster_Gray_Palette( TT_Engine engine,
const TT_Byte* palette )
- {
+ {
FT_Library library;
-
+
if (!engine)
return TT_Err_Invalid_Engine;
-
+
library = (FT_Library)engine;
return FT_Set_Raster_Palette( library, 5, (unsigned char*)palette );
}
@@ -216,13 +216,13 @@
{
TT_Error error;
FT_Resource resource;
-
+
*aface = 0;
-
+
error = FT_New_Resource( library, pathname, &resource );
if (error) return error;
-#if 0
+#if 0
error = FT_Add_Resource( library, resource );
if (error) goto Fail_Install;
#endif
@@ -231,10 +231,10 @@
/* Destroy glyph slot to comply with the 1.x API */
if (!error)
FT_Done_GlyphSlot( (*aface)->root.slot );
-
+
if (error)
FT_Done_Resource(resource);
-
+
return error;
}
@@ -249,7 +249,7 @@
return open_face( (FT_Library)engine, pathname, 0, aface );
}
-
+
/***********************************************************************/
/* */
@@ -318,7 +318,7 @@
TT_Error TT_Close_Face( TT_Face face )
{
FT_Resource resource;
-
+
if (!face)
return TT_Err_Invalid_Face_Handle;
@@ -377,7 +377,7 @@
props->num_Names = face->num_names;
props->header = &face->header;
props->horizontal = &face->horizontal;
-
+
/* The driver supports old Mac fonts where there are no OS/2 */
/* tables present in the file. However, this is not true of */
/* FreeType 1.1. For the sake of backwards compatibility, we */
@@ -390,7 +390,7 @@
/* */
props->os2 = &face->os2;
-
+
props->postscript = &face->postscript;
props->hdmx = &face->hdmx;
props->vertical = ( face->vertical_info ? &face->vertical : 0 );
@@ -508,7 +508,7 @@
/* This function will much probably move to another */
/* component in the short future, but I haven't decided */
/* which yet... */
-
+
static
void get_metrics( TT_HoriHeader* header,
TT_Int index,
@@ -516,10 +516,10 @@
TT_UShort* advance )
{
TT_LongMetrics* longs_m;
-
+
TT_UShort k = header->number_Of_HMetrics;
-
-
+
+
if ( index < k )
{
longs_m = (TT_LongMetrics*)header->long_metrics + index;
@@ -532,7 +532,7 @@
*advance = ((TT_LongMetrics*)header->long_metrics)[k - 1].advance;
}
}
-
+
EXPORT_FUNC
@@ -769,7 +769,7 @@
{
/* The point size is now ignored by the driver */
(void)pointSize;
-
+
return FT_Set_Pixel_Sizes( (FT_Size)ins, pixelWidth, pixelHeight );
}
@@ -814,7 +814,7 @@
metrics->x_ppem = size->root.metrics.x_ppem;
metrics->y_ppem = size->root.metrics.y_ppem;
- metrics->pointSize = size->root.metrics.pointSize;
+ metrics->pointSize = size->root.metrics.pointSize;
return TT_Err_Ok;
}
@@ -936,7 +936,7 @@
(void)instance; /* the parameters are unused, the (void) prevents */
(void)rotated; /* warnings from pedantic compilers.. */
(void)stretched;
-
+
return TT_Err_Ok;
}
@@ -1130,7 +1130,7 @@
metrics->bearingX = slot->metrics.horiBearingX;
metrics->bearingY = slot->metrics.horiBearingY;
metrics->advance = slot->metrics.horiAdvance;
-
+
return TT_Err_Ok;
}
@@ -1182,7 +1182,7 @@
metrics->linearVertAdvance = met2->vertAdvance;
metrics->linearVertBearingY = met2->vertBearingY;
-
+
return TT_Err_Ok;
}
@@ -1441,7 +1441,7 @@
#include <stdlib.h> /* for malloc and free */
- static TT_Outline null_api_outline = { 0, 0, NULL, NULL, NULL,
+ static TT_Outline null_api_outline = { 0, 0, NULL, NULL, NULL,
0, 0, 0, 0 };
EXPORT_FUNC
@@ -1459,7 +1459,7 @@
outline->points = (TT_Vector*)malloc( numPoints * sizeof(TT_Vector) );
outline->flags = (TT_Byte*) malloc( numPoints * sizeof(TT_Char) );
outline->contours = (TT_UShort*)malloc( numPoints * sizeof(TT_UShort) );
-
+
if ( !outline->points || !outline->flags || !outline->contours )
goto Fail;
@@ -1573,7 +1573,7 @@
TT_Matrix* matrix )
{
FT_Transform_Outline( (FT_Outline*)outline, (FT_Matrix*)matrix );
- }
+ }
/*******************************************************************
*
@@ -1679,7 +1679,7 @@
return FT_MulDiv( A, B, C );
}
-
+
/***********************************************************************/
/* */
/* <Function> */
@@ -1910,12 +1910,12 @@
if (!face)
return TT_Err_Invalid_Face_Handle;
-
+
if ( nameIndex >= face->num_names )
return TT_Err_Bad_Argument;
name = face->name_table.names + nameIndex;
-
+
*platformID = name->platformID;
*encodingID = name->encodingID;
*languageID = name->languageID;
@@ -1953,18 +1953,18 @@
TT_UShort* length )
{
TT_NameRec* name;
-
+
if (!face)
return TT_Err_Invalid_Face_Handle;
-
+
if ( nameIndex >= face->num_names )
return TT_Err_Bad_Argument;
name = face->name_table.names + nameIndex;
*stringPtr = (TT_String*)name->string;
- *length = name->stringLength;
-
+ *length = name->stringLength;
+
return TT_Err_Ok;
}
diff --git a/src/otlayout/oltypes.c b/src/otlayout/oltypes.c
index 619b7a1..bd2fa22 100644
--- a/src/otlayout/oltypes.c
+++ b/src/otlayout/oltypes.c
@@ -21,23 +21,23 @@
TT_UInt count, max_langs;
TT_Error error;
- /* skip version of the JSTF table */
+ /* skip version of the JSTF table */
if (otl_type == otl_jstf)
start += 4;
-
+
p = start;
-
+
/* we must allocate the script_tags and language_tags arrays */
/* this requires that we compute the maximum number of languages */
/* per script.. */
-
+
count = table->num_scripts = OTL_UShort(p);
max_langs = 0;
for ( ; count > 0; count++ )
{
TT_Byte* script;
TT_UInt num_langs;
-
+
p += 4; /* skip tag */
script = bytes + OTL_UShort(p);
@@ -48,10 +48,10 @@
/* test if there is a default language system */
if ( OTL_UShort(script) )
num_langs++;
-
+
/* test other language systems */
num_langs += OTL_UShort(script); /* add other lang sys */
-
+
if (num_langs > max_langs)
max_langs = num_langs;
}
@@ -65,15 +65,15 @@
table->max_languages = max_langs;
table->num_languages = 0;
table->otl_type = otl_type;
-
+
table->scripts_table = bytes;
table->scripts_len = len;
-
+
/* fill the script_tags array */
{
TT_UInt n;
TT_Byte* p = start + 2; /* skip count */
-
+
for ( n = 0; n < table->num_scripts; n++ )
{
table->script_tags[n] = OTL_ULong(p);
@@ -96,7 +96,7 @@
TT_Error error;
TT_Byte* p = bytes;
TT_UInt count;
-
+
table->max_features = count = OTL_UShort(p);
if ( !ALLOC_ARRAY( table->feature_tags, count, TT_ULong ) &&
!ALLOC_ARRAY( table->features, count, TT_Bool ) )
@@ -104,7 +104,7 @@
table->features_table = bytes;
table->features_len = len;
}
- return error;
+ return error;
}
@@ -118,14 +118,14 @@
TT_Error error;
TT_Byte* p = bytes;
TT_UInt count;
-
+
table->max_lookups = count = OTL_UShort(p);
if ( !ALLOC_ARRAY( table->lookups, count, TT_Bool ) )
{
table->lookups_table = bytes;
table->lookups_len = len;
}
- return error;
+ return error;
}
/* discard table arrays */
@@ -149,12 +149,12 @@
TT_Byte* p;
TT_Byte* script = 0;
TT_Byte* start = table->scripts_table;
-
+
if ( table->otl_type == otl_type_jstf ) /* skip version for JSTF */
start += 4;
-
+
p = start + 6; /* skip count+first tag */
-
+
for ( n = 0; n < table->num_scripts; n++, p += 6 )
{
if ( table->script_tags[n] == script_tag )
@@ -163,7 +163,7 @@
break;
}
}
-
+
table->cur_script = script;
if (!script)
table->num_languages = 0;
@@ -173,31 +173,31 @@
/* not that we put a '0' tag in front of the list to indicate that */
/* there is a default language for this script.. */
TT_ULong* tags = table->language_tags;
-
+
switch (table->otl_type)
{
case otl_type_base:
case otl_type_jstf:
script += 2; /* skip basevalue or extenders */
/* fall-through */
-
+
default:
if ( OTL_UShort(script) )
*tags++ = 0;
}
-
+
count = OTL_UShort(script);
for ( ; count > 0; count-- )
{
*tags++ = OTL_ULong(script);
script += 2; /* skip offset */
}
-
+
table->num_langs = tags - table->language_tags;
}
}
-
+
/* return the list of available features for the current script/language */
/* use with a GPOS or GSUB script table */
LOCAL_FUNC
@@ -218,14 +218,14 @@
{
offset = OTL_UShort(script);
if (!offset) return; /* if there is no default language, exit */
-
+
language = script - 2 + offset;
}
else
{
TT_Byte* p = script + 8; /* skip default+count+1st tag */
TT_UShort index;
-
+
for ( n = 0; n < table->num_languages; n++, p+=6 )
{
if ( table->language_tags[n] == language_tag )
@@ -235,9 +235,9 @@
}
}
- table->cur_language = language;
+ table->cur_language = language;
if (!language) return;
-
+
p = language + 2; /* skip lookup order */
index = OTL_UShort(p); /* required feature index */
if (index != 0xFFFF)
@@ -245,7 +245,7 @@
if (index < table->max_features)
table->features[index] = 1;
}
-
+
count = OTL_UShort(p);
for ( ; count > 0; count-- )
{
@@ -265,11 +265,11 @@
TT_UInt n;
TT_Byte* features = table->features_table;
TT_Byte* p = features + 6; /* skip count+1st tag */
-
+
/* clear lookup list */
for ( n = 0; n < table->max_lookups; n++ )
table->lookups[n] = 0;
-
+
/* now, parse the features list */
for ( n = 0; n < table->features; n++ )
{
@@ -278,10 +278,10 @@
TT_UInt count;
TT_UShort index;
TT_Byte* feature;
-
+
feature = features + OTL_UShort(p);
p += 4; /* skip tag */
-
+
/* now, select all lookups from this feature */
count = OTL_UShort(feature);
for ( ; count > 0; count-- )
@@ -293,9 +293,9 @@
}
}
}
-
- /* find the basevalues and minmax for the current script/language */
+
+ /* find the basevalues and minmax for the current script/language */
/* only use it with a BASE table.. */
LOCAL_FUNC
void OTL_Get_Baseline_Values( OTL_Table* table,
@@ -307,12 +307,12 @@
table->cur_basevalues = 0;
table->cur_minmax = 0;
-
- /* read basevalues */
+
+ /* read basevalues */
offset = OTL_UShort(p);
if (offset)
table->cur_basevalues = script + offset;
-
+
offset = OTL_UShort(p);
if (offset)
table->cur_minmax = script + offset;
@@ -321,7 +321,7 @@
for ( ; count > 0; count-- )
{
TT_ULong tag;
-
+
tag = OTL_ULong(p);
if ( language_tag == tag )
{
@@ -341,7 +341,7 @@
TT_Long result = -1;
TT_UInt count, index, start, end;
TT_Byte* p = coverage;
-
+
switch ( OTL_UShort(p) )
{
case 1: /* coverage format 1 - array of glyph indices */
@@ -357,7 +357,7 @@
}
}
break;
-
+
case 2:
{
count = OTL_UShort(p);
@@ -387,14 +387,14 @@
TT_Byte* p = class_def;
TT_UInt result = 0;
TT_UInt start, end, count, index;
-
+
switch ( OTL_UShort(p) )
{
case 1:
{
start = OTL_UShort(p);
count = OTL_UShort(p);
-
+
glyph_id -= start;
if (glyph_id < count)
{
@@ -403,7 +403,7 @@
}
}
break;
-
+
case 2:
{
count = OTL_UShort(p);
@@ -434,7 +434,7 @@
TT_Int result = 0;
TT_UInt start, end;
TT_Short value;
-
+
start = OTL_UShort(p);
end = OTL_UShort(p);
if (size >= start && size <= end)
@@ -442,7 +442,7 @@
/* I know we could do all of this without a switch, with */
/* clever shifts and everything, but it makes the code */
/* really difficult to understand.. */
-
+
size -= start;
switch ( OTL_UShort(p) )
{
@@ -454,7 +454,7 @@
result = value >> 14;
}
break;
-
+
case 2: /* 4-bits per value */
{
p += 2*(size >> 2);
@@ -463,7 +463,7 @@
result = value >> 12;
}
break;
-
+
case 3: /* 8-bits per value */
{
p += 2*(size >> 1);
@@ -476,7 +476,7 @@
}
return result;
}
-
+
/* extract a BaseCoord value */
LOCAL_FUNC
void OTL_Get_Base_Coordinate( TT_Byte* base_coord,
@@ -484,7 +484,7 @@
{
TT_Byte* p = base_coord;
TT_Int result = 0;
-
+
coord->format = OTL_UShort(p);
coord->coordinate = OTL_Short(p);
coord->device = 0;
@@ -495,13 +495,13 @@
coord->ref_glyph = OTL_UShort(p);
coord->ref_point = OTL_UShort(p);
break;
-
+
case 3: /* format 3 */
coord->device = p - 4 + OTL_UShort(p);
break;
default:
- ;
+ ;
}
}
@@ -514,13 +514,13 @@
/* each bit in the value format corresponds to a single ushort */
/* we thus count the bits, and multiply the result by 2 */
-
+
count = (TT_Int)(format & 0xFF);
count = ((count & 0xAA) >> 1) + (count & 0x55);
count = ((count & 0xCC) >> 2) + (count & 0x33);
count = ((count & 0xF0) >> 4) + (count & 0x0F);
- return count*2;
+ return count*2;
}
@@ -533,28 +533,28 @@
OTL_ValueRecord* record )
{
TT_Byte* p = value_record;
-
+
/* clear vectors */
record->placement.x = 0;
record->placement.y = 0;
record->advance.x = 0;
record->advance.y = 0;
-
+
record->device_pla_x = 0;
record->device_pla_y = 0;
record->device_adv_x = 0;
record->device_adv_y = 0;
-
+
if (value_format & 1) record->placement.x = NEXT_Short(p);
if (value_format & 2) record->placement.y = NEXT_Short(p);
if (value_format & 4) record->advance.x = NEXT_Short(p);
if (value_format & 8) record->advance.y = NEXT_Short(p);
-
+
if (value_format & 16) record->device_pla_x = pos_table + NEXT_UShort(p);
if (value_format & 32) record->device_pla_y = pos_table + NEXT_UShort(p);
if (value_format & 64) record->device_adv_x = pos_table + NEXT_UShort(p);
if (value_format & 128) record->device_adv_y = pos_table + NEXT_UShort(p);
- }
+ }
@@ -564,32 +564,32 @@
OTL_Anchor* anchor )
{
TT_Byte* p = anchor_table;
-
+
anchor->format = NEXT_UShort(p);
anchor->coord.x = NEXT_Short(p);
anchor->coord.y = NEXT_Short(p);
anchor->point = 0;
anchor->device_x = 0;
anchor->device_y = 0;
-
+
switch (anchor->format)
{
case 2:
anchor->point = NEXT_UShort(p);
break;
-
+
case 3:
anchor->device_x = anchor_table + NEXT_UShort(p);
anchor->device_y = anchor_table + NEXT_UShort(p);
break;
-
+
default:
;
}
}
-
+
/* extract Mark from MarkArray */
LOCAL_FUNC
void OTL_Get_Mark( TT_Byte* mark_array,
@@ -599,10 +599,10 @@
{
TT_Byte* p = mark_array;
TT_UInt count;
-
+
*clazz = 0;
MEM_Set( anchor, 0, sizeof(*anchor) );
-
+
count = NEXT_UShort(p);
if (index < count)
{
diff --git a/src/otlayout/oltypes.h b/src/otlayout/oltypes.h
index dc92908..b4a4d80 100644
--- a/src/otlayout/oltypes.h
+++ b/src/otlayout/oltypes.h
@@ -25,7 +25,7 @@
* max_features :: total number of features in table
* feature_tags :: tags of all features for current script/language
* features :: selection flags for all features in current script/lang
- *
+ *
* max_lookups :: total number of lookups in table
* lookups :: selection flags for all lookups for current
* feature list.
@@ -40,17 +40,17 @@
otl_type_gpos,
otl_type_gsub,
otl_type_jstf
-
+
} OTL_Type;
-
-
+
+
typedef struct OTL_Table_
{
FT_Memory memory;
TT_Int num_scripts;
TT_Tag* script_tags;
-
+
TT_Int max_languages;
TT_Int num_languages;
TT_Tag* language_tags;
@@ -61,19 +61,19 @@
TT_Int max_lookups;
TT_Bool* lookups;
-
+
TT_Byte* scripts_table;
TT_Long scripts_len;
-
+
TT_Byte* features_table;
TT_Long* features_len;
-
+
TT_Byte* lookups_table;
TT_Byte* lookups_len;
TT_Byte* cur_script; /* current script */
TT_Byte* cur_language; /* current language */
-
+
TT_Byte* cur_base_values;
TT_Byte* cur_min_max;
@@ -89,7 +89,7 @@
TT_UShort ref_glyph;
TT_UShort ref_point;
TT_Byte* device;
-
+
} OTL_BaseCoord;
@@ -102,7 +102,7 @@
TT_Byte* device_pla_y;
TT_Byte* device_adv_x;
TT_Byte* device_adv_y;
-
+
} OTL_ValueRecord;
@@ -113,7 +113,7 @@
TT_UInt anchor_point;
TT_Byte* device_x;
TT_Byte* device_y;
-
+
} OTL_Anchor;
LOCAL_DEF
@@ -153,7 +153,7 @@
* table->num_scripts is the number of scripts
*
*/
-
+
/********************************************************
*
* - after calling OTL_Table_Set_Features:
@@ -169,7 +169,7 @@
* it is empty (zero-filled) by default.
*
*/
-
+
/*******************************************************************
*
* - after calling OTL_Get_Languages_List(script_tag):
@@ -217,7 +217,7 @@
LOCAL_DEF
void OTL_Get_Justification( OTL_Table* table,
TT_ULong language_tag );
-
+
/*******************************************************************
*
* - after calling OTL_Get_Lookups_List():
diff --git a/src/psnames/psdriver.c b/src/psnames/psdriver.c
index 78283b7..0e532f4 100644
--- a/src/psnames/psdriver.c
+++ b/src/psnames/psdriver.c
@@ -20,7 +20,7 @@
FT_Int n;
char first = glyph_name[0];
char temp[64];
-
+
/* if the name begins with "uni", then the glyph name may be a */
/* hard-coded unicode character code.. */
if ( glyph_name[0] == 'u' &&
@@ -36,7 +36,7 @@
{
char c = *p;
unsigned char d;
-
+
d = (unsigned char)c-'0';
if (d >= 10)
{
@@ -49,7 +49,7 @@
/* exit if one non-uppercase-hexadecimal character was found */
if (d >= 16)
break;
-
+
value = (value << 4) + d;
if (count == 0)
return value;
@@ -61,11 +61,11 @@
{
const char* p;
int len;
-
+
p = glyph_name;
while ( *p && *p != '.' ) p++;
len = p-glyph_name;
-
+
if ( *p && len < 64 )
{
strncpy( temp, glyph_name, len );
@@ -73,12 +73,12 @@
glyph_name = temp;
}
}
-
+
/* now, lookup the glyph in the Adobe Glyph List */
for ( n = 0; n < NUM_ADOBE_GLYPHS; n++ )
{
const char* name = t1_standard_glyphs[n];
-
+
if ( first == name[0] && strcmp( glyph_name, name ) == 0 )
return names_to_unicode[n];
}
@@ -86,14 +86,14 @@
return 0;
}
-
+
/* qsort callback to sort the unicode map */
static
int compare_uni_maps( const void* a, const void* b )
{
PS_UniMap* map1 = (PS_UniMap*)a;
PS_UniMap* map2 = (PS_UniMap*)b;
-
+
return ( map1->unicode < map2->unicode ? -1 :
map1->unicode > map2->unicode ? 1 : 0 );
}
@@ -107,18 +107,18 @@
PS_Unicodes *table )
{
FT_Error error;
-
+
/* we first allocate the table */
table->num_maps = 0;
table->maps = 0;
-
+
if ( !ALLOC_ARRAY( table->maps, num_glyphs, PS_UniMap ) )
{
FT_UInt n;
FT_UInt count;
PS_UniMap* map;
FT_ULong uni_char;
-
+
map = table->maps;
for ( n = 0; n < num_glyphs; n++ )
{
@@ -143,7 +143,7 @@
{
count = 0;
}
-
+
if (count == 0)
{
FREE( table->maps );
@@ -167,23 +167,23 @@
/* perform a binary search on the table */
min = table->maps;
max = min + table->num_maps - 1;
-
+
while (min <= max)
{
mid = min + (max-min)/2;
if ( mid->unicode == unicode )
return mid->glyph_index;
-
+
if (min == max)
break;
-
+
if ( mid->unicode < unicode ) min = mid+1;
else max = mid-1;
}
return 0xFFFF;
}
-
+
#endif
static
@@ -191,17 +191,17 @@
{
if (name_index >= 258)
name_index = 0;
-
+
return standard_glyph_names[ mac_standard_names[name_index] ];
}
-
+
static
const char* PS_Standard_Strings( FT_UInt sid )
{
return (sid < NUM_STD_GLYPHS ? t1_standard_glyphs[sid] : 0);
}
-
+
static const PSNames_Interface psnames_interface =
{
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
@@ -216,11 +216,11 @@
(PS_Macintosh_Name_Func) PS_Macintosh_Name,
(PS_Adobe_Std_Strings_Func) PS_Standard_Strings,
-
+
t1_standard_encoding,
t1_expert_encoding
};
-
+
const FT_DriverInterface psnames_driver_interface =
{
diff --git a/src/psnames/rules.mk b/src/psnames/rules.mk
index a97797b..af226b7 100644
--- a/src/psnames/rules.mk
+++ b/src/psnames/rules.mk
@@ -29,7 +29,7 @@ ifndef PSNAMES_INCLUDE
# compilation flags for the driver
#
PSNAMES_CFLAGS := $(PSNAMES_INCLUDE:%=$I%)
- PSNAMES_COMPILE := $(FT_COMPILE) $(PSNAMES_CFLAGS)
+ PSNAMES_COMPILE := $(FT_COMPILE) $(PSNAMES_CFLAGS)
# driver sources (i.e., C files)
diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk
index 31f7a8d..0969c35 100644
--- a/src/sfnt/rules.mk
+++ b/src/sfnt/rules.mk
@@ -29,7 +29,7 @@ ifndef SFNT_INCLUDE
# compilation flags for the driver
#
SFNT_CFLAGS := $(SFNT_INCLUDE:%=$I%)
- SFNT_COMPILE := $(FT_COMPILE) $(SFNT_CFLAGS)
+ SFNT_COMPILE := $(FT_COMPILE) $(SFNT_CFLAGS)
# driver sources (i.e., C files)
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 8fe6609..23682c4 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -8,7 +8,7 @@
static const SFNT_Interface sfnt_interface =
{
TT_Goto_Table,
-
+
TT_Load_Any,
TT_Load_Format_Tag,
TT_Load_Directory,
@@ -38,22 +38,22 @@
0,
0,
0,
-#endif
-
+#endif
+
/* see `ttpost.h' */
-#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
TT_Get_PS_Name,
- TT_Free_Post_Names,
+ TT_Free_Post_Names,
#else
0,
0,
-#endif
+#endif
/* see `ttcmap.h' */
TT_CharMap_Load,
TT_CharMap_Free,
};
-
+
const FT_DriverInterface sfnt_driver_interface =
{
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 32604e0..08bee12 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -30,7 +30,7 @@
static TT_UInt code_to_index0( TT_CMapTable* charmap, TT_ULong char_code );
static TT_UInt code_to_index2( TT_CMapTable* charmap, TT_ULong char_code );
static TT_UInt code_to_index4( TT_CMapTable* charmap, TT_ULong char_code );
- static TT_UInt code_to_index6( TT_CMapTable* charmap, TT_ULong char_code );
+ static TT_UInt code_to_index6( TT_CMapTable* charmap, TT_ULong char_code );
/*************************************************************************/
/* */
@@ -152,7 +152,7 @@
cmap2->glyphIdArray[i] = GET_UShort();
FORGET_Frame();
-
+
cmap->get_index = code_to_index2;
break;
@@ -212,7 +212,7 @@
cmap4->glyphIdArray[i] = GET_UShort();
FORGET_Frame();
-
+
cmap->get_index = code_to_index4;
break;
@@ -338,7 +338,7 @@
TT_ULong charCode )
{
TT_CMap0* cmap0 = &cmap->c.cmap0;
-
+
return ( charCode <= 0xFF ? cmap0->glyphIdArray[charCode] : 0 );
}
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index b2a678c..c764d28 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -56,7 +56,7 @@
{
TT_Table* entry;
TT_Table* limit;
-
+
FT_TRACE4(( "TT_LookUp_Table( %08lx, %c%c%c%c )\n",
(TT_Long)face,
(TT_Char)(tag >> 24),
@@ -70,7 +70,7 @@
{
if ( entry->Tag == tag )
return entry;
- }
+ }
FT_TRACE4(( " Could not find table!\n" ));
return 0;
}
@@ -99,18 +99,18 @@
{
TT_Table* table;
TT_Error error;
-
+
table = TT_LookUp_Table( face, tag );
if (table)
{
if (length)
*length = table->Length;
-
+
(void)FILE_Seek( table->Offset );
}
else
error = TT_Err_Table_Missing;
-
+
return error;
}
@@ -147,7 +147,7 @@
{
TT_Error error;
FT_Memory memory = stream->memory;
-
+
#ifdef READ_FIELDS
const FT_Frame_Field ttc_header_fields[] = {
FT_FRAME_START(8), /* frame of 8 bytes */
@@ -173,9 +173,9 @@
if ( *format_tag == TTAG_ttcf )
{
TT_Int n;
-
+
FT_TRACE4(( "TT_Load_Format_Tag: file is a collection\n" ));
-
+
/* it's a TrueType collection, i.e. a file containing several */
/* font files. Read the font directory now */
/* */
@@ -183,7 +183,7 @@
if ( READ_Fields( ttc_header_fields, &face->ttc_header ) )
goto Exit;
#else
- if ( ACCESS_Frame( 8 ) ) goto Exit;
+ if ( ACCESS_Frame( 8 ) ) goto Exit;
face->ttc_header.version = GET_Long();
face->ttc_header.DirCount = GET_Long();
@@ -209,12 +209,12 @@
{
error = TT_Err_Bad_Argument;
goto Exit;
- }
-
+ }
+
/* if we're checking the font format, exit immediately */
if (faceIndex < 0)
goto Exit;
-
+
/* seek to the appropriate TrueType file, then read tag */
if ( FILE_Seek( face->ttc_header.TableDirectory[faceIndex] ) ||
READ_Long( *format_tag ) )
@@ -544,7 +544,7 @@
FT_FRAME_USHORT( TT_MaxProfile, numGlyphs ),
FT_FRAME_USHORT( TT_MaxProfile, maxPoints ),
FT_FRAME_USHORT( TT_MaxProfile, maxContours ),
- FT_FRAME_USHORT( TT_MaxProfile, maxCompositePoints ),
+ FT_FRAME_USHORT( TT_MaxProfile, maxCompositePoints ),
FT_FRAME_USHORT( TT_MaxProfile, maxCompositeContours ),
FT_FRAME_USHORT( TT_MaxProfile, maxZones ),
FT_FRAME_USHORT( TT_MaxProfile, maxTwilightPoints ),
@@ -998,17 +998,17 @@
FILE_Read_At( table_pos + names->storageOffset,
(void*)names->storage, storageSize ) )
goto Exit;
-
+
/* Go through and assign the string pointers to the name records. */
{
TT_NameRec* cur = names->names;
TT_NameRec* limit = cur + names->numNameRecords;
-
+
for ( ; cur < limit; cur++ )
cur->string = names->storage + cur->stringOffset;
}
-#ifdef FT_DEBUG_LEVEL_TRACE
+#ifdef FT_DEBUG_LEVEL_TRACE
/* Print Name Record Table in case of debugging */
{
TT_NameRec* cur = names->names;
@@ -1017,20 +1017,20 @@
for ( ; cur < limit; cur++ )
{
TT_UInt j;
-
+
FT_TRACE2(( "%d %d %x %d ",
cur->platformID,
cur->encodingID,
cur->languageID,
cur->nameID ));
-
+
/* I know that M$ encoded strings are Unicode, */
/* but this works reasonable well for debugging purposes. */
if ( cur->string )
for ( j = 0; j < cur->stringLength; j++ )
{
TT_Char c = *(cur->string + j);
-
+
if ( (TT_Byte)c < 128 )
FT_TRACE2(( "%c", c ));
}
@@ -1165,12 +1165,12 @@
cmap->offset = (TT_ULong)GET_Long();
}
FORGET_Frame();
-
+
/* now read the rest of each table */
for ( charmap = face->charmaps; charmap < limit; charmap++ )
{
TT_CMapTable* cmap = &charmap->cmap;
-
+
#ifdef READ_FIELDS
if ( FILE_Seek( table_start + (TT_Long)cmap->offset ) ||
READ_Fields( cmap_rec_fields, cmap ) )
@@ -1179,11 +1179,11 @@
if ( FILE_Seek( table_start + (TT_Long)cmap->offset ) ||
ACCESS_Frame(6L) )
goto Exit;
-
+
cmap->format = GET_UShort();
cmap->length = GET_UShort();
cmap->version = GET_UShort();
-
+
FORGET_Frame();
#endif
cmap->offset = FILE_Pos();
@@ -1264,7 +1264,7 @@
FT_FRAME_USHORT( TT_OS2, usWinAscent ),
FT_FRAME_USHORT( TT_OS2, usWinDescent ),
FT_FRAME_END };
-
+
const FT_Frame_Field os2_fields_extra[] = {
FT_FRAME_START(8),
FT_FRAME_ULONG( TT_OS2, ulCodePageRange1 ),
@@ -1579,7 +1579,7 @@
coverage = GET_UShort();
FORGET_Frame();
-
+
if ( coverage == 0x0001 )
{
TT_UInt num_pairs;
@@ -1615,7 +1615,7 @@
face->kern_table_index = n;
goto Exit;
}
-
+
if ( FILE_Skip( length ) )
goto Exit;
}
@@ -1646,7 +1646,7 @@
/* TrueType error code. 0 means success. */
/* */
LOCAL_FUNC
- TT_Error TT_Load_Hdmx( TT_Face face,
+ TT_Error TT_Load_Hdmx( TT_Face face,
FT_Stream stream )
{
TT_Error error;
@@ -1692,11 +1692,11 @@
if ( READ_Byte( cur->ppem ) ||
READ_Byte( cur->max_width ) )
goto Exit;
-
+
if ( ALLOC( cur->widths, num_glyphs ) ||
FILE_Read( cur->widths, num_glyphs ) )
goto Exit;
-
+
/* skip padding bytes */
if ( record_size > 0 && FILE_Skip(record_size) )
goto Exit;
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 7eeac20..57cf6a5 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -75,7 +75,7 @@
/* first of all, compute starting write position */
line_incr = target->pitch;
line_buff = target->buffer;
-
+
if (line_incr < 0)
line_buff -= line_incr*(target->rows-1);
@@ -354,7 +354,7 @@
range->glyph_codes[n] = GET_UShort();
if (load_offsets)
- range->glyph_offsets[n] = (TT_ULong)range->image_offset +
+ range->glyph_offsets[n] = (TT_ULong)range->image_offset +
GET_UShort();
}
@@ -1226,19 +1226,19 @@
switch ( strike->bit_depth )
{
case 1:
- map->pixel_mode = ft_pixel_mode_mono;
+ map->pixel_mode = ft_pixel_mode_mono;
map->pitch = (map->width+7) >> 3;
break;
case 2:
- map->pixel_mode = ft_pixel_mode_pal2;
+ map->pixel_mode = ft_pixel_mode_pal2;
map->pitch = (map->width+3) >> 2;
break;
case 4:
- map->pixel_mode = ft_pixel_mode_pal4;
+ map->pixel_mode = ft_pixel_mode_pal4;
map->pitch = (map->width+1) >> 1;
break;
case 8:
- map->pixel_mode = ft_pixel_mode_grays;
+ map->pixel_mode = ft_pixel_mode_grays;
map->pitch = map->width;
break;
@@ -1399,13 +1399,13 @@
/* the font file */
error = face->goto_table( face, TTAG_EBDT, stream, 0 );
if (error) goto Exit;
-
+
ebdt_pos = FILE_Pos();
/* clear the bitmap & load the bitmap */
if (face->root.glyph->flags & ft_glyph_own_bitmap)
FREE( map->buffer );
-
+
map->rows = map->pitch = map->width = 0;
error = Load_SBit_Image( strike, range, ebdt_pos, glyph_offset,
@@ -1415,7 +1415,7 @@
/* the glyph slot owns this bitmap buffer */
face->root.glyph->flags |= ft_glyph_own_bitmap;
-
+
/* setup vertical metrics if needed */
if ( strike->flags & 1 )
{
diff --git a/src/truetype/rules.mk b/src/truetype/rules.mk
index 8ed78a7..bfb1f5e 100644
--- a/src/truetype/rules.mk
+++ b/src/truetype/rules.mk
@@ -38,7 +38,7 @@ TT_INCLUDE := $(SFNT_INCLUDE) $(TT_DIR) $(TT_EXT_DIR)
# compilation flags for the driver
#
TT_CFLAGS := $(TT_INCLUDE:%=$I%)
-TT_COMPILE := $(FT_COMPILE) $(TT_CFLAGS)
+TT_COMPILE := $(FT_COMPILE) $(TT_CFLAGS)
# driver sources (i.e., C files)
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 091a370..9137758 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -49,7 +49,7 @@
* find_encoding
*
* <Description>
- * return the FT_Encoding corresponding to a given
+ * return the FT_Encoding corresponding to a given
* (platform_id,encoding_id) pair, as found in TrueType charmaps
*
* <Input>
@@ -60,7 +60,7 @@
* the corresponding FT_Encoding tag. ft_encoding_none by default
*
*****************************************************************/
-
+
static
FT_Encoding find_encoding( int platform_id,
int encoding_id )
@@ -70,28 +70,28 @@
int platform_id;
int encoding_id;
FT_Encoding encoding;
-
+
} TEncoding;
static
const TEncoding tt_encodings[] =
{
{ TT_PLATFORM_ISO, -1, ft_encoding_unicode },
-
+
{ TT_PLATFORM_APPLE_UNICODE, -1, ft_encoding_unicode },
-
+
{ TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, ft_encoding_apple_roman },
-
+
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, ft_encoding_unicode },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, ft_encoding_sjis },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, ft_encoding_big5 }
};
-
+
const TEncoding *cur, *limit;
-
+
cur = tt_encodings;
limit = cur + sizeof(tt_encodings)/sizeof(tt_encodings[0]);
-
+
for ( ; cur < limit; cur++ )
{
if (cur->platform_id == platform_id)
@@ -235,7 +235,7 @@
/* now, set root->charmap with a unicode charmap wherever available */
if (!root->charmap && charmap->root.encoding == ft_encoding_unicode)
root->charmap = (FT_CharMap)charmap;
-
+
root->charmaps[n] = (FT_CharMap)charmap;
}
@@ -443,7 +443,7 @@
metrics->x_ppem = (TT_UShort)(dim_x >> 6);
metrics->y_ppem = (TT_UShort)(dim_y >> 6);
}
-
+
size->ttmetrics.valid = FALSE;
return TT_Reset_Size( size );
@@ -593,7 +593,7 @@
TT_Error error;
TT_Face face;
TT_CMapTable* cmap;
-
+
cmap = &charmap->cmap;
face = (TT_Face)charmap->root.face;
@@ -601,7 +601,7 @@
if ( !cmap->loaded )
{
SFNT_Interface* sfnt = (SFNT_Interface*)face->sfnt;
-
+
error = sfnt->load_charmap( face, cmap, face->root.stream );
if (error)
return error;
@@ -620,7 +620,7 @@
void* tt_get_sfnt_table( TT_Face face, FT_Sfnt_Tag tag )
{
void* table;
-
+
switch (tag)
{
case ft_sfnt_head: table = &face->header; break;
@@ -629,7 +629,7 @@
case ft_sfnt_os2: table = (face->os2.version == 0xFFFF ? 0 : &face->os2 ); break;
case ft_sfnt_post: table = &face->postscript; break;
case ft_sfnt_maxp: table = &face->max_profile; break;
-
+
default:
table = 0;
}
@@ -641,10 +641,10 @@
FTDriver_Interface tt_get_interface( TT_Driver driver, const char* interface )
{
UNUSED(driver);
-
+
if (strcmp(interface,"get_sfnt")==0)
return (FTDriver_Interface)tt_get_sfnt_table;
-
+
return 0;
}
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index bd66e8f..2413066 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -198,10 +198,10 @@
TT_UShort n_ins;
TT_Int n, n_points;
-
+
/*********************************************************************/
/* simple check */
-
+
if ( n_contours > load->left_contours )
{
FT_TRACE0(( "ERROR: Glyph index %ld has %d contours > left %d\n",
@@ -216,7 +216,7 @@
/*********************************************************************/
/* reading the contours endpoints */
-
+
if ( ACCESS_Frame( byte_count ) )
return error;
@@ -230,7 +230,7 @@
/*********************************************************************/
/* reading the bytecode instructions */
-
+
n_ins = GET_UShort();
load->face->root.glyph->control_len = n_ins;
@@ -269,15 +269,15 @@
#endif
stream->cursor += n_ins;
-
+
/*********************************************************************/
/* reading the point tags */
- {
+ {
TT_Byte* flag = load->zone.tags;
TT_Byte* limit = flag + n_points;
TT_Byte c, count;
-
+
for (; flag < limit; flag++)
{
*flag = c = GET_Byte();
@@ -291,17 +291,17 @@
/*********************************************************************/
/* reading the X coordinates */
-
+
{
TT_Vector* vec = zone->org;
TT_Vector* limit = vec + n_points;
TT_Byte* flag = zone->tags;
TT_Pos x = 0;
-
+
for ( ; vec < limit; vec++, flag++ )
{
TT_Pos y = 0;
-
+
if ( *flag & 2 )
{
y = GET_Byte();
@@ -309,7 +309,7 @@
}
else if ((*flag & 16) == 0)
y = GET_Short();
-
+
x += y;
vec->x = x;
}
@@ -323,11 +323,11 @@
TT_Vector* limit = vec + n_points;
TT_Byte* flag = zone->tags;
TT_Pos x = 0;
-
+
for ( ; vec < limit; vec++, flag++ )
{
TT_Pos y = 0;
-
+
if ( *flag & 4 )
{
y = GET_Byte();
@@ -335,7 +335,7 @@
}
else if ((*flag & 32) == 0)
y = GET_Short();
-
+
x += y;
vec->y = x;
}
@@ -345,24 +345,24 @@
/*********************************************************************/
/* Add shadow points */
-
+
/* Now add the two shadow points at n and n + 1. */
/* We need the left side bearing and advance width. */
{
TT_Vector* pp1;
TT_Vector* pp2;
-
+
/* pp1 = xMin - lsb */
pp1 = zone->org + n_points;
pp1->x = load->bbox.xMin - load->left_bearing;
pp1->y = 0;
-
+
/* pp2 = pp1 + aw */
pp2 = pp1 + 1;
pp2->x = pp1->x + load->advance;
pp2->y = 0;
-
+
/* clear the touch tags */
for ( n = 0; n < n_points; n++ )
zone->tags[n] &= FT_Curve_Tag_On;
@@ -439,7 +439,7 @@
}
return TT_Err_Ok;
-
+
Fail:
FORGET_Frame();
return error;
@@ -472,7 +472,7 @@
TT_UInt index, num_points, num_contours, count;
TT_Fixed x_scale, y_scale;
TT_ULong ins_offset;
-
+
/* check glyph index */
index = glyph_index;
if ( index >= (TT_UInt)face->root.num_glyphs )
@@ -485,7 +485,7 @@
num_contours = 0;
num_points = 0;
ins_offset = 0;
-
+
x_scale = 0x10000;
y_scale = 0x10000;
if ( (loader->load_flags & FT_LOAD_NO_SCALE)==0 )
@@ -514,7 +514,7 @@
count = 0;
if (index < (TT_UInt)face->num_locations-1)
count = face->glyph_locations[index+1] - offset;
-
+
if (count == 0)
{
@@ -574,7 +574,7 @@
loader->pp1.y = 0;
loader->pp2.x = loader->pp1.x + loader->advance;
loader->pp2.y = 0;
-
+
if ((loader->load_flags & FT_LOAD_NO_SCALE)==0)
{
loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
@@ -590,7 +590,7 @@
if (contours_count >= 0)
{
TT_UInt num_base_points;
-
+
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
error = Load_Simple( loader,
count,
@@ -599,7 +599,7 @@
loader->size->debug ) );
#else
error = Load_Simple( loader, count, contours_count, 0 );
-#endif
+#endif
if ( error )
goto Fail;
@@ -607,7 +607,7 @@
/* but the code is fat enough already :-) */
num_points = loader->zone.n_points;
num_contours = loader->zone.n_contours;
-
+
num_base_points = loader->base.n_points;
{
TT_UInt k;
@@ -633,16 +633,16 @@
{
/* for each subglyph, read composite header */
FT_SubGlyph* subglyph = subglyphs;
-
+
if (ACCESS_Frame(count)) goto Fail;
-
+
num_subglyphs = 0;
do
{
TT_Fixed xx, xy, yy, yx;
-
+
subglyph->arg1 = subglyph->arg2 = 0;
-
+
subglyph->flags = GET_UShort();
subglyph->index = GET_UShort();
@@ -657,11 +657,11 @@
subglyph->arg1 = GET_Char();
subglyph->arg2 = GET_Char();
}
-
+
/* read transform */
xx = yy = 0x10000;
xy = yx = 0;
-
+
if (subglyph->flags & WE_HAVE_A_SCALE)
{
xx = (TT_Fixed)GET_Short() << 2;
@@ -679,12 +679,12 @@
yx = (TT_Fixed)GET_Short() << 2;
yy = (TT_Fixed)GET_Short() << 2;
}
-
+
subglyph->transform.xx = xx;
subglyph->transform.xy = xy;
subglyph->transform.yx = yx;
subglyph->transform.yy = yy;
-
+
subglyph++;
num_subglyphs++;
if (num_subglyphs >= TT_MAX_SUBGLYPHS)
@@ -709,22 +709,22 @@
{
FT_GlyphSlot glyph = loader->glyph;
- /* reallocate subglyph array if necessary */
+ /* reallocate subglyph array if necessary */
if (glyph->max_subglyphs < num_subglyphs)
{
FT_Memory memory = loader->face->root.memory;
-
+
if ( REALLOC_ARRAY( glyph->subglyphs, glyph->max_subglyphs,
num_subglyphs, FT_SubGlyph ) )
goto Fail;
-
+
glyph->max_subglyphs = num_subglyphs;
}
/* copy subglyph array */
MEM_Copy( glyph->subglyphs, subglyphs,
num_subglyphs*sizeof(FT_SubGlyph));
-
+
/* set up remaining glyph fields */
glyph->num_subglyphs = num_subglyphs;
glyph->format = ft_glyph_format_composite;
@@ -740,18 +740,18 @@
/* Now, read each subglyph independently.. */
{
TT_Int n, num_base_points, num_new_points;
-
+
subglyph = subglyphs;
for ( n = 0; n < num_subglyphs; n++, subglyph++ )
{
TT_Vector pp1, pp2;
TT_Pos x, y;
-
+
pp1 = loader->pp1;
pp2 = loader->pp2;
num_base_points = loader->base.n_points;
-
+
error = load_truetype_glyph( loader, subglyph->index );
if ( subglyph->flags & USE_MY_METRICS )
{
@@ -763,15 +763,15 @@
loader->pp1 = pp1;
loader->pp2 = pp2;
}
-
+
num_points = loader->base.n_points;
num_contours = loader->base.n_contours;
-
+
num_new_points = num_points - num_base_points;
-
+
/********************************************************/
/* now perform the transform required for this subglyph */
-
+
if ( subglyph->flags & ( WE_HAVE_A_SCALE |
WE_HAVE_AN_XY_SCALE |
WE_HAVE_A_2X2 ) )
@@ -783,7 +783,7 @@
for ( ; cur < limit; cur++, org++ )
{
TT_Pos nx, ny;
-
+
nx = FT_MulFix( cur->x, subglyph->transform.xx ) +
FT_MulFix( cur->y, subglyph->transform.yx );
@@ -818,8 +818,8 @@
goto Fail;
}
- l += num_base_points;
-
+ l += num_base_points;
+
x = loader->base.cur[k].x - loader->base.cur[l].x;
y = loader->base.cur[k].y - loader->base.cur[l].y;
}
@@ -832,7 +832,7 @@
{
x = FT_MulFix( x, x_scale );
y = FT_MulFix( y, y_scale );
-
+
if ( subglyph->flags & ROUND_XY_TO_GRID )
{
x = (x + 32) & -64;
@@ -844,7 +844,7 @@
translate_array( num_new_points, loader->zone.cur, x, y );
cur_to_org( num_new_points, &loader->zone );
}
-
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -861,12 +861,12 @@
TT_UInt n_points = loader->base.n_points;
FT_GlyphZone* pts;
TT_Vector* pp1;
-
+
/* read size of instructions */
if ( FILE_Seek( ins_offset ) ||
READ_UShort(n_ins) ) goto Fail;
FT_TRACE4(( "Instructions size = %d\n", n_ins ));
-
+
/* check it */
if ( n_ins > face->max_profile.maxSizeOfInstructions )
{
@@ -874,68 +874,68 @@
subglyph->index ));
return TT_Err_Too_Many_Ins;
}
-
+
if (exec)
{
}
/* read the instructions */
if ( FILE_Read( exec->glyphIns, n_ins ) )
goto Fail;
-
+
error = TT_Set_CodeRange( exec,
tt_coderange_glyph,
exec->glyphIns,
n_ins );
if ( error ) goto Fail;
-
+
/* prepare the execution context */
exec->pts = loader->base;
pts = &exec->pts;
-
+
pts->n_points = num_points + 2;
pts->n_contours = num_contours;
-
+
/* add phantom points */
pp1 = pts->cur + num_points;
pp1[0] = loader->pp1;
pp1[1] = loader->pp2;
-
+
pts->tags[num_points + 1] = 0;
pts->tags[num_points + 2] = 0;
-
+
/* if hinting, round the phantom points */
if ( IS_HINTED(loader->load_flags) )
{
pp1[0].x = ((loader->pp1.x + 32) & -64);
pp1[1].x = ((loader->pp2.x + 32) & -64);
}
-
+
{
TT_UInt k;
for ( k = 0; k < n_points; k++ )
pts->tags[k] &= FT_Curve_Tag_On;
}
-
+
cur_to_org( n_points, pts );
-
+
/* now consider hinting */
if ( IS_HINTED(loader->load_flags) && n_ins > 0 )
{
exec->is_composite = TRUE;
exec->pedantic_hinting =
(TT_Bool)(loader->load_flags & FT_LOAD_PEDANTIC);
-
+
error = TT_Run_Context( exec, loader->size->debug );
if ( error && exec->pedantic_hinting )
goto Fail;
}
-
+
/* save glyph origin and advance points */
loader->pp1 = pp1[0];
loader->pp2 = pp1[1];
}
#endif
-
+
}
}
@@ -948,7 +948,7 @@
error = TT_Err_Ok;
Fail:
- return error;
+ return error;
}
@@ -966,7 +966,7 @@
TT_Fixed x_scale, y_scale;
TT_GlyphSlot glyph = loader->glyph;
TT_Size size = loader->size;
-
+
/* when a simple glyph was loaded, the value of */
/* "base.n_points" and "base.n_contours" is 0, we must */
/* take those in the "zone" instead.. */
@@ -975,7 +975,7 @@
num_points = loader->zone.n_points;
num_contours = loader->zone.n_contours;
}
-
+
x_scale = 0x10000;
y_scale = 0x10000;
if ( (loader->load_flags & FT_LOAD_NO_SCALE) == 0)
@@ -983,7 +983,7 @@
x_scale = size->root.metrics.x_scale;
y_scale = size->root.metrics.y_scale;
}
-
+
if ( glyph->format != ft_glyph_format_composite )
{
TT_UInt u;
@@ -1000,13 +1000,13 @@
glyph->outline.flags &= ~ft_outline_single_pass;
glyph->outline.n_points = num_points;
glyph->outline.n_contours = num_contours;
-
+
/* translate array so that (0,0) is the glyph's origin */
translate_array( (TT_UShort)(num_points + 2),
glyph->outline.points,
-loader->pp1.x,
0 );
-
+
FT_Outline_Get_CBox( &glyph->outline, &bbox );
if ( IS_HINTED(loader->load_flags) )
@@ -1199,7 +1199,7 @@
TT_Error error;
TT_Loader loader;
FT_GlyphZone* zone;
-
+
face = (TT_Face)glyph->face;
sfnt = (SFNT_Interface*)face->sfnt;
stream = face->root.stream;
@@ -1223,7 +1223,7 @@
if ( size && (load_flags & FT_LOAD_NO_BITMAP) == 0 && sfnt->load_sbits )
{
TT_SBit_Metrics metrics;
-
+
error = sfnt->load_sbit_image( face,
size->root.metrics.x_ppem,
size->root.metrics.y_ppem,
@@ -1279,7 +1279,7 @@
goto Exit;
}
loader.base = *zone;
-
+
loader.zone.n_points = 0;
loader.zone.n_contours = 0;
@@ -1290,7 +1290,7 @@
loader.exec = size->debug ? size->context : TT_New_Context(face);
if ( !loader.exec )
return TT_Err_Could_Not_Find_Context;
-
+
TT_Load_Context( loader.exec, face, size );
/* load default graphics state - if needed */
@@ -1301,7 +1301,7 @@
/* clear all outline flags, except the "owner" one */
glyph->outline.flags &= ft_outline_owner;
-
+
if (size && size->root.metrics.y_ppem < 24 )
glyph->outline.flags |= ft_outline_high_precision;
@@ -1315,7 +1315,7 @@
loader.size = size;
loader.glyph = glyph;
loader.stream = stream;
-
+
loader.glyf_offset = FILE_Pos();
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
diff --git a/src/truetype/ttgload.h b/src/truetype/ttgload.h
index 5350d64..93a8d23 100644
--- a/src/truetype/ttgload.h
+++ b/src/truetype/ttgload.h
@@ -49,13 +49,13 @@
TT_Bool preserve_pps;
TT_Vector pp1;
TT_Vector pp2;
-
+
TT_ULong glyf_offset;
-
+
/* the zone where we load our glyphs */
FT_GlyphZone base;
FT_GlyphZone zone;
-
+
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
TT_ExecContext exec;
TT_Byte* instructions;
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 1ef9dc4..64bce53 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -1561,7 +1561,7 @@
{
TT_F26Dot6 val;
-
+
UNUSED_EXEC;
if ( distance >= 0 )
@@ -2040,7 +2040,7 @@
TT_Vector* v2 )
{
UNUSED_EXEC;
-
+
return (v1->y - v2->y);
}
@@ -2153,7 +2153,7 @@
TT_Bool S1, S2;
UNUSED_EXEC;
-
+
if ( ABS( Vx ) < 0x10000L && ABS( Vy ) < 0x10000L )
{
Vx *= 0x100;
@@ -2236,7 +2236,7 @@
return SUCCESS;
}
-#else
+#else
static
TT_Bool Normalize( EXEC_OP_ TT_F26Dot6 Vx,
TT_F26Dot6 Vy,
@@ -2258,7 +2258,7 @@
R->x = 0;
R->y = 0;
-
+
/* check that we're not trying to normalise zero !! */
if (u==0) return SUCCESS;
@@ -2266,21 +2266,21 @@
hi = (TT_ULong)u >> 16;
lo = (TT_ULong)u & 0xFFFF;
med = hi*lo;
-
+
H = hi*hi + (med >> 15);
med <<= 17;
L = lo*lo + med;
if (L < med) H++;
-
+
hi = (TT_ULong)v >> 16;
lo = (TT_ULong)v & 0xFFFF;
med = hi*lo;
-
+
H += hi*hi + (med >> 15);
med <<= 17;
L2 = lo*lo + med;
if (L2 < med) H++;
-
+
L += L2;
if (L < L2) H++;
@@ -2293,7 +2293,7 @@
L <<= 2;
shift++;
}
-
+
d = FT_Sqrt32(L);
R->x = (TT_F2Dot14)TT_MULDIV( Vx << shift, 0x4000, d );
R->y = (TT_F2Dot14)TT_MULDIV( Vy << shift, 0x4000, d );
@@ -2308,7 +2308,7 @@
H >>= 2;
shift++;
}
-
+
d = FT_Sqrt32(L);
R->x = (TT_F2Dot14)TT_MULDIV( Vx >> shift, 0x4000, d );
R->y = (TT_F2Dot14)TT_MULDIV( Vy >> shift, 0x4000, d );
@@ -2322,7 +2322,7 @@
sy = ( R->y >= 0 ? 1 : -1 );
x = (TT_ULong)sx*R->x;
y = (TT_ULong)sy*R->y;
-
+
w = x*x+y*y;
/* we now want to adjust (x,y) in order to have sqrt(w) == 0x4000 */
@@ -2332,10 +2332,10 @@
/* increment the smallest coordinate */
if ( x < y ) x++;
else y++;
-
+
w = x*x+y*y;
}
-
+
while ( w >= 0x10040000L )
{
/* decrement the smallest coordinate */
@@ -4055,13 +4055,13 @@
rec = CUR.FDefs;
limit = rec + CUR.numFDefs;
n = args[0];
-
+
for ( ; rec < limit; rec++ )
{
if (rec->opc == n)
break;
}
-
+
if ( rec == limit )
{
/* check that there is enough room for new functions */
@@ -4072,15 +4072,15 @@
}
CUR.numFDefs++;
}
-
+
rec->range = CUR.curRange;
rec->opc = n;
rec->start = CUR.IP+1;
rec->active = TRUE;
-
+
if ( n > CUR.maxFunc )
CUR.maxFunc = n;
-
+
/* Now skip the whole function definition. */
/* We don't allow nested IDEFS & FDEFs. */
@@ -4164,7 +4164,7 @@
/* first of all, check the index */
F = args[0];
if ( BOUNDS( F, CUR.maxFunc+1 ) ) goto Fail;
-
+
/* Except for some old Apple fonts, all functions in a TrueType */
/* font are defined in increasing order, starting from 0. This */
/* means that we normally have */
@@ -4179,20 +4179,20 @@
{
/* look up the FDefs table */
TT_DefRecord* limit;
-
+
def = CUR.FDefs;
limit = def + CUR.numFDefs;
-
+
while (def < limit && def->opc != F)
def++;
-
+
if (def == limit) goto Fail;
}
-
+
/* check that the function is active */
if (!def->active)
goto Fail;
-
+
/* check the call stack */
if ( CUR.callTop >= CUR.callSize )
{
@@ -4211,10 +4211,10 @@
INS_Goto_CodeRange( def->range,
def->start );
-
+
CUR.step_ins = FALSE;
return;
-
+
Fail:
CUR.error = TT_Err_Invalid_Reference;
}
@@ -4236,7 +4236,7 @@
/* first of all, check the index */
F = args[1];
if ( BOUNDS( F, CUR.maxFunc+1 ) ) goto Fail;
-
+
/* Except for some old Apple fonts, all functions in a TrueType */
/* font are defined in increasing order, starting from 0. This */
/* means that we normally have */
@@ -4251,21 +4251,21 @@
{
/* look up the FDefs table */
TT_DefRecord* limit;
-
+
def = CUR.FDefs;
limit = def + CUR.numFDefs;
-
+
while (def < limit && def->opc != F)
def++;
-
+
if (def == limit) goto Fail;
}
-
+
/* check that the function is active */
if (!def->active)
goto Fail;
- /* check stack */
+ /* check stack */
if ( CUR.callTop >= CUR.callSize )
{
CUR.error = TT_Err_Stack_Overflow;
@@ -4312,7 +4312,7 @@
for ( ; def < limit; def++ )
if (def->opc == (TT_ULong)args[0] )
break;
-
+
if ( def == limit )
{
/* check that there is enough room for a new instruction */
@@ -4323,15 +4323,15 @@
}
CUR.numIDefs++;
}
-
+
def->opc = args[0];
def->start = CUR.IP+1;
def->range = CUR.curRange;
def->active = TRUE;
-
+
if ( (TT_ULong)args[0] > CUR.maxIns )
CUR.maxIns = args[0];
-
+
/* Now skip the whole function definition. */
/* We don't allow nested IDEFs & FDEFs. */
@@ -6320,30 +6320,30 @@
{
TT_DefRecord* def = CUR.IDefs;
TT_DefRecord* limit = def + CUR.numIDefs;
-
+
UNUSED_ARG;
-
+
for ( ; def < limit; def++ )
{
if (def->opc == CUR.opcode && def->active )
{
TT_CallRec* call;
-
+
if ( CUR.callTop >= CUR.callSize )
{
CUR.error = TT_Err_Stack_Overflow;
return;
}
-
+
call = CUR.callStack + CUR.callTop++;
call->Caller_Range = CUR.curRange;
call->Caller_IP = CUR.IP+1;
call->Cur_Count = 1;
call->Cur_Restart = def->start;
-
+
INS_Goto_CodeRange( def->range, def->start );
-
+
CUR.step_ins = FALSE;
return;
}
@@ -7292,29 +7292,29 @@
{
TT_DefRecord* def = CUR.IDefs;
TT_DefRecord* limit = def + CUR.numIDefs;
-
+
for ( ; def < limit; def++ )
{
if ( def->active && CUR.opcode == def->opc )
{
TT_CallRec* callrec;
-
+
if ( CUR.callTop >= CUR.callSize )
{
CUR.error = TT_Err_Invalid_Reference;
goto LErrorLabel_;
}
-
+
callrec = &CUR.callStack[CUR.callTop];
-
+
callrec->Caller_Range = CUR.curRange;
callrec->Caller_IP = CUR.IP + 1;
callrec->Cur_Count = 1;
callrec->Cur_Restart = def->start;
-
+
if ( INS_Goto_CodeRange( def->range, def->start ) == FAILURE )
goto LErrorLabel_;
-
+
goto LSuiteLabel_;
}
}
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index 33457e0..3bace38 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -365,7 +365,7 @@
/*************************************************************************/
- /* Face Funcs */
+ /* Face Funcs */
LOCAL_DEF TT_Error TT_Init_Face( FT_Stream stream,
TT_Face face,
@@ -377,7 +377,7 @@
/*************************************************************************/
- /* Size funcs */
+ /* Size funcs */
LOCAL_DEF TT_Error TT_Init_Size ( TT_Size size );
LOCAL_DEF void TT_Done_Size ( TT_Size size );
@@ -385,14 +385,14 @@
/*************************************************************************/
- /* GlyphSlot funcs */
+ /* GlyphSlot funcs */
LOCAL_DEF TT_Error TT_Init_GlyphSlot( TT_GlyphSlot slot );
LOCAL_DEF void TT_Done_GlyphSlot( TT_GlyphSlot slot );
/*************************************************************************/
- /* Driver funcs */
+ /* Driver funcs */
LOCAL_DEF TT_Error TT_Init_Driver( TT_Driver driver );
LOCAL_DEF void TT_Done_Driver( TT_Driver driver );
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 2b904af..ec216f5 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -34,27 +34,27 @@
FT_UInt result = 0;
char temp[64];
- /* skip whitespace */
+ /* skip whitespace */
while ( (*p == ' ' || *p == '\t' || *p == ':' || *p == ';') && p < limit )
p++;
*start = p;
-
+
/* now, read glyph name */
while ( IS_ALPHANUM(*p) && p < limit ) p++;
len = p - *start;
if (len > 0 && len < 64)
{
FT_Int n;
-
+
/* copy glyph name to intermediate array */
MEM_Copy( temp, *start, len );
temp[len] = 0;
-
+
/* lookup glyph name in face array */
for ( n = 0; n < type1->num_glyphs; n++ )
{
char* gname = (char*)type1->glyph_names[n];
-
+
if ( gname && gname[0] == temp[0] && strcmp(gname,temp) == 0 )
{
result = n;
@@ -74,17 +74,17 @@
FT_Byte* p = *start;
int sum = 0;
int sign = 1;
-
+
/* skip everything that is not a number */
while ( p < limit && (*p < '0' || *p > '9') )
{
sign = 1;
if (*p == '-')
sign = -1;
-
+
p++;
}
-
+
while ( p < limit && (*p >= '0' && *p < '9') )
{
sum = sum*10 + (*p - '0');
@@ -104,10 +104,10 @@
{
T1_Kern_Pair* pair1 = (T1_Kern_Pair*)a;
T1_Kern_Pair* pair2 = (T1_Kern_Pair*)b;
-
+
T1_ULong index1 = KERN_INDEX(pair1->glyph1,pair1->glyph2);
T1_ULong index2 = KERN_INDEX(pair2->glyph1,pair2->glyph2);
-
+
return ( index1 < index2 ? -1 :
( index1 > index2 ? 1 : 0 ));
}
@@ -127,14 +127,14 @@
T1_Kern_Pair* pair;
T1_Font* type1 = &((T1_Face)t1_face)->type1;
T1_AFM* afm = 0;
-
+
if ( ACCESS_Frame(stream->size) )
return error;
-
+
start = (FT_Byte*)stream->cursor;
limit = (FT_Byte*)stream->limit;
p = start;
-
+
/* we are now going to count the occurences of "KP" or "KPX" in */
/* the AFM file.. */
count = 0;
@@ -147,16 +147,16 @@
/* Actually, kerning pairs are simply optional !! */
if (count == 0)
goto Exit;
-
+
/* allocate the pairs */
if ( ALLOC( afm, sizeof(*afm ) ) ||
ALLOC_ARRAY( afm->kern_pairs, count, T1_Kern_Pair ) )
goto Exit;
-
+
/* now, read each kern pair */
pair = afm->kern_pairs;
afm->num_pairs = count;
-
+
/* save in face object */
((T1_Face)t1_face)->afm_data = afm;
@@ -165,26 +165,26 @@
if ( IS_KERN_PAIR(p) )
{
FT_Byte* q;
-
+
/* skip keyword (KP or KPX) */
q = p+2;
if (*q == 'X') q++;
-
+
pair->glyph1 = afm_atoindex( &q, limit, type1 );
pair->glyph2 = afm_atoindex( &q, limit, type1 );
pair->kerning.x = afm_atoi( &q, limit );
-
+
pair->kerning.y = 0;
if ( p[2] != 'X' )
pair->kerning.y = afm_atoi( &q, limit );
-
+
pair++;
}
}
-
+
/* now, sort the kern pairs according to their glyph indices */
qsort( afm->kern_pairs, count, sizeof(T1_Kern_Pair), compare_kern_pairs );
-
+
Exit:
if (error)
FREE( afm );
@@ -194,7 +194,7 @@
}
- /* find the kerning for a given glyph pair */
+ /* find the kerning for a given glyph pair */
LOCAL_FUNC
void T1_Get_Kerning( T1_AFM* afm,
FT_UInt glyph1,
@@ -203,23 +203,23 @@
{
T1_Kern_Pair *min, *mid, *max;
T1_ULong index = KERN_INDEX(glyph1,glyph2);
-
+
/* simple binary search */
min = afm->kern_pairs;
max = min + afm->num_pairs-1;
-
+
while (min <= max)
{
T1_ULong midi;
-
+
mid = min + (max-min)/2;
- midi = KERN_INDEX(mid->glyph1,mid->glyph2);
+ midi = KERN_INDEX(mid->glyph1,mid->glyph2);
if ( midi == index )
{
*kerning = mid->kerning;
return;
}
-
+
if ( midi < index ) min = mid+1;
else max = mid-1;
}
diff --git a/src/type1/t1afm.h b/src/type1/t1afm.h
index 61e18b8..984ae94 100644
--- a/src/type1/t1afm.h
+++ b/src/type1/t1afm.h
@@ -18,7 +18,7 @@ typedef struct T1_Kern_Pair_
FT_UInt glyph1;
FT_UInt glyph2;
FT_Vector kerning;
-
+
} T1_Kern_Pair;
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 6998460..d96eddf 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -9,7 +9,7 @@
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
@@ -59,10 +59,10 @@
const FT_String* interface )
{
UNUSED(driver);
-
+
if ( strcmp( (const char*)interface, "attach_file" ) == 0 )
return (FTDriver_Interface)T1_Read_AFM;
-
+
return 0;
}
@@ -107,7 +107,7 @@
T1_Vector* kerning )
{
T1_AFM* afm;
-
+
kerning->x = 0;
kerning->y = 0;
@@ -185,7 +185,7 @@
UNUSED(pixel_width);
UNUSED(pixel_height);
- size->valid = FALSE;
+ size->valid = FALSE;
return T1_Reset_Size(size);
}
@@ -214,7 +214,7 @@
face = (T1_Face)charmap->face;
psnames = (PSNames_Interface*)face->psnames;
- if (psnames)
+ if (psnames)
switch (charmap->encoding)
{
/********************************************************************/
@@ -233,7 +233,7 @@
result = 0;
goto Exit;
}
-
+
/********************************************************************/
/* */
/* Custom Type 1 encoding */
@@ -248,7 +248,7 @@
}
goto Exit;
}
-
+
/********************************************************************/
/* */
/* Adobe Standard & Expert encoding support */
@@ -259,18 +259,18 @@
FT_UInt code;
FT_Int n;
const char* glyph_name;
-
+
code = psnames->adobe_std_encoding[charcode];
if (charmap->encoding == ft_encoding_adobe_expert)
code = psnames->adobe_expert_encoding[charcode];
-
+
glyph_name = psnames->adobe_std_strings(code);
if (!glyph_name) break;
-
+
for ( n = 0; n < face->type1.num_glyphs; n++ )
{
const char* gname = face->type1.glyph_names[n];
-
+
if ( gname && gname[0] == glyph_name[0] &&
strcmp( gname, glyph_name ) == 0 )
{
@@ -280,7 +280,7 @@
}
}
}
- Exit:
+ Exit:
return result;
}
@@ -366,7 +366,7 @@
sizeof( T1_FaceRec ),
sizeof( T1_SizeRec ),
sizeof( T1_GlyphSlotRec ),
-
+
"type1",
100,
200,
@@ -385,7 +385,7 @@
(FTDriver_initFace) T1_Init_Face,
(FTDriver_doneFace) T1_Done_Face,
-#ifdef T1_CONFIG_OPTION_NO_AFM
+#ifdef T1_CONFIG_OPTION_NO_AFM
(FTDriver_getKerning) 0,
#else
(FTDriver_getKerning) Get_Kerning,
@@ -425,12 +425,12 @@
/* */
#ifdef FT_CONFIG_OPTION_DYNAMIC_DRIVERS
-
+
EXPORT_FUNC(FT_DriverInterface*) getDriverInterface( void )
{
return &t1_driver_interface;
}
-
+
#endif /* FT_CONFIG_OPTION_DYNAMIC_DRIVERS */
diff --git a/src/type1/t1driver.h b/src/type1/t1driver.h
index d1feadc..35fe57d 100644
--- a/src/type1/t1driver.h
+++ b/src/type1/t1driver.h
@@ -9,7 +9,7 @@
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
diff --git a/src/type1/t1errors.h b/src/type1/t1errors.h
index 01f5e4a..7984f54 100644
--- a/src/type1/t1errors.h
+++ b/src/type1/t1errors.h
@@ -34,7 +34,7 @@
#define T1_Err_Ok FT_Err_Ok
/* ----------- high level API errors -------- */
-
+
#define T1_Err_Invalid_File_Format FT_Err_Invalid_File_Format
#define T1_Err_Invalid_Argument FT_Err_Invalid_Argument
#define T1_Err_Invalid_Driver_Handle FT_Err_Invalid_Driver_Handle
@@ -53,7 +53,7 @@
#define T1_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle
/* ------------- internal errors ------------ */
-
+
#define T1_Err_Out_Of_Memory FT_Err_Out_Of_Memory
#define T1_Err_Unlisted_Object FT_Err_Unlisted_Object
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 19df387..585204d 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -168,7 +168,7 @@
* to implement the SEAC Type 1 operator.
*
* <Input>
- * face :: current face object
+ * face :: current face object
* charcode :: charcode to look for
*
* <Return>
@@ -184,18 +184,18 @@
T1_Int n;
const T1_String* glyph_name;
PSNames_Interface* psnames = (PSNames_Interface*)face->psnames;
-
+
/* check range of standard char code */
if (charcode < 0 || charcode > 255)
return -1;
-
+
glyph_name = psnames->adobe_std_strings(
psnames->adobe_std_encoding[charcode]);
-
+
for ( n = 0; n < face->type1.num_glyphs; n++ )
{
T1_String* name = (T1_String*)face->type1.glyph_names[n];
-
+
if ( name && strcmp(name,glyph_name) == 0 )
return n;
}
@@ -221,7 +221,7 @@
* achar :: accent character's StandardEncoding charcode
*
* <Return>
- * Error code. 0 means success.
+ * Error code. 0 means success.
*
*********************************************************************/
@@ -240,10 +240,10 @@
FT_Outline* base = &decoder->builder.base;
T1_Vector left_bearing, advance;
T1_Font* type1 = &face->type1;
-
+
bchar_index = lookup_glyph_by_stdcharcode( face, bchar );
achar_index = lookup_glyph_by_stdcharcode( face, achar );
-
+
if (bchar_index < 0 || achar_index < 0)
{
FT_ERROR(( "T1.Parse_Seac : invalid seac character code arguments\n" ));
@@ -275,20 +275,20 @@
FT_GlyphSlot glyph = (FT_GlyphSlot)decoder->builder.glyph;
FT_SubGlyph* subg;
- /* reallocate subglyph array if necessary */
+ /* reallocate subglyph array if necessary */
if (glyph->max_subglyphs < 2)
{
FT_Memory memory = decoder->builder.face->root.memory;
-
+
if ( REALLOC_ARRAY( glyph->subglyphs, glyph->max_subglyphs,
2, FT_SubGlyph ) )
return error;
-
+
glyph->max_subglyphs = 2;
}
subg = glyph->subglyphs;
-
+
/* subglyph 0 = base character */
subg->index = bchar_index;
subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES |
@@ -296,7 +296,7 @@
subg->arg1 = 0;
subg->arg2 = 0;
subg++;
-
+
/* subglyph 1 = accent character */
subg->index = achar_index;
subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;
@@ -313,19 +313,19 @@
/* as they will be erased by the next load.. */
left_bearing = decoder->builder.left_bearing;
advance = decoder->builder.advance;
-
+
decoder->builder.left_bearing.x = 0;
- decoder->builder.left_bearing.y = 0;
-
+ decoder->builder.left_bearing.y = 0;
+
/* Now load "achar" on top of */
/* the base outline */
- /* */
+ /* */
cur->n_points = 0;
cur->n_contours = 0;
cur->points = base->points + base->n_points;
cur->tags = base->tags + base->n_points;
cur->contours = base->contours + base->n_contours;
-
+
error = T1_Parse_CharStrings( decoder,
type1->charstrings [achar_index],
type1->charstrings_len[achar_index],
@@ -333,20 +333,20 @@
type1->subrs,
type1->subrs_len );
if (error) return error;
-
+
/* adjust contours in accented character outline */
{
T1_Int n;
-
+
for ( n = 0; n < cur->n_contours; n++ )
cur->contours[n] += n_base_points;
}
-
+
/* restore the left side bearing and */
/* advance width of the base character */
decoder->builder.left_bearing = left_bearing;
decoder->builder.advance = advance;
-
+
/* Finally, move the accent */
FT_Outline_Translate( cur, adx - asb, ady );
}
@@ -368,7 +368,7 @@
* end_y :: position of final flex point
*
* <Return>
- * Error code. 0 means success.
+ * Error code. 0 means success.
*
*********************************************************************/
@@ -434,7 +434,7 @@
* subrs_len :: array of sub-routines lengths
*
* <Return>
- * Error code. 0 means success.
+ * Error code. 0 means success.
*
*********************************************************************/
@@ -454,7 +454,7 @@
T1_Builder_Funcs* builds = &builder->funcs;
T1_Hinter_Funcs* hints = &decoder->hinter;
- static const T1_Int args_count[ op_max ] =
+ static const T1_Int args_count[ op_max ] =
{
0, /* none */
0, /* endchar */
@@ -959,11 +959,11 @@
if ( REALLOC_ARRAY( builder->base.points,
current, builder->max_points, T1_Vector ) ||
-
+
REALLOC_ARRAY( builder->base.tags,
current, builder->max_points, T1_Byte ) )
return error;
-
+
builder->current.points = builder->base.points + increment;
builder->current.tags = builder->base.tags + increment;
}
@@ -1015,7 +1015,7 @@
if ( REALLOC_ARRAY( builder->base.contours,
current, builder->max_contours, T1_Short ) )
return error;
-
+
builder->current.contours = builder->base.contours + increment;
}
@@ -1160,7 +1160,7 @@
FT_Outline* cur = &builder->current;
T1_Int num_points;
T1_Int first_point;
-
+
/* Some fonts, like Hershey, are made of "open paths" which are */
/* now managed directly by FreeType. In this case, it is necessary */
/* to close the path by duplicating its points in reverse order, */
@@ -1171,7 +1171,7 @@
first_point = cur->contours[ cur->n_contours-2 ]+1;
else
first_point = 0;
-
+
num_points = cur->n_points - first_point - 2;
if ( num_points > 0 )
{
@@ -1179,19 +1179,19 @@
char* source_tags;
T1_Vector* point;
char* tags;
-
+
error = T1_Add_Points( builder, num_points );
if (error) return error;
point = cur->points + cur->n_points;
tags = cur->tags + cur->n_points;
-
+
source_point = point - 2;
source_tags = tags - 2;
cur->n_points += num_points;
- if ( builder->load_points )
+ if ( builder->load_points )
do
{
*point++ = *source_point--;
@@ -1241,7 +1241,7 @@
if (error) return error;
}
- error = gload_closepath( builder );
+ error = gload_closepath( builder );
builder->base.n_points += cur->n_points;
builder->base.n_contours += cur->n_contours;
@@ -1324,7 +1324,7 @@
if (error) return error;
}
}
-
+
/* grow buffer if necessary */
error = T1_Add_Contours( builder, 1 ) ||
T1_Add_Points ( builder, 1 );
@@ -1391,7 +1391,7 @@
builder->last = vec;
}
-
+
cur->n_points += 3;
builder->path_begun = 1;
return T1_Err_Ok;
@@ -1532,9 +1532,9 @@
T1_Init_Builder( &decoder.builder, face, size, glyph,
&gload_builder_interface );
-
+
decoder.builder.no_recurse = !!(load_flags & FT_LOAD_NO_RECURSE);
-
+
/* now load the unscaled outline */
error = T1_Parse_CharStrings( &decoder,
type1->charstrings [glyph_index],
@@ -1542,7 +1542,7 @@
type1->num_subrs,
type1->subrs,
type1->subrs_len );
-
+
/* save new glyph tables */
T1_Done_Builder( &decoder.builder );
}
@@ -1564,9 +1564,9 @@
{
FT_BBox cbox;
FT_Glyph_Metrics* metrics = &glyph->root.metrics;
-
+
FT_Outline_Get_CBox( &glyph->root.outline, &cbox );
-
+
/* grid fit the bounding box if necessary */
if (hinting)
{
@@ -1575,36 +1575,36 @@
cbox.xMax = ( cbox.xMax+63 ) & -64;
cbox.yMax = ( cbox.yMax+63 ) & -64;
}
-
+
metrics->width = cbox.xMax - cbox.xMin;
metrics->height = cbox.yMax - cbox.yMin;
-
+
metrics->horiBearingX = cbox.xMin;
metrics->horiBearingY = cbox.yMax;
-
+
/* copy the _unscaled_ advance width */
metrics->horiAdvance = decoder.builder.advance.x;
-
+
/* make up vertical metrics */
metrics->vertBearingX = 0;
metrics->vertBearingY = 0;
metrics->vertAdvance = 0;
-
+
glyph->root.format = ft_glyph_format_outline;
-
+
glyph->root.outline.flags &= ft_outline_owner;
-
+
if ( size->root.metrics.y_ppem < 24 )
glyph->root.outline.flags |= ft_outline_high_precision;
glyph->root.outline.flags |= ft_outline_reverse_fill;
-
+
/*
glyph->root.outline.second_pass = TRUE;
glyph->root.outline.high_precision = ( size->root.metrics.y_ppem < 24 );
glyph->root.outline.dropout_mode = 2;
*/
-
+
if ( hinting )
{
/* adjust the advance width */
@@ -1620,30 +1620,30 @@
T1_Vector* vec = cur->points;
T1_Fixed x_scale = glyph->x_scale;
T1_Fixed y_scale = glyph->y_scale;
-
+
/* First of all, scale the points */
for ( n = cur->n_points; n > 0; n--, vec++ )
{
vec->x = FT_MulFix( vec->x, x_scale );
vec->y = FT_MulFix( vec->y, y_scale );
}
-
+
/* Then scale the metrics */
metrics->width = FT_MulFix( metrics->width, x_scale );
metrics->height = FT_MulFix( metrics->height, y_scale );
-
+
metrics->horiBearingX = FT_MulFix( metrics->horiBearingX, x_scale );
metrics->horiBearingY = FT_MulFix( metrics->horiBearingY, y_scale );
metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );
-
+
metrics->vertBearingX = FT_MulFix( metrics->vertBearingX, x_scale );
metrics->vertBearingY = FT_MulFix( metrics->vertBearingY, y_scale );
metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, x_scale );
-
+
}
}
}
-
+
return error;
}
diff --git a/src/type1/t1gload.h b/src/type1/t1gload.h
index 53d1d53..37a9aad 100644
--- a/src/type1/t1gload.h
+++ b/src/type1/t1gload.h
@@ -181,7 +181,7 @@
/* a structure used to store the address of various functions */
/* used by a Type 1 hinter to perform outline hinting. */
/* */
-
+
typedef T1_Error (*T1_Hinter_ChangeHints)( T1_Builder* builder );
typedef T1_Error (*T1_Hinter_DotSection)( T1_Builder* builder );
diff --git a/src/type1/t1hinter.c b/src/type1/t1hinter.c
index f9d5db9..d7dd894 100644
--- a/src/type1/t1hinter.c
+++ b/src/type1/t1hinter.c
@@ -2,7 +2,7 @@
*
* t1hinter.c 1.2
*
- * Type1 hinter.
+ * Type1 hinter.
*
* Copyright 1996-1999 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
@@ -66,7 +66,7 @@
* 1. It extracts the bottom and top blue zones from the
* face object.
*
- * 2. Each zone is then grown by BlueFuzz, overlapping
+ * 2. Each zone is then grown by BlueFuzz, overlapping
* is eliminated by adjusting the zone edges appropriately
*
* 3. For each zone, we keep its original font units position, its
@@ -83,7 +83,7 @@
{
T1_Int i, swap;
T1_Int* cur;
-
+
for ( i = 2; i < count; i += 2 )
{
cur = blues + i;
@@ -91,7 +91,7 @@
{
if ( cur[-1] < cur[0] )
break;
-
+
swap = cur[-2]; cur[-2] = cur[0]; cur[0] = swap;
swap = cur[-1]; cur[-1] = cur[1]; cur[1] = swap;
cur -= 2;
@@ -210,27 +210,27 @@
}
}
-
+
/* Compare the current pixel size with the BlueScale value */
/* to know wether to supress overshoots.. */
-
- hints->supress_overshoots =
+
+ hints->supress_overshoots =
( size->root.metrics.y_ppem < FT_MulFix(1000,priv->blue_scale) );
/* Now print the new blue values in tracing mode */
#ifdef FT_DEBUG_LEVEL_TRACE
-
+
FT_TRACE2(( "Blue Zones for size object at $%08lx :\n", (long)size ));
FT_TRACE2(( " orus pix min max\n" ));
FT_TRACE2(( "-------------------------------\n" ));
-
+
zone = hints->blue_zones;
for ( n = 0; n < hints->num_blue_zones; n++ )
{
FT_TRACE2(( " %3d %.2f %.2f %.2f\n",
- zone->orus,
+ zone->orus,
zone->pix/64.0,
- zone->min/64.0,
+ zone->min/64.0,
zone->max/64.0 ));
zone++;
}
@@ -238,7 +238,7 @@
hints->supress_overshoots ? "supressed" : "active" ));
#endif /* DEBUG_LEVEL_TRACE */
-
+
return T1_Err_Ok;
}
@@ -262,7 +262,7 @@
* This function performs the following :
*
* 1. It reads and scales the stem snap widths from the parent face
- *
+ *
* 2. A "snap zone" is computed for each snap width, by "growing"
* it with a threshold of a 1/2 pixel. Overlapping is avoided
* through proper edge adjustment.
@@ -296,7 +296,7 @@
base_zone = hints->snap_widths;
orgs = priv->stem_snap_widths;
scale = size->root.metrics.x_scale;
-
+
while (direction < 2)
{
/*****************************************************************/
@@ -305,7 +305,7 @@
/* font record. */
/* */
T1_Pos prev, orus, pix, min, max, threshold;
-
+
threshold = ONE_PIXEL/4;
zone = base_zone;
@@ -347,14 +347,14 @@
/* print the scaled stem snap values in tracing modes */
#ifdef FT_DEBUG_LEVEL_TRACE
-
- FT_TRACE2(( "Set_Snap_Zones : first %s pass\n",
+
+ FT_TRACE2(( "Set_Snap_Zones : first %s pass\n",
direction ? "vertical" : "horizontal" ));
-
+
FT_TRACE2(( "Scaled original stem snap zones :\n" ));
FT_TRACE2(( " orus pix min max\n" ));
FT_TRACE2(( "-----------------------------\n" ));
-
+
zone = base_zone;
for ( n = 0; n < n_zones; n++, zone++ )
FT_TRACE2(( " %3d %.2f %.2f %.2f\n",
@@ -363,7 +363,7 @@
zone->min/64.0,
zone->max/64.0 ));
FT_TRACE2(( "\n" ));
-
+
FT_TRACE2(( "Standard width = %d\n", standard_width ));
#endif
@@ -378,7 +378,7 @@
T1_Snap_Zone* parent;
T1_Pos std_pix, std_min, std_max;
- std_pix = SCALE( standard_width );
+ std_pix = SCALE( standard_width );
std_min = std_pix-threshold;
std_max = std_pix+threshold;
@@ -402,29 +402,29 @@
}
zone++;
}
-
+
/**********************************************/
/* Now, insert the standard width zone */
-
+
zone = base_zone+num_zones;
while ( zone > base_zone && zone[-1].pix > std_max )
{
zone[0] = zone[-1];
zone --;
}
-
+
/* check border zones */
if ( zone > base_zone && zone[-1].max > std_min )
zone[-1].max = std_min;
-
+
if ( zone < base_zone+num_zones && zone[1].min < std_max )
zone[1].min = std_max;
-
+
zone->orus = standard_width;
zone->pix = std_pix;
zone->min = std_min;
zone->max = std_max;
-
+
num_zones++;
}
else
@@ -436,14 +436,14 @@
/* print the scaled stem snap values in tracing modes */
#ifdef FT_DEBUG_LEVEL_TRACE
-
- FT_TRACE2(( "Set_Snap_Zones : second %s pass\n",
+
+ FT_TRACE2(( "Set_Snap_Zones : second %s pass\n",
direction ? "vertical" : "horizontal" ));
-
+
FT_TRACE2(( "Scaled clipped stem snap zones :\n" ));
FT_TRACE2(( " orus pix min max\n" ));
FT_TRACE2(( "-----------------------------\n" ));
-
+
zone = base_zone;
for ( n = 0; n < num_zones; n++, zone++ )
FT_TRACE2(( " %3d %.2f %.2f %.2f\n",
@@ -452,10 +452,10 @@
zone->min/64.0,
zone->max/64.0 ));
FT_TRACE2(( "\n" ));
-
+
FT_TRACE2(( "Standard width = %d\n", standard_width ));
#endif
-
+
/* continue with vertical snap zone */
direction++;
standard_width = priv->standard_height;
@@ -467,7 +467,7 @@
return T1_Err_Ok;
}
-
+
/************************************************************************
*
@@ -489,7 +489,7 @@
T1_Error T1_New_Size_Hinter( T1_Size size )
{
FT_Memory memory = size->root.face->memory;
-
+
return MEM_Alloc( size->hints, sizeof(*size->hints) );
}
@@ -562,7 +562,7 @@
T1_Error T1_New_Glyph_Hinter( T1_GlyphSlot glyph )
{
FT_Memory memory = glyph->root.face->memory;
-
+
return MEM_Alloc( glyph->hints, sizeof(*glyph->hints) );
}
@@ -846,7 +846,7 @@
* table :: the horizontal stem hints table
* hints :: the current size's hint structure
* blueShift :: the value of the /BlueShift as taken from the
- * face object.
+ * face object.
* scale :: the 16.16 scale used to convert outline
* units to 26.6 pixels
*
@@ -895,7 +895,7 @@
for ( ; zone < zone_limit; zone++ )
{
T1_Pos dist;
-
+
dist = width_pix - zone->min; if (dist < 0) dist = -dist;
if (dist < best_dist)
{
@@ -903,7 +903,7 @@
best_dist = dist;
}
}
-
+
if (best_zone)
{
if (width_pix > best_zone->pix)
@@ -948,7 +948,7 @@
if (!hints->supress_overshoots)
{
T1_Pos delta = blue->pix - bottom_pix;
-
+
delta = ( delta < blueShift ? 0 : ROUND( delta ) );
bottom -= delta;
}
@@ -960,7 +960,7 @@
/******************************************************************/
/* Check for top blue zones alignement */
{
- T1_Int num_blues = hints->num_blue_zones -
+ T1_Int num_blues = hints->num_blue_zones -
hints->num_bottom_zones;
T1_Snap_Zone* blue = hints->blue_zones +
@@ -982,7 +982,7 @@
if (!hints->supress_overshoots)
{
T1_Pos delta = top - blue->pix;
-
+
delta = ( delta < blueShift ? 0 : ROUND( delta ) );
top += delta;
}
@@ -999,27 +999,27 @@
bottom_pix = bottom;
top_pix = bottom + width_pix;
break;
-
+
case T1_ALIGN_TOP: /* top zone alignement */
top_pix = top;
bottom_pix = top - width_pix;
-
+
break;
-
+
case T1_ALIGN_BOTH: /* bottom+top zone alignement */
bottom_pix = bottom;
top_pix = top;
break;
-
+
default: /* no alignement */
- /* XXXX : TODO : Add management of controlled stems */
+ /* XXXX : TODO : Add management of controlled stems */
bottom = ( SCALE(bottom_orus+top_orus) - width_pix )/2;
-
+
bottom_pix = ROUND(bottom);
top_pix = bottom_pix + width_pix;
}
-
+
stem->min_edge.pix = bottom_pix;
stem->max_edge.pix = top_pix;
}
@@ -1079,7 +1079,7 @@
for ( ; zone < zone_limit; zone++ )
{
T1_Pos dist;
-
+
dist = width_pix - zone->min; if (dist < 0) dist = -dist;
if (dist < best_dist)
{
@@ -1087,7 +1087,7 @@
best_dist = dist;
}
}
-
+
if (best_zone)
{
if (width_pix > best_zone->pix)
@@ -1104,7 +1104,7 @@
}
}
}
-
+
/* round width - minimum 1 pixel if this isn't a ghost stem */
if ( width_pix > 0 )
width_pix = ( width_pix < ONE_PIXEL ? ONE_PIXEL :
@@ -1227,7 +1227,7 @@
*
* <Description>
* this function grid-fits several points in a given Type 1 builder
- * at once.
+ * at once.
*
* <Input>
* builder :: handle to target Type 1 builder
diff --git a/src/type1/t1hinter.h b/src/type1/t1hinter.h
index 4bf753a..b5c9327 100644
--- a/src/type1/t1hinter.h
+++ b/src/type1/t1hinter.h
@@ -2,7 +2,7 @@
*
* t1hinter.h 1.2
*
- * Type1 hinter.
+ * Type1 hinter.
*
* Copyright 1996-1999 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
@@ -56,10 +56,10 @@
typedef struct T1_Snap_Zone_
{
T1_Pos orus;
- T1_Pos pix;
- T1_Pos min;
- T1_Pos max;
-
+ T1_Pos pix;
+ T1_Pos min;
+ T1_Pos max;
+
} T1_Snap_Zone;
@@ -80,8 +80,8 @@
typedef struct T1_Edge_
{
T1_Pos orus;
- T1_Pos pix;
-
+ T1_Pos pix;
+
} T1_Edge;
@@ -209,7 +209,7 @@
*
* <Description>
* A structure used to model the stem hints of a given glyph outline
- * during glyph loading.
+ * during glyph loading.
*
* <Fields>
* hori_stems :: horizontal stem hints table
@@ -344,7 +344,7 @@
*
* <Description>
* this function grid-fits several points in a given Type 1 builder
- * at once.
+ * at once.
*
* <Input>
* builder :: handle to target Type 1 builder
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index f59f226..f8df353 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1131,7 +1131,7 @@
error = Expect_Dict_Arguments( parser, 1, tok_error,
dict_font, 0 );
if (error) goto Exit;
-
+
/* clear stack from all the previous content. This */
/* could be some stupid Postscript code ... */
parser->top = parser->stack;
@@ -1384,7 +1384,7 @@
/* syntax, we never escape from the private dictionary */
if (dict_state != dict_private)
parser->state_index--;
-
+
/* many fonts use a NP instead of def or put, so */
/* we simply ignore the nest token.. */
#if 0
diff --git a/src/type1/t1load.h b/src/type1/t1load.h
index 673316a..8cd5c80 100644
--- a/src/type1/t1load.h
+++ b/src/type1/t1load.h
@@ -2,7 +2,7 @@
*
* t1load.h 1.0
*
- * Type1 Loader.
+ * Type1 Loader.
*
* Copyright 1996-1998 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 2546896..b272a97 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -2,7 +2,7 @@
*
* t1objs.c 1.0
*
- * Type1 Objects manager.
+ * Type1 Objects manager.
*
* Copyright 1996-1998 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
@@ -88,9 +88,9 @@
T1_Error T1_Init_Size( T1_Size size )
{
T1_Error error;
-
+
size->valid = 0;
-
+
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER
error = T1_New_Size_Hinter( size );
return error;
@@ -117,7 +117,7 @@
* Error code.
*
******************************************************************/
-
+
LOCAL_FUNC
T1_Error T1_Reset_Size( T1_Size size )
{
@@ -148,7 +148,7 @@
* face :: typeless pointer to the face object to destroy
*
* <Return>
- * Error code.
+ * Error code.
*
******************************************************************/
@@ -161,11 +161,11 @@
if (face)
{
memory = face->root.memory;
-
- /* release font info strings */
+
+ /* release font info strings */
{
T1_FontInfo* info = &type1->font_info;
-
+
FREE( info->version );
FREE( info->notice );
FREE( info->full_name );
@@ -173,21 +173,21 @@
FREE( info->weight );
}
- /* release top dictionary */
+ /* release top dictionary */
FREE( type1->charstrings_len );
FREE( type1->charstrings );
FREE( type1->glyph_names );
FREE( type1->subrs );
FREE( type1->subrs_len );
-
+
FREE( type1->subrs_block );
FREE( type1->charstrings_block );
FREE( type1->glyph_names_block );
FREE( type1->encoding.char_index );
FREE( type1->font_name );
-
+
#ifndef T1_CONFIG_OPTION_NO_AFM
/* release afm data if present */
if ( face->afm_data)
@@ -242,7 +242,7 @@
{
/* look-up the PSNames driver */
FT_Driver psnames_driver;
-
+
psnames_driver = FT_Get_Driver( face->root.driver->library, "psnames" );
if (psnames_driver)
face->psnames = (PSNames_Interface*)
@@ -278,15 +278,15 @@
{
FT_Face root = (FT_Face)&face->root;
T1_Font* type1 = &face->type1;
-
+
root->num_glyphs = type1->num_glyphs;
root->num_charmaps = 1;
-
+
root->face_index = face_index;
root->face_flags = FT_FACE_FLAG_SCALABLE;
-
+
root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
-
+
if ( type1->font_info.is_fixed_pitch )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
@@ -299,13 +299,13 @@
{
char* full = type1->font_info.full_name;
char* family = root->family_name;
-
+
while ( *family && *full == *family )
{
family++;
full++;
}
-
+
root->style_name = ( *full == ' ' ? full+1 : "Regular" );
}
else
@@ -317,17 +317,17 @@
root->style_name = "Regular";
}
}
-
+
/* no embedded bitmap support */
root->num_fixed_sizes = 0;
root->available_sizes = 0;
-
+
root->bbox = type1->font_bbox;
root->units_per_EM = 1000;
root->ascender = (T1_Short)type1->font_bbox.yMax;
root->descender = -(T1_Short)type1->font_bbox.yMin;
root->height = ((root->ascender + root->descender)*12)/10;
-
+
/* now compute the maximum advance width */
root->max_advance_width = type1->private_dict.standard_width;
@@ -347,10 +347,10 @@
}
root->max_advance_height = root->height;
-
+
root->underline_position = type1->font_info.underline_position;
root->underline_thickness = type1->font_info.underline_thickness;
-
+
root->max_points = 0;
root->max_contours = 0;
}
@@ -381,7 +381,7 @@
charmap->encoding_id = 1;
charmap++;
}
-
+
/* simply clear the error in case of failure (which really) */
/* means that out of memory or no unicode glyph names */
error = 0;
@@ -391,25 +391,25 @@
/* now, support either the standard, expert, or custom encodings */
charmap->face = (FT_Face)face;
charmap->platform_id = 7; /* a new platform id for Adobe fonts ?? */
-
+
switch (face->type1.encoding_type)
{
case t1_encoding_standard:
charmap->encoding = ft_encoding_adobe_standard;
charmap->encoding_id = 0;
break;
-
+
case t1_encoding_expert:
charmap->encoding = ft_encoding_adobe_expert;
charmap->encoding_id = 1;
break;
-
+
default:
charmap->encoding = ft_encoding_adobe_custom;
charmap->encoding_id = 2;
break;
}
-
+
root->charmaps = face->charmaps;
root->num_charmaps = charmap - face->charmaprecs + 1;
face->charmaps[0] = &face->charmaprecs[0];
@@ -432,7 +432,7 @@
*
* Input : _glyph typeless pointer to the glyph record to destroy
*
- * Output : Error code.
+ * Output : Error code.
*
******************************************************************/
@@ -459,7 +459,7 @@
* Description : The glyph object constructor.
*
* Input : glyph glyph record to build.
- * face the glyph's parent face.
+ * face the glyph's parent face.
*
* Output : Error code.
*
diff --git a/src/type1/t1objs.h b/src/type1/t1objs.h
index 53fe3db..dd4220f 100644
--- a/src/type1/t1objs.h
+++ b/src/type1/t1objs.h
@@ -2,7 +2,7 @@
*
* t1objs.h 1.0
*
- * Type1 objects definition.
+ * Type1 objects definition.
*
* Copyright 1996-1999 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
@@ -83,7 +83,7 @@
/* NOW BEGINS THE TYPE1 SPECIFIC STUFF .............................. */
/* */
/**************************************************************************/
-
+
/***************************************************/
/* */
@@ -91,7 +91,7 @@
/* */
/* Type 1 size record.. */
/* */
-
+
typedef struct T1_SizeRec_
{
FT_SizeRec root;
@@ -110,14 +110,14 @@
/* */
/* TrueDoc glyph record.. */
/* */
-
+
typedef struct T1_GlyphSlotRec_
{
FT_GlyphSlotRec root;
T1_Bool hint;
T1_Bool scaled;
-
+
T1_Int max_points;
T1_Int max_contours;
@@ -251,7 +251,7 @@
*
* <Input> glyph :: handle to glyph slot object
*
- * <Output> Error code.
+ * <Output> Error code.
*
******************************************************************/
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index d897d74..9a71f99 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -157,16 +157,16 @@
old_base = table->block;
if (!old_base)
return;
-
+
(void)REALLOC( table->block, table->capacity, table->cursor );
table->capacity = table->cursor;
-
+
if (old_base != table->block)
{
T1_Long delta = table->block - old_base;
T1_Byte** element = table->elements;
T1_Byte** limit = element + table->max_elems;
-
+
for ( ; element < limit; element++ )
if (element[0])
element[0] += delta;
diff --git a/src/type1/t1tokens.c b/src/type1/t1tokens.c
index 6f2f58e..53e5a9e 100644
--- a/src/type1/t1tokens.c
+++ b/src/type1/t1tokens.c
@@ -170,7 +170,7 @@
FT_TRACE2(( "Growing tokenizer buffer by %d bytes\n", left_bytes ));
- if ( !REALLOC( tokzer->base, tokzer->limit,
+ if ( !REALLOC( tokzer->base, tokzer->limit,
tokzer->limit + left_bytes ) &&
!FILE_Read( tokzer->base + tokzer->limit, left_bytes ) )
tokzer->limit += left_bytes;
@@ -309,13 +309,13 @@
tokzer->cursor = 0;
*tokenizer = tokzer;
-
+
/* Now check font format, we must see a '%!PS-AdobeFont-1' */
/* or a '%!FontType' */
{
if ( 16 > tokzer->limit )
grow( tokzer );
-
+
if ( tokzer->limit <= 16 ||
( strncmp( (const char*)tokzer->base, "%!PS-AdobeFont-1", 16 ) &&
strncmp( (const char*)tokzer->base, "%!FontType", 10 ) ) )
@@ -817,7 +817,7 @@
case '(':
case '<':
case '/':
- goto Any_Token;
+ goto Any_Token;
case ' ':
case '\r':
@@ -842,7 +842,7 @@
case '+':
if (token_started)
goto Next;
-
+
token_started = 1;
tok->token.start = cur-1;
for (;;)
diff --git a/src/type1z/t1afm.c b/src/type1z/t1afm.c
index b9f8d83..56eb84a 100644
--- a/src/type1z/t1afm.c
+++ b/src/type1z/t1afm.c
@@ -34,27 +34,27 @@
FT_UInt result = 0;
char temp[64];
- /* skip whitespace */
+ /* skip whitespace */
while ( (*p == ' ' || *p == '\t' || *p == ':' || *p == ';') && p < limit )
p++;
*start = p;
-
+
/* now, read glyph name */
while ( IS_ALPHANUM(*p) && p < limit ) p++;
len = p - *start;
if (len > 0 && len < 64)
{
FT_Int n;
-
+
/* copy glyph name to intermediate array */
MEM_Copy( temp, *start, len );
temp[len] = 0;
-
+
/* lookup glyph name in face array */
for ( n = 0; n < type1->num_glyphs; n++ )
{
char* gname = (char*)type1->glyph_names[n];
-
+
if ( gname && gname[0] == temp[0] && strcmp(gname,temp) == 0 )
{
result = n;
@@ -74,17 +74,17 @@
FT_Byte* p = *start;
int sum = 0;
int sign = 1;
-
+
/* skip everything that is not a number */
while ( p < limit && (*p < '0' || *p > '9') )
{
sign = 1;
if (*p == '-')
sign = -1;
-
+
p++;
}
-
+
while ( p < limit && (*p >= '0' && *p < '9') )
{
sum = sum*10 + (*p - '0');
@@ -104,10 +104,10 @@
{
T1_Kern_Pair* pair1 = (T1_Kern_Pair*)a;
T1_Kern_Pair* pair2 = (T1_Kern_Pair*)b;
-
+
T1_ULong index1 = KERN_INDEX(pair1->glyph1,pair1->glyph2);
T1_ULong index2 = KERN_INDEX(pair2->glyph1,pair2->glyph2);
-
+
return ( index1 < index2 ? -1 :
( index1 > index2 ? 1 : 0 ));
}
@@ -127,14 +127,14 @@
T1_Kern_Pair* pair;
T1_Font* type1 = &((T1_Face)t1_face)->type1;
T1_AFM* afm = 0;
-
+
if ( ACCESS_Frame(stream->size) )
return error;
-
+
start = (FT_Byte*)stream->cursor;
limit = (FT_Byte*)stream->limit;
p = start;
-
+
/* we are now going to count the occurences of "KP" or "KPX" in */
/* the AFM file.. */
count = 0;
@@ -147,16 +147,16 @@
/* Actually, kerning pairs are simply optional !! */
if (count == 0)
goto Exit;
-
+
/* allocate the pairs */
if ( ALLOC( afm, sizeof(*afm ) ) ||
ALLOC_ARRAY( afm->kern_pairs, count, T1_Kern_Pair ) )
goto Exit;
-
+
/* now, read each kern pair */
pair = afm->kern_pairs;
afm->num_pairs = count;
-
+
/* save in face object */
((T1_Face)t1_face)->afm_data = afm;
@@ -165,26 +165,26 @@
if ( IS_KERN_PAIR(p) )
{
FT_Byte* q;
-
+
/* skip keyword (KP or KPX) */
q = p+2;
if (*q == 'X') q++;
-
+
pair->glyph1 = afm_atoindex( &q, limit, type1 );
pair->glyph2 = afm_atoindex( &q, limit, type1 );
pair->kerning.x = afm_atoi( &q, limit );
-
+
pair->kerning.y = 0;
if ( p[2] != 'X' )
pair->kerning.y = afm_atoi( &q, limit );
-
+
pair++;
}
}
-
+
/* now, sort the kern pairs according to their glyph indices */
qsort( afm->kern_pairs, count, sizeof(T1_Kern_Pair), compare_kern_pairs );
-
+
Exit:
if (error)
FREE( afm );
@@ -194,7 +194,7 @@
}
- /* find the kerning for a given glyph pair */
+ /* find the kerning for a given glyph pair */
LOCAL_FUNC
void T1_Get_Kerning( T1_AFM* afm,
FT_UInt glyph1,
@@ -203,23 +203,23 @@
{
T1_Kern_Pair *min, *mid, *max;
T1_ULong index = KERN_INDEX(glyph1,glyph2);
-
+
/* simple binary search */
min = afm->kern_pairs;
max = min + afm->num_pairs-1;
-
+
while (min <= max)
{
T1_ULong midi;
-
+
mid = min + (max-min)/2;
- midi = KERN_INDEX(mid->glyph1,mid->glyph2);
+ midi = KERN_INDEX(mid->glyph1,mid->glyph2);
if ( midi == index )
{
*kerning = mid->kerning;
return;
}
-
+
if ( midi < index ) min = mid+1;
else max = mid-1;
}
diff --git a/src/type1z/t1afm.h b/src/type1z/t1afm.h
index 61e18b8..984ae94 100644
--- a/src/type1z/t1afm.h
+++ b/src/type1z/t1afm.h
@@ -18,7 +18,7 @@ typedef struct T1_Kern_Pair_
FT_UInt glyph1;
FT_UInt glyph2;
FT_Vector kerning;
-
+
} T1_Kern_Pair;
diff --git a/src/type1z/t1driver.c b/src/type1z/t1driver.c
index 7479fab..c6dba1a 100644
--- a/src/type1z/t1driver.c
+++ b/src/type1z/t1driver.c
@@ -9,7 +9,7 @@
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
@@ -59,10 +59,10 @@
const FT_String* interface )
{
UNUSED(driver);
-
+
if ( strcmp( (const char*)interface, "attach_file" ) == 0 )
return (FTDriver_Interface)T1_Read_AFM;
-
+
return 0;
}
@@ -107,7 +107,7 @@
T1_Vector* kerning )
{
T1_AFM* afm;
-
+
kerning->x = 0;
kerning->y = 0;
@@ -185,7 +185,7 @@
UNUSED(pixel_width);
UNUSED(pixel_height);
- size->valid = FALSE;
+ size->valid = FALSE;
return T1_Reset_Size(size);
}
@@ -214,7 +214,7 @@
face = (T1_Face)charmap->face;
psnames = (PSNames_Interface*)face->psnames;
- if (psnames)
+ if (psnames)
switch (charmap->encoding)
{
/********************************************************************/
@@ -233,7 +233,7 @@
result = 0;
goto Exit;
}
-
+
/********************************************************************/
/* */
/* Custom Type 1 encoding */
@@ -248,7 +248,7 @@
}
goto Exit;
}
-
+
/********************************************************************/
/* */
/* Adobe Standard & Expert encoding support */
@@ -259,18 +259,18 @@
FT_UInt code;
FT_Int n;
const char* glyph_name;
-
+
code = psnames->adobe_std_encoding[charcode];
if (charmap->encoding == ft_encoding_adobe_expert)
code = psnames->adobe_expert_encoding[charcode];
-
+
glyph_name = psnames->adobe_std_strings(code);
if (!glyph_name) break;
-
+
for ( n = 0; n < face->type1.num_glyphs; n++ )
{
const char* gname = face->type1.glyph_names[n];
-
+
if ( gname && gname[0] == glyph_name[0] &&
strcmp( gname, glyph_name ) == 0 )
{
@@ -280,7 +280,7 @@
}
}
}
- Exit:
+ Exit:
return result;
}
@@ -365,7 +365,7 @@
sizeof( T1_FaceRec ),
sizeof( T1_SizeRec ),
sizeof( T1_GlyphSlotRec ),
-
+
"type1",
100,
200,
@@ -384,7 +384,7 @@
(FTDriver_initFace) T1_Init_Face,
(FTDriver_doneFace) T1_Done_Face,
-#ifdef T1_CONFIG_OPTION_NO_AFM
+#ifdef T1_CONFIG_OPTION_NO_AFM
(FTDriver_getKerning) 0,
#else
(FTDriver_getKerning) Get_Kerning,
@@ -424,12 +424,12 @@
/* */
#ifdef FT_CONFIG_OPTION_DYNAMIC_DRIVERS
-
+
EXPORT_FUNC(FT_DriverInterface*) getDriverInterface( void )
{
return &t1_driver_interface;
}
-
+
#endif /* FT_CONFIG_OPTION_DYNAMIC_DRIVERS */
diff --git a/src/type1z/t1driver.h b/src/type1z/t1driver.h
index ec43946..76f244a 100644
--- a/src/type1z/t1driver.h
+++ b/src/type1z/t1driver.h
@@ -9,7 +9,7 @@
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
+ * license, LICENSE.TXT. By continuing to use, modify, or distribute
* this file you indicate that you have read the license and
* understand and accept it fully.
*
diff --git a/src/type1z/t1errors.h b/src/type1z/t1errors.h
index 93731c1..a799115 100644
--- a/src/type1z/t1errors.h
+++ b/src/type1z/t1errors.h
@@ -32,7 +32,7 @@
#define T1_Err_Ok FT_Err_Ok
/* ----------- high level API errors -------- */
-
+
#define T1_Err_Invalid_File_Format FT_Err_Invalid_File_Format
#define T1_Err_Invalid_Argument FT_Err_Invalid_Argument
#define T1_Err_Invalid_Driver_Handle FT_Err_Invalid_Driver_Handle
@@ -51,7 +51,7 @@
#define T1_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle
/* ------------- internal errors ------------ */
-
+
#define T1_Err_Out_Of_Memory FT_Err_Out_Of_Memory
#define T1_Err_Unlisted_Object FT_Err_Unlisted_Object
diff --git a/src/type1z/t1gload.c b/src/type1z/t1gload.c
index 51d3f44..71a7173 100644
--- a/src/type1z/t1gload.c
+++ b/src/type1z/t1gload.c
@@ -55,7 +55,7 @@
} T1_Operator;
- static const T1_Int t1_args_count[ op_max ] =
+ static const T1_Int t1_args_count[ op_max ] =
{
0, /* none */
0, /* endchar */
@@ -223,7 +223,7 @@
return T1_Err_Ok;
count += base->n_points + outline->n_points;
-
+
/* realloc points table if necessary */
if ( count >= builder->max_points )
{
@@ -237,14 +237,14 @@
if ( REALLOC_ARRAY( base->points, current,
builder->max_points, T1_Vector ) ||
-
+
REALLOC_ARRAY( base->tags, current,
builder->max_points, T1_Byte ) )
{
builder->error = error;
return error;
}
-
+
outline->points = base->points + increment;
outline->tags = base->tags + increment;
}
@@ -265,17 +265,17 @@
{
FT_Vector* point = outline->points + outline->n_points;
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
-
+
point->x = x;
point->y = y;
*control = ( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
-
+
builder->last = *point;
}
-
+
outline->n_points++;
}
-
+
/* check room for a new on-curve point, then add it */
static
@@ -284,7 +284,7 @@
FT_Pos y )
{
T1_Error error;
-
+
error = check_points(builder,1);
if (!error)
add_point( builder, x, y, 1 );
@@ -305,7 +305,7 @@
outline->n_contours++;
return T1_Err_Ok;
}
-
+
/* realloc contours array if necessary */
if ( base->n_contours + outline->n_contours >= builder->max_contours &&
builder->load_points )
@@ -323,7 +323,7 @@
builder->error = error;
return error;
}
-
+
outline->contours = base->contours + increment;
}
@@ -344,7 +344,7 @@
if (!builder->path_begun)
{
T1_Error error;
-
+
builder->path_begun = 1;
error = add_contour( builder );
if (error) return error;
@@ -374,7 +374,7 @@
* to implement the SEAC Type 1 operator.
*
* <Input>
- * face :: current face object
+ * face :: current face object
* charcode :: charcode to look for
*
* <Return>
@@ -390,18 +390,18 @@
T1_Int n;
const T1_String* glyph_name;
PSNames_Interface* psnames = (PSNames_Interface*)face->psnames;
-
+
/* check range of standard char code */
if (charcode < 0 || charcode > 255)
return -1;
-
+
glyph_name = psnames->adobe_std_strings(
psnames->adobe_std_encoding[charcode]);
-
+
for ( n = 0; n < face->type1.num_glyphs; n++ )
{
T1_String* name = (T1_String*)face->type1.glyph_names[n];
-
+
if ( name && strcmp(name,glyph_name) == 0 )
return n;
}
@@ -428,7 +428,7 @@
* achar :: accent character's StandardEncoding charcode
*
* <Return>
- * Error code. 0 means success.
+ * Error code. 0 means success.
*
*********************************************************************/
@@ -447,10 +447,10 @@
FT_Outline* base = &decoder->builder.base;
T1_Vector left_bearing, advance;
T1_Font* type1 = &face->type1;
-
+
bchar_index = lookup_glyph_by_stdcharcode( face, bchar );
achar_index = lookup_glyph_by_stdcharcode( face, achar );
-
+
if (bchar_index < 0 || achar_index < 0)
{
FT_ERROR(( "T1.Parse_Seac : invalid seac character code arguments\n" ));
@@ -482,20 +482,20 @@
FT_GlyphSlot glyph = (FT_GlyphSlot)decoder->builder.glyph;
FT_SubGlyph* subg;
- /* reallocate subglyph array if necessary */
+ /* reallocate subglyph array if necessary */
if (glyph->max_subglyphs < 2)
{
FT_Memory memory = decoder->builder.face->root.memory;
-
+
if ( REALLOC_ARRAY( glyph->subglyphs, glyph->max_subglyphs,
2, FT_SubGlyph ) )
return error;
-
+
glyph->max_subglyphs = 2;
}
subg = glyph->subglyphs;
-
+
/* subglyph 0 = base character */
subg->index = bchar_index;
subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES |
@@ -503,7 +503,7 @@
subg->arg1 = 0;
subg->arg2 = 0;
subg++;
-
+
/* subglyph 1 = accent character */
subg->index = achar_index;
subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;
@@ -520,19 +520,19 @@
/* as they will be erase by the next load.. */
left_bearing = decoder->builder.left_bearing;
advance = decoder->builder.advance;
-
+
decoder->builder.left_bearing.x = 0;
- decoder->builder.left_bearing.y = 0;
-
+ decoder->builder.left_bearing.y = 0;
+
/* Now load "achar" on top of */
/* the base outline */
- /* */
+ /* */
cur->n_points = 0;
cur->n_contours = 0;
cur->points = base->points + base->n_points;
cur->tags = base->tags + base->n_points;
cur->contours = base->contours + base->n_contours;
-
+
error = T1_Parse_CharStrings( decoder,
type1->charstrings [achar_index],
type1->charstrings_len[achar_index],
@@ -540,21 +540,21 @@
type1->subrs,
type1->subrs_len );
if (error) return error;
-
+
/* adjust contours in accented character outline */
if (decoder->builder.load_points)
{
T1_Int n;
-
+
for ( n = 0; n < cur->n_contours; n++ )
cur->contours[n] += n_base_points;
}
-
+
/* restore the left side bearing and */
/* advance width of the base character */
decoder->builder.left_bearing = left_bearing;
decoder->builder.advance = advance;
-
+
/* Finally, move the accent */
if (decoder->builder.load_points)
FT_Outline_Translate( cur, adx - asb, ady );
@@ -580,7 +580,7 @@
* subrs_len :: array of sub-routines lengths
*
* <Return>
- * Error code. 0 means success.
+ * Error code. 0 means success.
*
*********************************************************************/
@@ -615,7 +615,7 @@
error = T1_Err_Ok;
outline = &builder->current;
-
+
x = builder->pos_x;
y = builder->pos_y;
@@ -749,27 +749,27 @@
FT_TRACE4(( " callothersubr" ));
if ( top - decoder->stack < 2 )
goto Stack_Underflow;
-
+
top -= 2;
switch ( top[1] )
{
case 1: /* start flex feature ---------------------- */
{
if ( top[0] != 0 ) goto Unexpected_OtherSubr;
-
+
decoder->flex_state = 1;
decoder->num_flex_vectors = 0;
if ( start_point(builder, x, y) ||
check_points(builder,6) ) goto Memory_Error;
}
break;
-
+
case 2: /* add flex vectors ------------------------ */
{
T1_Int index;
-
+
if ( top[0] != 0 ) goto Unexpected_OtherSubr;
-
+
/* note that we should not add a point for index 0 */
/* this will move our current position to the flex */
/* point without adding any point to the outline */
@@ -781,18 +781,18 @@
(T1_Byte)( index==3 || index==6 ) );
}
break;
-
+
case 0: /* end flex feature ------------------------- */
{
if ( top[0] != 3 ) goto Unexpected_OtherSubr;
-
+
if ( decoder->flex_state == 0 ||
decoder->num_flex_vectors != 7 )
{
FT_ERROR(( "T1.Parse_CharStrings: unexpected flex end\n" ));
goto Syntax_Error;
}
-
+
/* now consume the remaining "pop pop setcurpoint" */
if ( ip+6 > limit ||
ip[0] != 12 || ip[1] != 17 || /* pop */
@@ -802,16 +802,16 @@
FT_ERROR(( "T1.Parse_CharStrings: invalid flex charstring\n" ));
goto Syntax_Error;
}
-
+
ip += 6;
decoder->flex_state = 0;
break;
}
-
+
case 3: /* change hints ---------------------------- */
{
if ( top[0] != 1 ) goto Unexpected_OtherSubr;
-
+
/* eat the following "pop" */
if (ip+2 > limit)
{
@@ -819,7 +819,7 @@
ip[-1] ));
goto Syntax_Error;
}
-
+
if (ip[0] != 12 || ip[1] != 17)
{
FT_ERROR(( "T1.Parse_CharStrings: 'pop' expected, found (%d %d)\n",
@@ -829,7 +829,7 @@
ip += 2;
break;;
}
-
+
default:
Unexpected_OtherSubr:
FT_ERROR(( "T1.Parse_CharStrings: invalid othersubr [%d %d]!!\n",
@@ -852,12 +852,12 @@
case op_endchar: /*************************************************/
{
FT_TRACE4(( " endchar" ));
- close_contour( builder );
+ close_contour( builder );
/* add current outline to the glyph slot */
builder->base.n_points += builder->current.n_points;
builder->base.n_contours += builder->current.n_contours;
-
+
/* return now !! */
FT_TRACE4(( "\n\n" ));
return T1_Err_Ok;
@@ -870,16 +870,16 @@
builder->left_bearing.x += top[0];
builder->advance.x = top[1];
builder->advance.y = 0;
-
+
builder->last.x = x = top[0];
builder->last.y = y = 0;
-
+
/* the "metrics_only" indicates that we only want to compute */
/* the glyph's metrics (lsb + advance width), not load the */
/* rest of it.. so exit immediately */
if (builder->metrics_only)
return T1_Err_Ok;
-
+
break;
}
@@ -896,16 +896,16 @@
builder->left_bearing.y += top[1];
builder->advance.x = top[2];
builder->advance.y = top[3];
-
+
builder->last.x = x = top[0];
builder->last.y = y = top[1];
-
+
/* the "metrics_only" indicates that we only want to compute */
/* the glyph's metrics (lsb + advance width), not load the */
/* rest of it.. so exit immediately */
if (builder->metrics_only)
return T1_Err_Ok;
-
+
break;
}
@@ -942,7 +942,7 @@
FT_TRACE4(( " hvcurveto" ));
if ( start_point( builder, x, y ) ||
check_points( builder, 3 ) ) goto Memory_Error;
-
+
x += top[0];
add_point( builder, x, y, 0 );
x += top[1];
@@ -958,7 +958,7 @@
{
FT_TRACE4(( " rlineto" ));
if ( start_point( builder, x, y ) ) goto Memory_Error;
-
+
x += top[0];
y += top[1];
Add_Line:
@@ -980,11 +980,11 @@
FT_TRACE4(( " rcurveto" ));
if ( start_point( builder, x, y ) ||
check_points( builder, 3 ) ) goto Memory_Error;
-
+
x += top[0];
y += top[1];
add_point( builder, x, y, 0 );
-
+
x += top[2];
y += top[3];
add_point( builder, x, y, 0 );
@@ -993,7 +993,7 @@
y += top[5];
add_point( builder, x, y, 1 );
break;
- }
+ }
case op_vhcurveto: /**********************************************/
@@ -1001,7 +1001,7 @@
FT_TRACE4(( " vhcurveto" ));
if ( start_point( builder, x, y ) ||
check_points( builder, 3 ) ) goto Memory_Error;
-
+
y += top[0];
add_point( builder, x, y, 0 );
x += top[1];
@@ -1017,7 +1017,7 @@
{
FT_TRACE4(( " vlineto" ));
if ( start_point( builder, x, y ) ) goto Memory_Error;
-
+
y += top[0];
goto Add_Line;
}
@@ -1150,10 +1150,10 @@
}
decoder->top = top;
-
+
} /* general operator processing */
-
+
} /* while ip < limit */
FT_TRACE4(( "..end..\n\n" ));
return error;
@@ -1163,7 +1163,7 @@
Stack_Underflow:
return T1_Err_Stack_Underflow;
-
+
Memory_Error:
return builder->error;
}
@@ -1269,9 +1269,9 @@
{
T1_Init_Decoder( &decoder );
T1_Init_Builder( &decoder.builder, face, size, glyph );
-
+
decoder.builder.no_recurse = (FT_Bool)!!(load_flags & FT_LOAD_NO_RECURSE);
-
+
/* now load the unscaled outline */
error = T1_Parse_CharStrings( &decoder,
type1->charstrings [glyph_index],
@@ -1279,7 +1279,7 @@
type1->num_subrs,
type1->subrs,
type1->subrs_len );
-
+
/* save new glyph tables */
T1_Done_Builder( &decoder.builder );
}
@@ -1300,29 +1300,29 @@
{
FT_BBox cbox;
FT_Glyph_Metrics* metrics = &glyph->root.metrics;
-
+
/* copy the _unscaled_ advance width */
metrics->horiAdvance = decoder.builder.advance.x;
-
+
/* make up vertical metrics */
metrics->vertBearingX = 0;
metrics->vertBearingY = 0;
metrics->vertAdvance = 0;
-
+
glyph->root.format = ft_glyph_format_outline;
-
+
glyph->root.outline.flags &= ft_outline_owner;
if ( size && size->root.metrics.y_ppem < 24 )
glyph->root.outline.flags |= ft_outline_high_precision;
glyph->root.outline.flags |= ft_outline_reverse_fill;
-
+
/*
glyph->root.outline.second_pass = TRUE;
glyph->root.outline.high_precision = ( size->root.metrics.y_ppem < 24 );
glyph->root.outline.dropout_mode = 2;
*/
-
+
if ( (load_flags & FT_LOAD_NO_SCALE) == 0 )
{
/* scale the outline and the metrics */
@@ -1331,7 +1331,7 @@
T1_Vector* vec = cur->points;
T1_Fixed x_scale = glyph->x_scale;
T1_Fixed y_scale = glyph->y_scale;
-
+
/* First of all, scale the points */
for ( n = cur->n_points; n > 0; n--, vec++ )
{
@@ -1340,10 +1340,10 @@
}
FT_Outline_Get_CBox( &glyph->root.outline, &cbox );
-
+
/* Then scale the metrics */
metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );
-
+
metrics->vertBearingX = FT_MulFix( metrics->vertBearingX, x_scale );
metrics->vertBearingY = FT_MulFix( metrics->vertBearingY, y_scale );
metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, x_scale );
@@ -1351,7 +1351,7 @@
/* compute the other metrics */
FT_Outline_Get_CBox( &glyph->root.outline, &cbox );
-
+
/* grid fit the bounding box if necessary */
if (hinting)
{
diff --git a/src/type1z/t1gload.h b/src/type1z/t1gload.h
index 3c2de5e..0ac000a 100644
--- a/src/type1z/t1gload.h
+++ b/src/type1z/t1gload.h
@@ -108,10 +108,10 @@
T1_Bool path_begun;
T1_Bool load_points;
T1_Bool no_recurse;
-
+
T1_Error error; /* only used for memory errors */
T1_Bool metrics_only;
-
+
} T1_Builder;
diff --git a/src/type1z/t1load.c b/src/type1z/t1load.c
index b2589c2..e53e914 100644
--- a/src/type1z/t1load.c
+++ b/src/type1z/t1load.c
@@ -2,7 +2,7 @@
*
* t1load.h 2.0
*
- * Type1 Loader.
+ * Type1 Loader.
*
* Copyright 1996-2000 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
@@ -32,7 +32,7 @@
*
* ..... /Field <data> ....
*
- * where <data> can be a number, a boolean, a string, or an
+ * where <data> can be a number, a boolean, a string, or an
* array of numbers. There are a few exceptions, namely the
* encoding, font name, charstrings and subrs and they are
* handled with a special pattern-matching routine.
@@ -72,17 +72,17 @@
typedef void (*T1_Parse_Func)( T1_Face face, T1_Loader* loader );
- typedef struct T1_KeyWord_
+ typedef struct T1_KeyWord_
{
const char* name;
T1_Parse_Func parsing;
-
+
} T1_KeyWord;
/* some handy macros used to easily define parsing callback functions */
/* each callback is in charge of loading a value and storing it in a */
/* given field of the Type 1 face.. */
-
+
#define PARSE_(x) static void FT_XCAT(parse_,x) ( T1_Face face, T1_Loader* loader )
#define FIELD FACE.x
@@ -98,7 +98,7 @@
FACE.x = (t)T1_ToInt(&loader->parser); \
FT_TRACE2(( "type1.parse_%s: \"%d\"\n", #x, FACE.x )); \
}
-
+
#define PARSE_INT(s,x) PARSE_(x) \
{ \
FACE.x = T1_ToInt(&loader->parser); \
@@ -111,19 +111,19 @@
FT_TRACE2(( "type1.parse_%s : \"%s\"\n", \
#x, FACE.x ? "true" : "false" )); \
}
-
+
#define PARSE_FIXED(s,x) PARSE_(x) \
{ \
FACE.x = T1_ToFixed(&loader->parser,3); \
FT_TRACE2(( "type1.parse_%s: \"%f\"\n", #x, FACE.x/65536.0 )); \
}
-
+
#define PARSE_COORDS(s,c,m,x) PARSE_(x) \
{ \
FACE.c = T1_ToCoordArray(&loader->parser, m, (T1_Short*)FACE.x ); \
FT_TRACE2(( "type1.parse_%s\n", #x )); \
}
-
+
#define PARSE_FIXEDS(s,c,m,x) PARSE_(x) \
{ \
FACE.c = T1_ToFixedArray(&loader->parser, m, (T1_Fixed*)FACE.x, 3 ); \
@@ -168,49 +168,49 @@
void skip_whitespace( T1_Parser* parser )
{
T1_Byte* cur = parser->cursor;
-
+
while ( cur < parser->limit && is_space(*cur) )
cur++;
-
+
parser->cursor = cur;
}
-
+
static
void skip_blackspace( T1_Parser* parser )
{
T1_Byte* cur = parser->cursor;
-
+
while ( cur < parser->limit && !is_space(*cur) )
cur++;
-
+
parser->cursor = cur;
}
-
+
static
int read_binary_data( T1_Parser* parser, T1_Int *size, T1_Byte* *base )
{
T1_Byte* cur;
T1_Byte* limit = parser->limit;
-
+
/* the binary data has the following format */
/* */
/* "size" [white*] RD white ....... ND */
/* */
-
+
skip_whitespace(parser);
cur = parser->cursor;
-
+
if ( cur < limit && (T1_Byte)(*cur-'0') < 10 )
{
*size = T1_ToInt(parser);
-
+
skip_whitespace(parser);
skip_blackspace(parser); /* "RD" or "-|" or something else */
-
+
/* there is only one whitespace char after the */
/* "RD" or "-|" token */
*base = parser->cursor + 1;
-
+
parser->cursor += *size+1;
return 1;
}
@@ -235,12 +235,12 @@
T1_Byte* cur;
T1_Byte* cur2;
T1_Byte* limit;
-
+
skip_whitespace(parser);
cur = parser->cursor;
limit = parser->limit;
if ( cur >= limit-1 || *cur != '/' ) return;
-
+
cur++;
cur2 = cur;
while (cur2 < limit && is_alpha(*cur2)) cur2++;
@@ -252,7 +252,7 @@
parser->error = error;
return;
}
-
+
MEM_Copy( face->type1.font_name, cur, len );
face->type1.font_name[len] = '\0';
}
@@ -265,7 +265,7 @@
T1_Parser* parser = &loader->parser;
T1_Short temp[4];
T1_BBox* bbox = &face->type1.font_bbox;
-
+
(void)T1_ToCoordArray( parser, 4, temp );
bbox->xMin = temp[0];
bbox->yMin = temp[1];
@@ -279,7 +279,7 @@
T1_Parser* parser = &loader->parser;
T1_Byte* cur = parser->cursor;
T1_Byte* limit = parser->limit;
-
+
/* skip whitespace */
while (is_space(*cur))
{
@@ -291,7 +291,7 @@
return;
}
}
-
+
/* if we have a number, then the encoding is an array, */
/* and we must load it now */
if ((T1_Byte)(*cur - '0') < 10)
@@ -301,7 +301,7 @@
T1_Table* char_table = &loader->encoding_table;
FT_Memory memory = parser->memory;
FT_Error error;
-
+
/* read the number of entries in the encoding, should be 256 */
count = T1_ToInt( parser );
if (parser->error) return;
@@ -315,7 +315,7 @@
parser->error = error;
return;
}
-
+
/* now, we will need to read a record of the form */
/* ... charcode /charname ... for each entry in our table */
/* */
@@ -337,9 +337,9 @@
for ( ; cur < limit; )
{
T1_Byte c;
-
+
c = *cur;
-
+
/* we stop when we encounter a 'def' */
if ( c == 'd' && cur+3 < limit )
{
@@ -352,39 +352,39 @@
break;
}
}
-
+
/* otherwise, we must find a number before anything else */
if ( (T1_Byte)(c-'0') < 10 )
{
T1_Int charcode;
-
+
parser->cursor = cur;
charcode = T1_ToInt(parser);
cur = parser->cursor;
-
+
/* skip whitespace */
while (cur < limit && is_space(*cur)) cur++;
-
+
if (cur < limit && *cur == '/')
{
/* bingo, we have an immediate name - it must be a */
/* character name */
FT_Byte* cur2 = cur+1;
T1_Int len;
-
+
while (cur2 < limit && is_alpha(*cur2)) cur2++;
len = cur2-cur-1;
parser->error = T1_Add_Table( char_table, charcode, cur+1, len+1 );
char_table->elements[charcode][len] = '\0';
if (parser->error) return;
-
+
cur = cur2;
}
}
else
cur++;
}
-
+
face->type1.encoding_type = t1_encoding_array;
parser->cursor = cur;
}
@@ -395,7 +395,7 @@
if ( cur+17 < limit &&
strncmp( (const char*)cur, "StandardEncoding", 16 ) == 0 )
face->type1.encoding_type = t1_encoding_standard;
-
+
else if ( cur+15 < limit &&
strncmp( (const char*)cur, "ExpertEncoding", 14 ) == 0 )
face->type1.encoding_type = t1_encoding_expert;
@@ -404,7 +404,7 @@
{
FT_ERROR(( "type1.parse_encoding: invalid token !!\n" ));
parser->error = FT_Err_Invalid_File_Format;
- }
+ }
}
}
@@ -417,10 +417,10 @@
FT_Memory memory = parser->memory;
FT_Error error;
T1_Int n;
-
- loader->num_subrs = T1_ToInt( parser );
+
+ loader->num_subrs = T1_ToInt( parser );
if (parser->error) return;
-
+
/* initialise subrs array */
error = T1_New_Table( table, loader->num_subrs, memory );
if (error) goto Fail;
@@ -429,16 +429,16 @@
/* */
/* "index" + binary data */
/* */
-
+
for ( n = 0; n < loader->num_subrs; n++ )
{
T1_Int index, size;
T1_Byte* base;
-
+
index = T1_ToInt(parser);
if (!read_binary_data(parser,&size,&base)) return;
-
- T1_Decrypt( base, size, 4330 );
+
+ T1_Decrypt( base, size, 4330 );
size -= face->type1.private_dict.lenIV;
base += face->type1.private_dict.lenIV;
@@ -466,21 +466,21 @@
T1_Byte* cur;
T1_Byte* limit = parser->limit;
T1_Int n;
-
- loader->num_glyphs = T1_ToInt( parser );
+
+ loader->num_glyphs = T1_ToInt( parser );
if (parser->error) return;
-
+
/* initialise tables */
error = T1_New_Table( code_table, loader->num_glyphs, memory ) ||
T1_New_Table( name_table, loader->num_glyphs, memory );
if (error) goto Fail;
-
+
n = 0;
for ( ;; )
{
T1_Int size;
T1_Byte* base;
-
+
/* the format is simple : */
/* "/glyphname" + binary data */
/* */
@@ -491,7 +491,7 @@
if (cur >= limit) break;
/* we stop when we find a "def" or "end" keyword */
- if (*cur == 'd' &&
+ if (*cur == 'd' &&
cur+3 < limit &&
cur[1] == 'e' &&
cur[2] == 'f' )
@@ -509,26 +509,26 @@
{
T1_Byte* cur2 = cur+1;
T1_Int len;
-
+
while (cur2 < limit && is_alpha(*cur2)) cur2++;
len = cur2-cur-1;
-
+
error = T1_Add_Table( name_table, n, cur+1, len+1 );
if (error) goto Fail;
-
+
/* add a trailing zero to the name table */
name_table->elements[n][len] = '\0';
-
- parser->cursor = cur2;
+
+ parser->cursor = cur2;
if (!read_binary_data(parser,&size,&base)) return;
- T1_Decrypt( base, size, 4330 );
+ T1_Decrypt( base, size, 4330 );
size -= face->type1.private_dict.lenIV;
base += face->type1.private_dict.lenIV;
error = T1_Add_Table( code_table, n, base, size );
if (error) goto Fail;
-
+
n++;
if (n >= loader->num_glyphs)
break;
@@ -536,7 +536,7 @@
}
loader->num_glyphs = n;
return;
-
+
Fail:
parser->error = error;
}
@@ -586,15 +586,15 @@
T1_Long size )
{
T1_Parser* parser = &loader->parser;
-
+
parser->cursor = base;
parser->limit = base + size;
parser->error = 0;
-
+
{
T1_Byte* cur = base;
T1_Byte* limit = cur + size;
-
+
for ( ;cur < limit; cur++ )
{
/* look for immediates */
@@ -602,21 +602,21 @@
{
T1_Byte* cur2;
T1_Int len;
-
+
cur ++;
cur2 = cur;
while (cur2 < limit && is_alpha(*cur2)) cur2++;
len = cur2-cur;
-
+
if (len > 0 && len < 20)
{
/* now, compare the immediate name to the keyword table */
T1_KeyWord* keyword = (T1_KeyWord*)t1_keywords;
-
+
for (;;)
{
T1_Byte* name;
-
+
name = (T1_Byte*)keyword->name;
if (!name) break;
@@ -627,7 +627,7 @@
for ( n = 1; n < len; n++ )
if (cur[n] != name[n])
break;
-
+
if (n >= len)
{
/* we found it - run the parsing callback !! */
@@ -654,29 +654,29 @@
void t1_init_loader( T1_Loader* loader, T1_Face face )
{
UNUSED(face);
-
+
MEM_Set( loader, 0, sizeof(*loader) );
loader->num_glyphs = 0;
loader->num_chars = 0;
- /* initialize the tables - simply set their 'init' field to 0 */
+ /* initialize the tables - simply set their 'init' field to 0 */
loader->encoding_table.init = 0;
loader->charstrings.init = 0;
loader->glyph_names.init = 0;
loader->subrs.init = 0;
}
-
+
static
void t1_done_loader( T1_Loader* loader )
{
T1_Parser* parser = &loader->parser;
-
+
/* finalize tables */
T1_Release_Table( &loader->encoding_table );
T1_Release_Table( &loader->charstrings );
T1_Release_Table( &loader->glyph_names );
T1_Release_Table( &loader->subrs );
-
+
/* finalize parser */
T1_Done_Parser( parser );
}
@@ -693,47 +693,47 @@
/* default lenIV */
type1->private_dict.lenIV = 4;
-
+
parser = &loader.parser;
error = T1_New_Parser( parser, face->root.stream, face->root.memory );
if (error) goto Exit;
error = parse_dict( face, &loader, parser->base_dict, parser->base_len );
if (error) goto Exit;
-
+
error = T1_Get_Private_Dict( parser );
if (error) goto Exit;
-
+
error = parse_dict( face, &loader, parser->private_dict, parser->private_len );
- if (error) goto Exit;
+ if (error) goto Exit;
/* now, propagate the subrs, charstrings and glyphnames tables */
/* to the Type1 data */
type1->num_glyphs = loader.num_glyphs;
-
+
if ( !loader.subrs.init )
{
FT_ERROR(( "T1.Open_Face: no subrs array in face !!\n" ));
error = FT_Err_Invalid_File_Format;
}
-
+
if ( !loader.charstrings.init )
{
FT_ERROR(( "T1.Open_Face: no charstrings array in face !!\n" ));
error = FT_Err_Invalid_File_Format;
}
-
+
loader.subrs.init = 0;
type1->num_subrs = loader.num_subrs;
type1->subrs_block = loader.subrs.block;
type1->subrs = loader.subrs.elements;
type1->subrs_len = loader.subrs.lengths;
-
+
loader.charstrings.init = 0;
type1->charstrings_block = loader.charstrings.block;
type1->charstrings = loader.charstrings.elements;
type1->charstrings_len = loader.charstrings.lengths;
-
+
/* we copy the glyph names "block" and "elements" fields */
/* but the "lengths" field must be released later.. */
type1->glyph_names_block = loader.glyph_names.block;
@@ -753,16 +753,16 @@
/* table, lookup the index of the glyph having the same name */
/* the index is then stored in type1.encoding.char_index, and */
/* a the name to type1.encoding.char_name */
-
+
min_char = +32000;
max_char = -32000;
-
+
charcode = 0;
for ( ; charcode < loader.encoding_table.num_elems; charcode++ )
{
type1->encoding.char_index[charcode] = 0;
type1->encoding.char_name [charcode] = ".notdef";
-
+
char_name = loader.encoding_table.elements[charcode];
if (char_name)
for ( index = 0; index < type1->num_glyphs; index++ )
@@ -773,7 +773,7 @@
{
type1->encoding.char_index[charcode] = index;
type1->encoding.char_name [charcode] = (char*)glyph_name;
-
+
if (charcode < min_char) min_char = charcode;
if (charcode > max_char) max_char = charcode;
break;
@@ -784,8 +784,8 @@
type1->encoding.code_last = max_char;
type1->encoding.num_chars = loader.num_chars;
}
-
+
Exit:
t1_done_loader( &loader );
return error;
- }
+ }
diff --git a/src/type1z/t1load.h b/src/type1z/t1load.h
index 093096c..629e943 100644
--- a/src/type1z/t1load.h
+++ b/src/type1z/t1load.h
@@ -2,7 +2,7 @@
*
* t1load.h 2.0
*
- * Type1 Loader.
+ * Type1 Loader.
*
* Copyright 1996-2000 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
@@ -32,14 +32,14 @@
T1_Int num_chars; /* number of characters in encoding */
T1_Table encoding_table; /* T1_Table used to store the */
/* encoding character names */
-
- T1_Int num_glyphs;
+
+ T1_Int num_glyphs;
T1_Table glyph_names;
T1_Table charstrings;
-
+
T1_Int num_subrs;
T1_Table subrs;
-
+
} T1_Loader;
LOCAL_DEF
diff --git a/src/type1z/t1objs.c b/src/type1z/t1objs.c
index 2d25408..3a5c053 100644
--- a/src/type1z/t1objs.c
+++ b/src/type1z/t1objs.c
@@ -2,7 +2,7 @@
*
* t1objs.c 1.0
*
- * Type1 Objects manager.
+ * Type1 Objects manager.
*
* Copyright 1996-1998 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
@@ -97,7 +97,7 @@
* Error code.
*
******************************************************************/
-
+
LOCAL_FUNC
T1_Error T1_Reset_Size( T1_Size size )
{
@@ -124,7 +124,7 @@
* face :: typeless pointer to the face object to destroy
*
* <Return>
- * Error code.
+ * Error code.
*
******************************************************************/
@@ -138,10 +138,10 @@
{
memory = face->root.memory;
- /* release font info strings */
+ /* release font info strings */
{
T1_FontInfo* info = &type1->font_info;
-
+
FREE( info->version );
FREE( info->notice );
FREE( info->full_name );
@@ -149,21 +149,21 @@
FREE( info->weight );
}
- /* release top dictionary */
+ /* release top dictionary */
FREE( type1->charstrings_len );
FREE( type1->charstrings );
FREE( type1->glyph_names );
FREE( type1->subrs );
FREE( type1->subrs_len );
-
+
FREE( type1->subrs_block );
FREE( type1->charstrings_block );
FREE( type1->glyph_names_block );
FREE( type1->encoding.char_index );
FREE( type1->font_name );
-
+
#ifndef T1_CONFIG_OPTION_NO_AFM
/* release afm data if present */
if ( face->afm_data)
@@ -217,7 +217,7 @@
{
/* look-up the PSNames driver */
FT_Driver psnames_driver;
-
+
psnames_driver = FT_Get_Driver( face->root.driver->library, "psnames" );
if (psnames_driver)
face->psnames = (PSNames_Interface*)
@@ -246,15 +246,15 @@
/* Now set up root face fields */
{
FT_Face root = (FT_Face)&face->root;
-
+
root->num_glyphs = face->type1.num_glyphs;
root->num_charmaps = 1;
-
+
root->face_index = face_index;
root->face_flags = FT_FACE_FLAG_SCALABLE;
-
+
root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
-
+
if ( face->type1.font_info.is_fixed_pitch )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
@@ -267,13 +267,13 @@
{
char* full = face->type1.font_info.full_name;
char* family = root->family_name;
-
+
while ( *family && *full == *family )
{
family++;
full++;
}
-
+
root->style_name = ( *full == ' ' ? full+1 : "Regular" );
}
else
@@ -285,17 +285,17 @@
root->style_name = "Regular";
}
}
-
+
/* no embedded bitmap support */
root->num_fixed_sizes = 0;
root->available_sizes = 0;
-
+
root->bbox = face->type1.font_bbox;
root->units_per_EM = 1000;
root->ascender = (T1_Short)face->type1.font_bbox.yMax;
root->descender = -(T1_Short)face->type1.font_bbox.yMin;
root->height = ((root->ascender + root->descender)*12)/10;
-
+
/* now compute the maximum advance width */
root->max_advance_width = face->type1.private_dict.standard_width;
@@ -315,10 +315,10 @@
}
root->max_advance_height = root->height;
-
+
root->underline_position = face->type1.font_info.underline_position;
root->underline_thickness = face->type1.font_info.underline_thickness;
-
+
root->max_points = 0;
root->max_contours = 0;
}
@@ -349,7 +349,7 @@
charmap->encoding_id = 1;
charmap++;
}
-
+
/* simply clear the error in case of failure (which really) */
/* means that out of memory or no unicode glyph names */
error = 0;
@@ -359,25 +359,25 @@
/* now, support either the standard, expert, or custom encodings */
charmap->face = (FT_Face)face;
charmap->platform_id = 7; /* a new platform id for Adobe fonts ?? */
-
+
switch (face->type1.encoding_type)
{
case t1_encoding_standard:
charmap->encoding = ft_encoding_adobe_standard;
charmap->encoding_id = 0;
break;
-
+
case t1_encoding_expert:
charmap->encoding = ft_encoding_adobe_expert;
charmap->encoding_id = 1;
break;
-
+
default:
charmap->encoding = ft_encoding_adobe_custom;
charmap->encoding_id = 2;
break;
}
-
+
root->charmaps = face->charmaps;
root->num_charmaps = charmap - face->charmaprecs + 1;
face->charmaps[0] = &face->charmaprecs[0];
@@ -396,7 +396,7 @@
*
* Input : _glyph typeless pointer to the glyph record to destroy
*
- * Output : Error code.
+ * Output : Error code.
*
******************************************************************/
@@ -420,7 +420,7 @@
* Description : The glyph object constructor.
*
* Input : glyph glyph record to build.
- * face the glyph's parent face.
+ * face the glyph's parent face.
*
* Output : Error code.
*
diff --git a/src/type1z/t1objs.h b/src/type1z/t1objs.h
index 15f1e99..7da6713 100644
--- a/src/type1z/t1objs.h
+++ b/src/type1z/t1objs.h
@@ -2,7 +2,7 @@
*
* t1objs.h 1.0
*
- * Type1 objects definition.
+ * Type1 objects definition.
*
* Copyright 1996-1999 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
@@ -82,7 +82,7 @@
/* NOW BEGINS THE TYPE1 SPECIFIC STUFF .............................. */
/* */
/**************************************************************************/
-
+
/***************************************************/
/* */
@@ -90,7 +90,7 @@
/* */
/* Type 1 size record.. */
/* */
-
+
typedef struct T1_SizeRec_
{
FT_SizeRec root;
@@ -109,14 +109,14 @@
/* */
/* TrueDoc glyph record.. */
/* */
-
+
typedef struct T1_GlyphSlotRec_
{
FT_GlyphSlotRec root;
T1_Bool hint;
T1_Bool scaled;
-
+
T1_Int max_points;
T1_Int max_contours;
@@ -250,7 +250,7 @@
*
* <Input> glyph :: handle to glyph slot object
*
- * <Output> Error code.
+ * <Output> Error code.
*
******************************************************************/
diff --git a/src/type1z/t1parse.c b/src/type1z/t1parse.c
index 42743c3..b7d9506 100644
--- a/src/type1z/t1parse.c
+++ b/src/type1z/t1parse.c
@@ -27,7 +27,7 @@
* See "t1load.c" to see how data is loaded from the font file
*
******************************************************************/
-
+
#include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftcalc.h>
#include <freetype/internal/ftobjs.h>
@@ -75,7 +75,7 @@
Exit:
if (error) FREE(table->elements);
-
+
return error;
}
@@ -105,7 +105,7 @@
T1_Long delta = table->block - old_base;
T1_Byte** offset = table->elements;
T1_Byte** limit = offset + table->max_elems;
-
+
if (delta)
for ( ; offset < limit; offset++ )
{
@@ -113,7 +113,7 @@
offset[0] += delta;
}
}
-
+
static
T1_Error reallocate_t1_table( T1_Table* table,
T1_Int new_size )
@@ -121,17 +121,17 @@
FT_Memory memory = table->memory;
T1_Byte* old_base = table->block;
T1_Error error;
-
+
/* realloc the base block */
if ( REALLOC( table->block, table->capacity, new_size ) )
return error;
-
+
table->capacity = new_size;
-
+
/* shift all offsets when needed */
if (old_base)
shift_elements( table, old_base );
-
+
return T1_Err_Ok;
}
@@ -198,10 +198,10 @@
old_base = table->block;
if (!old_base)
return;
-
+
(void)REALLOC( table->block, table->capacity, table->cursor );
table->capacity = table->cursor;
-
+
if (old_base != table->block)
shift_elements( table, old_base );
}
@@ -211,7 +211,7 @@
void T1_Release_Table( T1_Table* table )
{
FT_Memory memory = table->memory;
-
+
if (table->init == (FT_Long)0xdeadbeef)
{
FREE( table->block );
@@ -228,20 +228,20 @@
T1_Long result = 0;
T1_Byte* cur = *cursor;
T1_Byte c, d;
-
+
for (; cur < limit; cur++)
{
c = *cur;
d = (T1_Byte)(c - '0');
if (d < 10) break;
-
+
if ( c=='-' )
{
cur++;
break;
}
}
-
+
if (cur < limit)
{
do
@@ -249,16 +249,16 @@
d = (T1_Byte)(cur[0] - '0');
if (d >= 10)
break;
-
+
result = result*10 + d;
cur++;
-
+
} while (cur < limit);
-
+
if (c == '-')
result = -result;
}
-
+
*cursor = cur;
return result;
}
@@ -273,26 +273,26 @@
T1_Long num, divider, result;
T1_Int sign = 0;
T1_Byte d;
-
+
if (cur >= limit) return 0;
-
+
/* first of all, read the integer part */
result = t1_toint( &cur, limit ) << 16;
num = 0;
divider = 1;
-
+
if (result < 0)
{
sign = 1;
result = -result;
}
if (cur >= limit) goto Exit;
-
+
/* read decimal part, if any */
if (*cur == '.' && cur+1 < limit)
{
cur++;
-
+
for (;;)
{
d = (T1_Byte)(*cur - '0');
@@ -307,14 +307,14 @@
if (cur >= limit) break;
}
}
-
+
/* read exponent, if any */
if ( cur+1 < limit && (*cur == 'e' || *cur == 'E'))
{
cur++;
power_ten += t1_toint( &cur, limit );
}
-
+
Exit:
/* raise to power of ten if needed */
while (power_ten > 0)
@@ -323,7 +323,7 @@
num = num*10;
power_ten--;
}
-
+
while (power_ten < 0)
{
result = result/10;
@@ -336,7 +336,7 @@
if (sign)
result = -result;
-
+
*cursor = cur;
return result;
}
@@ -351,19 +351,19 @@
T1_Byte* cur = *cursor;
T1_Int count = 0;
T1_Byte c, ender;
-
+
if (cur >= limit) goto Exit;
-
+
/* check for the beginning of an array. If not, only one number will be read */
c = *cur;
ender = 0;
-
+
if (c == '[')
ender = ']';
-
+
if (c == '{')
ender = '}';
-
+
if (ender)
cur++;
@@ -375,21 +375,21 @@
{
c = *cur;
if ( c != ' ' && c != '\t' ) break;
-
+
cur++;
if (cur >= limit) goto Exit;
}
-
+
if (count >= max_coords || c == ender)
break;
-
+
coords[count] = (T1_Short)(t1_tofixed(&cur,limit,0) >> 16);
count++;
-
+
if (!ender)
break;
}
-
+
Exit:
*cursor = cur;
return count;
@@ -399,7 +399,7 @@
static
T1_Int t1_tofixedarray( T1_Byte* *cursor,
- T1_Byte* limit,
+ T1_Byte* limit,
T1_Int max_values,
T1_Fixed* values,
T1_Int power_ten )
@@ -407,19 +407,19 @@
T1_Byte* cur = *cursor;
T1_Int count = 0;
T1_Byte c, ender;
-
+
if (cur >= limit) goto Exit;
-
+
/* check for the beginning of an array. If not, only one number will be read */
c = *cur;
ender = 0;
-
+
if (c == '[')
ender = ']';
-
+
if (c == '{')
ender = '}';
-
+
if (ender)
cur++;
@@ -431,21 +431,21 @@
{
c = *cur;
if ( c != ' ' && c != '\t' ) break;
-
+
cur++;
if (cur >= limit) goto Exit;
}
if (count >= max_values || c == ender)
break;
-
+
values[count] = t1_tofixed(&cur,limit,power_ten);
count++;
-
+
if (!ender)
break;
}
-
+
Exit:
*cursor = cur;
return count;
@@ -472,18 +472,18 @@
while ( cur < limit && (*cur == ' ' || *cur == '\t')) cur++;
if (cur+1 >= limit) return 0;
-
+
if (*cur == '(') cur++; /* skip the opening parenthesis, if there is one */
-
+
*cursor = cur;
count = 0;
-
+
/* then, count its length */
for ( ; cur < limit; cur++ )
{
if (*cur == '(')
count++;
-
+
else if (*cur == ')')
{
count--;
@@ -492,14 +492,14 @@
}
}
- len = cur - *cursor;
+ len = cur - *cursor;
if (cur >= limit || ALLOC(result,len+1)) return 0;
-
+
/* now copy the string */
MEM_Copy( result, *cursor, len );
result[len] = '\0';
*cursor = cur;
- return result;
+ return result;
}
static
@@ -507,7 +507,7 @@
{
T1_Byte* cur = *cursor;
T1_Bool result = 0;
-
+
/* return 1 if we find a "true", 0 otherwise */
if ( cur+3 < limit &&
cur[0] == 't' &&
@@ -583,21 +583,21 @@
FT_Error read_pfb_tag( FT_Stream stream, T1_UShort *tag, T1_Long* size )
{
FT_Error error;
-
+
if (READ_UShort(*tag)) goto Exit;
if (*tag == 0x8001 || *tag == 0x8002)
{
FT_Long asize;
-
+
if (READ_ULong(asize)) goto Exit;
-
+
/* swap between big and little endianness */
*size = ((asize & 0xFF000000) >> 24) |
((asize & 0x00FF0000) >> 8 ) |
((asize & 0x0000FF00) << 8 ) |
((asize & 0x000000FF) << 24);
}
-
+
Exit:
return error;
}
@@ -612,7 +612,7 @@
FT_Error error;
T1_UShort tag;
T1_Long size;
-
+
parser->stream = stream;
parser->memory = memory;
parser->base_len = 0;
@@ -622,10 +622,10 @@
parser->in_pfb = 0;
parser->in_memory = 0;
parser->single_block = 0;
-
+
parser->cursor = 0;
parser->limit = 0;
-
+
/******************************************************************/
/* */
/* Here's a short summary of what is going on : */
@@ -641,12 +641,12 @@
/* parser->in_pfb is set when we are in a binary (".pfb") font */
/* parser->in_memory is set when we have a memory stream. */
/* */
-
+
/* try to compute the size of the base dictionary */
/* look for a Postscript binary file tag, i.e 0x8001 */
if ( FILE_Seek(0L) )
goto Exit;
-
+
error = read_pfb_tag( stream, &tag, &size );
if (error) goto Exit;
@@ -662,14 +662,14 @@
/* now, try to load the "size" bytes of the "base" dictionary we */
/* found previously */
-
+
/* if it's a memory-based resource, set up pointers */
if ( !stream->read )
{
parser->base_dict = (T1_Byte*)stream->base + stream->pos;
parser->base_len = size;
parser->in_memory = 1;
-
+
/* check that the "size" field is valid */
if ( FILE_Skip(size) ) goto Exit;
}
@@ -681,7 +681,7 @@
goto Exit;
parser->base_len = size;
}
-
+
/* Now check font format, we must see a '%!PS-AdobeFont-1' */
/* or a '%!FontType' */
{
@@ -764,7 +764,7 @@
FT_Memory memory = parser->memory;
FT_Error error = 0;
T1_Long size;
-
+
if (parser->in_pfb)
{
/* in the case of the PFB format, the private dictionary can be */
@@ -775,15 +775,15 @@
T1_UShort tag;
T1_Long size;
- parser->private_len = 0;
+ parser->private_len = 0;
for (;;)
{
error = read_pfb_tag(stream, &tag, &size);
if (error) goto Fail;
-
+
if (tag != 0x8002)
break;
-
+
parser->private_len += size;
if ( FILE_Skip(size) )
@@ -824,9 +824,9 @@
/* first of all, look at the "eexec" keyword */
FT_Byte* cur = parser->base_dict;
- FT_Byte* limit = cur + parser->base_len;
+ FT_Byte* limit = cur + parser->base_len;
FT_Byte c;
-
+
for (;;)
{
c = cur[0];
@@ -836,12 +836,12 @@
cur[3] == 'e' && cur[4] == 'c' )
{
cur += 6; /* we skip the newling after the "eexec" */
-
+
/* XXX: Some fonts use DOS-linefeeds, i.e. \r\n, we need to skip */
/* the extra \n when we find it.. */
if (cur[0] == '\n')
cur++;
-
+
break;
}
}
@@ -853,13 +853,13 @@
goto Exit;
}
}
-
+
/* now determine wether where to write the _encrypted_ binary private */
/* dictionary. We overwrite the base dictionary for disk-based resources */
/* and allocate a new block otherwise */
-
- size = parser->base_len - (cur-parser->base_dict);
-
+
+ size = parser->base_len - (cur-parser->base_dict);
+
if ( parser->in_memory )
{
/* note that we allocate one more byte to put a terminating '0' */
@@ -868,13 +868,13 @@
}
else
{
- parser->single_block = 1;
+ parser->single_block = 1;
parser->private_dict = parser->base_dict;
parser->private_len = size;
parser->base_dict = 0;
parser->base_len = 0;
}
-
+
/* now determine wether the private dictionary is encoded in binary */
/* or hexadecimal ASCII format.. */
/* and decode it accordingly */
@@ -890,40 +890,40 @@
MEM_Copy( parser->private_dict, cur, size );
}
else
- {
+ {
/* ASCII hexadecimal encoding.. This blows goats !!.. */
-
+
T1_Byte* write;
T1_Int count;
write = parser->private_dict;
count = 0;
-
+
for ( ;cur < limit; cur++)
{
int hex1;
-
+
/* check for newline */
if (cur[0] == '\r' || cur[0] == '\n')
continue;
-
+
/* exit if we have a non-hexadecimal digit that isn't a newline */
hex1 = hexa_value(cur[0]);
if (hex1 < 0 || cur+1 >= limit)
break;
-
+
/* otherwise, store byte */
*write++ = (hex1 << 4) | hexa_value(cur[1]);
count++;
cur++;
}
-
+
/* put a safeguard */
parser->private_len = write - parser->private_dict;
*write++ = 0;
}
}
-
+
/* we now decrypt the encoded binary private dictionary */
T1_Decrypt( parser->private_dict, parser->private_len, 55665 );
parser->cursor = parser->private_dict;
@@ -933,4 +933,4 @@
Exit:
return error;
}
-
+
diff --git a/src/type1z/t1parse.h b/src/type1z/t1parse.h
index 6866918..6482d52 100644
--- a/src/type1z/t1parse.h
+++ b/src/type1z/t1parse.h
@@ -116,13 +116,13 @@
{
FT_Stream stream;
FT_Memory memory;
-
+
T1_Byte* base_dict;
T1_Int base_len;
-
+
T1_Byte* private_dict;
T1_Int private_len;
-
+
T1_Byte in_pfb;
T1_Byte in_memory;
T1_Byte single_block;
@@ -130,7 +130,7 @@
T1_Byte* cursor;
T1_Byte* limit;
T1_Error error;
-
+
} T1_Parser;
diff --git a/src/type1z/t1tokens.h b/src/type1z/t1tokens.h
index 0de85be..2ef03b4 100644
--- a/src/type1z/t1tokens.h
+++ b/src/type1z/t1tokens.h
@@ -26,37 +26,37 @@
PARSE_STRING("FullName",full_name)
PARSE_STRING("FamilyName",family_name)
PARSE_STRING("Weight",weight)
-
+
PARSE_INT("ItalicAngle",italic_angle)
PARSE_BOOL("isFixedPitch",is_fixed_pitch)
PARSE_NUM("UnderlinePosition",underline_position,T1_Short)
PARSE_NUM("UnderlineThickness",underline_thickness,T1_UShort)
- /* define the private dict parsing callbacks */
-
+ /* define the private dict parsing callbacks */
+
#undef FACE
#define FACE (face->type1.private_dict)
PARSE_INT("UniqueID",unique_id)
PARSE_INT("lenIV",lenIV)
-
+
PARSE_COORDS( "BlueValues", num_blues, 14, blue_values)
PARSE_COORDS( "OtherBlues", num_other_blues, 10, other_blues)
-
+
PARSE_COORDS( "FamilyBlues", num_family_blues, 14, family_blues)
PARSE_COORDS( "FamilyOtherBlues", num_family_other_blues, 10, family_other_blues)
-
+
PARSE_FIXED( "BlueScale", blue_scale)
PARSE_INT( "BlueShift", blue_shift)
-
+
PARSE_INT( "BlueFuzz", blue_fuzz)
PARSE_COORDS2( "StdHW", 1, standard_width )
PARSE_COORDS2( "StdVW", 1, standard_height )
-
+
PARSE_COORDS( "StemSnapH", num_snap_widths, 12, stem_snap_widths )
PARSE_COORDS( "StemSnapV", num_snap_heights, 12, stem_snap_heights )
-
+
PARSE_INT( "LanguageGroup", language_group )
PARSE_INT( "password", password )
PARSE_COORDS2( "MinFeature", 2, min_feature )
@@ -66,7 +66,7 @@
#undef FACE
#define FACE (face->type1)
-
+
/* PARSE_STRING( "FontName", font_name ) -- handled by special routine */
PARSE_NUM( "PaintType", paint_type, T1_Byte )
PARSE_NUM( "FontType", font_type, T1_Byte )