Commit 665279f0d578f00f83e3d20ff7bebe8f4f70c324

David Turner 2005-03-22T22:10:45

removing the 'autohint' module from the library, since it is now replaced by 'autofit'

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
diff --git a/ChangeLog b/ChangeLog
index 551876b..dd13b98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-22  David Turner  <david@freetype.org>
+
+	* src/autohint/*, Jamfile: removing the 'autohint' module
+	from the build.
+
 2005-03-15  David Turner  <david@freetype.org>
 
 	* src/bdf/bdflib.c: Remove compiler warnings.
diff --git a/Jamfile b/Jamfile
index 4877a6e..4d8c487 100644
--- a/Jamfile
+++ b/Jamfile
@@ -62,7 +62,6 @@ FT2_BUILD_INCLUDE ?= ;
 #            if you modify this list or provide your own.
 #
 FT2_COMPONENTS ?= autofit    # auto-fitter
-                  autohint   # auto-hinter
                   base       # base component (public APIs)
                   bdf        # BDF font driver
                   cache      # cache sub-system
diff --git a/src/autohint/CatharonLicense.txt b/src/autohint/CatharonLicense.txt
deleted file mode 100644
index 789c8c9..0000000
--- a/src/autohint/CatharonLicense.txt
+++ /dev/null
@@ -1,123 +0,0 @@
-                  The Catharon Open Source LICENSE
-                    ----------------------------
-
-                            2000-Jul-04
-
-          Copyright (C) 2000 by Catharon Productions, Inc.
-
-
-
-Introduction
-============
-
-  This  license  applies to  source  files  distributed by  Catharon
-  Productions,  Inc.  in  several  archive packages.   This  license
-  applies  to all files  found in  such packages  which do  not fall
-  under their own explicit license.
-
-  This  license   was  inspired  by  the  BSD,   Artistic,  and  IJG
-  (Independent JPEG  Group) licenses, which  all encourage inclusion
-  and  use of  free  software in  commercial  and freeware  products
-  alike.  As a consequence, its main points are that:
-
-    o We  don't promise that  this software works.  However,  we are
-      interested in any kind of bug reports. (`as is' distribution)
-
-    o You can  use this software for whatever you  want, in parts or
-      full form, without having to pay us. (`royalty-free' usage)
-
-    o You may not pretend that  you wrote this software.  If you use
-      it, or  only parts of it,  in a program,  you must acknowledge
-      somewhere  in  your  documentation  that  you  have  used  the
-      Catharon Code. (`credits')
-
-  We  specifically  permit  and  encourage  the  inclusion  of  this
-  software, with  or without modifications,  in commercial products.
-  We disclaim  all warranties  covering the packages  distributed by
-  Catharon  Productions, Inc.  and  assume no  liability related  to
-  their use.
-
-
-Legal Terms
-===========
-
-0. Definitions
---------------
-
-  Throughout this license,  the terms `Catharon Package', `package',
-  and  `Catharon  Code'  refer   to  the  set  of  files  originally
-  distributed by Catharon Productions, Inc.
-
-  `You' refers to  the licensee, or person using  the project, where
-  `using' is a generic term including compiling the project's source
-  code as  well as linking it  to form a  `program' or `executable'.
-  This  program  is referred  to  as `a  program  using  one of  the
-  Catharon Packages'.
-
-  This  license applies  to all  files distributed  in  the original
-  Catharon  Package(s),  including  all  source code,  binaries  and
-  documentation,  unless  otherwise  stated   in  the  file  in  its
-  original, unmodified form as  distributed in the original archive.
-  If you are  unsure whether or not a particular  file is covered by
-  this license, you must contact us to verify this.
-
-  The  Catharon   Packages  are  copyright  (C)   2000  by  Catharon
-  Productions, Inc.  All rights reserved except as specified below.
-
-1. No Warranty
---------------
-
-  THE CATHARON PACKAGES ARE PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
-  KIND, EITHER  EXPRESS OR IMPLIED,  INCLUDING, BUT NOT  LIMITED TO,
-  WARRANTIES  OF  MERCHANTABILITY   AND  FITNESS  FOR  A  PARTICULAR
-  PURPOSE.  IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OF OR THE INABILITY TO
-  USE THE CATHARON PACKAGE.
-
-2. Redistribution
------------------
-
-  This  license  grants  a  worldwide, royalty-free,  perpetual  and
-  irrevocable right  and license to use,  execute, perform, compile,
-  display,  copy,   create  derivative  works   of,  distribute  and
-  sublicense the  Catharon Packages (in both source  and object code
-  forms)  and  derivative works  thereof  for  any  purpose; and  to
-  authorize others  to exercise  some or all  of the  rights granted
-  herein, subject to the following conditions:
-
-    o Redistribution  of source code  must retain this  license file
-      (`license.txt') unaltered; any additions, deletions or changes
-      to   the  original   files  must   be  clearly   indicated  in
-      accompanying  documentation.   The  copyright notices  of  the
-      unaltered, original  files must be preserved in  all copies of
-      source files.
-
-    o Redistribution  in binary form must provide  a disclaimer that
-      states  that the  software is  based in  part on  the  work of
-      Catharon Productions, Inc. in the distribution documentation.
-
-  These conditions  apply to any  software derived from or  based on
-  the Catharon Packages, not just  the unmodified files.  If you use
-  our work, you  must acknowledge us.  However, no  fee need be paid
-  to us.
-
-3. Advertising
---------------
-
-  Neither Catharon Productions, Inc.  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 the following phrase
-  to refer to this software in your documentation: 'this software is
-  based in part on the Catharon Typography Project'.
-
-  As  you have  not signed  this license,  you are  not  required to
-  accept  it.  However,  as  the Catharon  Packages are  copyrighted
-  material, only  this license, or  another one contracted  with the
-  authors, grants you  the right to use, distribute,  and modify it.
-  Therefore,  by  using,  distributing,  or modifying  the  Catharon
-  Packages,  you indicate  that you  understand and  accept  all the
-  terms of this license.
-
---- end of license.txt ---
diff --git a/src/autohint/Jamfile b/src/autohint/Jamfile
deleted file mode 100644
index a129e5e..0000000
--- a/src/autohint/Jamfile
+++ /dev/null
@@ -1,21 +0,0 @@
-# FreeType 2 src/autohint Jamfile (c) 2001 David Turner
-#
-
-SubDir  FT2_TOP $(FT2_SRC_DIR) autohint ;
-
-{
-  local  _sources ;
-
-  if $(FT2_MULTI)
-  {
-    _sources = ahangles ahglobal ahglyph ahhint ahmodule ;
-  }
-  else
-  {
-    _sources = autohint ;
-  }
-
-  Library  $(FT2_LIB) : $(_sources).c ;
-}
-
-# end of src/autohint Jamfile
diff --git a/src/autohint/ahangles.c b/src/autohint/ahangles.c
deleted file mode 100644
index 3423c62..0000000
--- a/src/autohint/ahangles.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahangles.c                                                             */
-/*                                                                         */
-/*    Routines used to compute vector angles with limited accuracy         */
-/*    and very high speed (body).                                          */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002, 2005 Catharon Productions Inc.              */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#include <ft2build.h>
-#include "ahangles.h"
-
-
-  /* the following table has been automatically generated with */
-  /* the `mather.py' Python script                             */
-
-  const AH_Angle  ah_arctan[1L << AH_ATAN_BITS] =
-  {
-     0,  0,  1,  1,  1,  2,  2,  2,
-     3,  3,  3,  3,  4,  4,  4,  5,
-     5,  5,  6,  6,  6,  7,  7,  7,
-     8,  8,  8,  9,  9,  9, 10, 10,
-    10, 10, 11, 11, 11, 12, 12, 12,
-    13, 13, 13, 14, 14, 14, 14, 15,
-    15, 15, 16, 16, 16, 17, 17, 17,
-    18, 18, 18, 18, 19, 19, 19, 20,
-    20, 20, 21, 21, 21, 21, 22, 22,
-    22, 23, 23, 23, 24, 24, 24, 24,
-    25, 25, 25, 26, 26, 26, 26, 27,
-    27, 27, 28, 28, 28, 28, 29, 29,
-    29, 30, 30, 30, 30, 31, 31, 31,
-    31, 32, 32, 32, 33, 33, 33, 33,
-    34, 34, 34, 34, 35, 35, 35, 35,
-    36, 36, 36, 36, 37, 37, 37, 38,
-    38, 38, 38, 39, 39, 39, 39, 40,
-    40, 40, 40, 41, 41, 41, 41, 42,
-    42, 42, 42, 42, 43, 43, 43, 43,
-    44, 44, 44, 44, 45, 45, 45, 45,
-    46, 46, 46, 46, 46, 47, 47, 47,
-    47, 48, 48, 48, 48, 48, 49, 49,
-    49, 49, 50, 50, 50, 50, 50, 51,
-    51, 51, 51, 51, 52, 52, 52, 52,
-    52, 53, 53, 53, 53, 53, 54, 54,
-    54, 54, 54, 55, 55, 55, 55, 55,
-    56, 56, 56, 56, 56, 57, 57, 57,
-    57, 57, 57, 58, 58, 58, 58, 58,
-    59, 59, 59, 59, 59, 59, 60, 60,
-    60, 60, 60, 61, 61, 61, 61, 61,
-    61, 62, 62, 62, 62, 62, 62, 63,
-    63, 63, 63, 63, 63, 64, 64, 64
-  };
-
-
-  FT_LOCAL_DEF( AH_Angle )
-  ah_angle( FT_Vector*  v )
-  {
-    FT_Pos    dx, dy;
-    AH_Angle  angle;
-
-
-    dx = v->x;
-    dy = v->y;
-
-    /* check trivial cases */
-    if ( dy == 0 )
-    {
-      angle = 0;
-      if ( dx < 0 )
-        angle = AH_PI;
-      return angle;
-    }
-    else if ( dx == 0 )
-    {
-      angle = AH_HALF_PI;
-      if ( dy < 0 )
-        angle = -AH_HALF_PI;
-      return angle;
-    }
-
-    angle = 0;
-    if ( dx < 0 )
-    {
-      dx = -v->x;
-      dy = -v->y;
-      angle = AH_PI;
-    }
-
-    if ( dy < 0 )
-    {
-      FT_Pos  tmp;
-
-
-      tmp = dx;
-      dx  = -dy;
-      dy  = tmp;
-      angle -= AH_HALF_PI;
-    }
-
-    if ( dx == 0 && dy == 0 )
-      return 0;
-
-    if ( dx == dy )
-      angle += AH_PI / 4;
-    else if ( dx > dy )
-      angle += ah_arctan[FT_DivFix( dy, dx ) >> ( 16 - AH_ATAN_BITS )];
-    else
-      angle += AH_HALF_PI -
-               ah_arctan[FT_DivFix( dx, dy ) >> ( 16 - AH_ATAN_BITS )];
-
-    if ( angle > AH_PI )
-      angle -= AH_2PI;
-
-    return angle;
-  }
-
-
-  FT_LOCAL_DEF( AH_Angle )
-  ah_angle_diff( AH_Angle  angle1,
-                 AH_Angle  angle2 )
-  {
-    AH_Angle  delta;
-    
-
-    delta = ( angle2 - angle1 );
-    if ( delta < 0 )
-      delta += AH_2PI;
-    
-    if ( delta > AH_PI )
-      delta -= AH_2PI;
-    
-    return delta;
-  }                 
-
-
-/* END */
diff --git a/src/autohint/ahangles.h b/src/autohint/ahangles.h
deleted file mode 100644
index f46bfaa..0000000
--- a/src/autohint/ahangles.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahangles.h                                                             */
-/*                                                                         */
-/*    A routine used to compute vector angles with limited accuracy        */
-/*    and very high speed (specification).                                 */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002 Catharon Productions Inc.                    */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __AHANGLES_H__
-#define __AHANGLES_H__
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include "ahtypes.h"
-
-
-FT_BEGIN_HEADER
-
-
-  /* PI expressed in ah_angles -- we don't really need an important */
-  /* precision, so 256 should be enough                             */
-#define AH_PI       256
-#define AH_2PI      ( AH_PI * 2 )
-#define AH_HALF_PI  ( AH_PI / 2 )
-#define AH_2PIMASK  ( AH_2PI - 1 )
-
-  /* the number of bits used to express an arc tangent; */
-  /* see the structure of the lookup table              */
-#define AH_ATAN_BITS  8
-
-  extern
-  const AH_Angle  ah_arctan[1L << AH_ATAN_BITS];
-
-
-  FT_LOCAL( AH_Angle )
-  ah_angle( FT_Vector*  v );
-
-
-  FT_LOCAL( AH_Angle )
-  ah_angle_diff( AH_Angle  angle1,
-                 AH_Angle  angle2 );
-
-
-FT_END_HEADER
-
-#endif /* __AHANGLES_H__ */
-
-
-/* END */
diff --git a/src/autohint/aherrors.h b/src/autohint/aherrors.h
deleted file mode 100644
index bce6107..0000000
--- a/src/autohint/aherrors.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  aherrors.h                                                             */
-/*                                                                         */
-/*    Autohinter error codes (specification only).                         */
-/*                                                                         */
-/*  Copyright 2001 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.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This file is used to define the Autohinter error enumeration          */
-  /* constants.                                                            */
-  /*                                                                       */
-  /*************************************************************************/
-
-#ifndef __AHERRORS_H__
-#define __AHERRORS_H__
-
-#include FT_MODULE_ERRORS_H
-
-#undef __FTERRORS_H__
-
-#define FT_ERR_PREFIX  AH_Err_
-#define FT_ERR_BASE    FT_Mod_Err_Autohint
-
-#include FT_ERRORS_H
-
-#endif /* __AHERRORS_H__ */
-
-/* END */
diff --git a/src/autohint/ahglobal.c b/src/autohint/ahglobal.c
deleted file mode 100644
index e157014..0000000
--- a/src/autohint/ahglobal.c
+++ /dev/null
@@ -1,402 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahglobal.c                                                             */
-/*                                                                         */
-/*    Routines used to compute global metrics automatically (body).        */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc.        */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_DEBUG_H
-#include "ahglobal.h"
-#include "ahglyph.h"
-
-
-#define MAX_TEST_CHARACTERS  12
-
-  /* cf. AH_BLUE_XXX constants in ahtypes.h */
-
-  static
-  const char* const  blue_chars[AH_BLUE_MAX] =
-  {
-    "THEZOCQS",
-    "HEZLOCUS",
-#ifdef FT_CONFIG_CHESTER_SMALL_F
-    "fijkdbh",
-#endif
-    "xzroesc",
-    "xzroesc",
-    "pqgjy"
-  };
-
-
-  /* simple insertion sort */
-  static void
-  sort_values( FT_Int   count,
-               FT_Pos*  table )
-  {
-    FT_Int  i, j;
-    FT_Pos  swap;
-
-
-    for ( i = 1; i < count; i++ )
-    {
-      for ( j = i; j > 0; j-- )
-      {
-        if ( table[j] > table[j - 1] )
-          break;
-
-        swap         = table[j];
-        table[j]     = table[j - 1];
-        table[j - 1] = swap;
-      }
-    }
-  }
-
-
-  static FT_Error
-  ah_hinter_compute_blues( AH_Hinter  hinter )
-  {
-    AH_Blue       blue;
-    AH_Globals    globals = &hinter->globals->design;
-    FT_Pos        flats [MAX_TEST_CHARACTERS];
-    FT_Pos        rounds[MAX_TEST_CHARACTERS];
-    FT_Int        num_flats;
-    FT_Int        num_rounds;
-
-    FT_Face       face;
-    FT_GlyphSlot  glyph;
-    FT_Error      error;
-    FT_CharMap    charmap;
-
-
-    face  = hinter->face;
-    glyph = face->glyph;
-
-    /* save current charmap */
-    charmap = face->charmap;
-
-    /* do we have a Unicode charmap in there? */
-    error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );
-    if ( error )
-      goto Exit;
-
-    /* we compute the blues simply by loading each character from the */
-    /* `blue_chars[blues]' string, then compute its top-most or       */
-    /* bottom-most points (depending on `AH_IS_TOP_BLUE')             */
-
-    AH_LOG(( "blue zones computation\n" ));
-    AH_LOG(( "------------------------------------------------\n" ));
-
-    for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
-    {
-      const char*  p     = blue_chars[blue];
-      const char*  limit = p + MAX_TEST_CHARACTERS;
-
-      FT_Pos       *blue_ref, *blue_shoot;
-
-
-      AH_LOG(( "blue %3d: ", blue ));
-
-      num_flats  = 0;
-      num_rounds = 0;
-
-      for ( ; p < limit; p++ )
-      {
-        FT_UInt     glyph_index;
-        FT_Vector*  extremum;
-        FT_Vector*  points;
-        FT_Vector*  point_limit;
-        FT_Vector*  point;
-        FT_Bool     round;
-
-
-        /* exit if we reach the end of the string */
-        if ( !*p )
-          break;
-
-        AH_LOG(( "`%c'", *p ));
-
-        /* load the character in the face -- skip unknown or empty ones */
-        glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p );
-        if ( glyph_index == 0 )
-          continue;
-
-        error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
-        if ( error || glyph->outline.n_points <= 0 )
-          continue;
-
-        /* now compute min or max point indices and coordinates */
-        points      = glyph->outline.points;
-        point_limit = points + glyph->outline.n_points;
-        point       = points;
-        extremum    = point;
-        point++;
-
-        if ( AH_IS_TOP_BLUE( blue ) )
-        {
-          for ( ; point < point_limit; point++ )
-            if ( point->y > extremum->y )
-              extremum = point;
-        }
-        else
-        {
-          for ( ; point < point_limit; point++ )
-            if ( point->y < extremum->y )
-              extremum = point;
-        }
-
-        AH_LOG(( "%5d", (int)extremum->y ));
-
-        /* now, check whether the point belongs to a straight or round  */
-        /* segment; we first need to find in which contour the extremum */
-        /* lies, then see its previous and next points                  */
-        {
-          FT_Int  idx = (FT_Int)( extremum - points );
-          FT_Int  n;
-          FT_Int  first, last, prev, next, end;
-          FT_Pos  dist;
-
-
-          last  = -1;
-          first = 0;
-
-          for ( n = 0; n < glyph->outline.n_contours; n++ )
-          {
-            end = glyph->outline.contours[n];
-            if ( end >= idx )
-            {
-              last = end;
-              break;
-            }
-            first = end + 1;
-          }
-
-          /* XXX: should never happen! */
-          if ( last < 0 )
-            continue;
-
-          /* now look for the previous and next points that are not on the */
-          /* same Y coordinate.  Threshold the `closeness'...              */
-
-          prev = idx;
-          next = prev;
-
-          do
-          {
-            if ( prev > first )
-              prev--;
-            else
-              prev = last;
-
-            dist = points[prev].y - extremum->y;
-            if ( dist < -5 || dist > 5 )
-              break;
-
-          } while ( prev != idx );
-
-          do
-          {
-            if ( next < last )
-              next++;
-            else
-              next = first;
-
-            dist = points[next].y - extremum->y;
-            if ( dist < -5 || dist > 5 )
-              break;
-
-          } while ( next != idx );
-
-          /* now, set the `round' flag depending on the segment's kind */
-          round = FT_BOOL(
-            FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_CURVE_TAG_ON ||
-            FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_CURVE_TAG_ON );
-
-          AH_LOG(( "%c ", round ? 'r' : 'f' ));
-        }
-
-        if ( round )
-          rounds[num_rounds++] = extremum->y;
-        else
-          flats[num_flats++] = extremum->y;
-      }
-
-      AH_LOG(( "\n" ));
-
-      /* we have computed the contents of the `rounds' and `flats' tables, */
-      /* now determine the reference and overshoot position of the blue -- */
-      /* we simply take the median value after a simple sort               */
-      sort_values( num_rounds, rounds );
-      sort_values( num_flats,  flats  );
-
-      blue_ref   = globals->blue_refs + blue;
-      blue_shoot = globals->blue_shoots + blue;
-      if ( num_flats == 0 && num_rounds == 0 )
-      {
-        *blue_ref   = -10000;
-        *blue_shoot = -10000;
-      }
-      else if ( num_flats == 0 )
-      {
-        *blue_ref   =
-        *blue_shoot = rounds[num_rounds / 2];
-      }
-      else if ( num_rounds == 0 )
-      {
-        *blue_ref   =
-        *blue_shoot = flats[num_flats / 2];
-      }
-      else
-      {
-        *blue_ref   = flats[num_flats / 2];
-        *blue_shoot = rounds[num_rounds / 2];
-      }
-
-      /* there are sometimes problems: if the overshoot position of top     */
-      /* zones is under its reference position, or the opposite for bottom  */
-      /* zones.  We must thus check everything there and correct the errors */
-      if ( *blue_shoot != *blue_ref )
-      {
-        FT_Pos   ref      = *blue_ref;
-        FT_Pos   shoot    = *blue_shoot;
-        FT_Bool  over_ref = FT_BOOL( shoot > ref );
-
-
-        if ( AH_IS_TOP_BLUE( blue ) ^ over_ref )
-          *blue_shoot = *blue_ref = ( shoot + ref ) / 2;
-      }
-
-      AH_LOG(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
-    }
-
-    /* reset original face charmap */
-    FT_Set_Charmap( face, charmap );
-    error = 0;
-
-  Exit:
-    return error;
-  }
-
-
-  static FT_Error
-  ah_hinter_compute_widths( AH_Hinter  hinter )
-  {
-    /* scan the array of segments in each direction */
-    AH_Outline  outline = hinter->glyph;
-    AH_Segment  segments;
-    AH_Segment  limit;
-    AH_Globals  globals = &hinter->globals->design;
-    FT_Pos*     widths;
-    FT_Int      dimension;
-    FT_Int*     p_num_widths;
-    FT_Error    error = 0;
-    FT_Pos      edge_distance_threshold = 32000;
-
-
-    globals->num_widths  = 0;
-    globals->num_heights = 0;
-
-    /* For now, compute the standard width and height from the `o'       */
-    /* character.  I started computing the stem width of the `i' and the */
-    /* stem height of the "-", but it wasn't too good.  Moreover, we now */
-    /* have a single character that gives us standard width and height.  */
-    {
-      FT_UInt  glyph_index;
-
-
-      glyph_index = FT_Get_Char_Index( hinter->face, 'o' );
-      if ( glyph_index == 0 )
-        return 0;
-
-      error = FT_Load_Glyph( hinter->face, glyph_index, FT_LOAD_NO_SCALE );
-      if ( error )
-        goto Exit;
-
-      error = ah_outline_load( hinter->glyph, 0x10000L, 0x10000L,
-                               hinter->face );
-      if ( error )
-        goto Exit;
-
-      ah_outline_compute_segments( hinter->glyph );
-      ah_outline_link_segments( hinter->glyph );
-    }
-
-    segments     = outline->horz_segments;
-    limit        = segments + outline->num_hsegments;
-    widths       = globals->heights;
-    p_num_widths = &globals->num_heights;
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Segment  seg = segments;
-      AH_Segment  link;
-      FT_Int      num_widths = 0;
-
-
-      for ( ; seg < limit; seg++ )
-      {
-        link = seg->link;
-        /* we only consider stem segments there! */
-        if ( link && link->link == seg && link > seg )
-        {
-          FT_Pos  dist;
-
-
-          dist = seg->pos - link->pos;
-          if ( dist < 0 )
-            dist = -dist;
-
-          if ( num_widths < AH_MAX_WIDTHS )
-            widths[num_widths++] = dist;
-        }
-      }
-
-      sort_values( num_widths, widths );
-      *p_num_widths = num_widths;
-
-      /* we will now try to find the smallest width */
-      if ( num_widths > 0 && widths[0] < edge_distance_threshold )
-        edge_distance_threshold = widths[0];
-
-      segments     = outline->vert_segments;
-      limit        = segments + outline->num_vsegments;
-      widths       = globals->widths;
-      p_num_widths = &globals->num_widths;
-    }
-
-    /* Now, compute the edge distance threshold as a fraction of the */
-    /* smallest width in the font. Set it in `hinter->glyph' too!    */
-    if ( edge_distance_threshold == 32000 )
-      edge_distance_threshold = 50;
-
-    /* let's try 20% */
-    hinter->glyph->edge_distance_threshold = edge_distance_threshold / 5;
-
-  Exit:
-    return error;
-  }
-
-
-  FT_LOCAL_DEF( FT_Error )
-  ah_hinter_compute_globals( AH_Hinter  hinter )
-  {
-    return ah_hinter_compute_widths( hinter ) ||
-           ah_hinter_compute_blues ( hinter );
-  }
-
-
-/* END */
diff --git a/src/autohint/ahglobal.h b/src/autohint/ahglobal.h
deleted file mode 100644
index 5a9bcf8..0000000
--- a/src/autohint/ahglobal.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahglobal.h                                                             */
-/*                                                                         */
-/*    Routines used to compute global metrics automatically                */
-/*    (specification).                                                     */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003 Catharon Productions Inc.              */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __AHGLOBAL_H__
-#define __AHGLOBAL_H__
-
-
-#include <ft2build.h>
-#include "ahtypes.h"
-#include FT_INTERNAL_OBJECTS_H
-
-
-FT_BEGIN_HEADER
-
-
-#ifdef  FT_CONFIG_CHESTER_SMALL_F
-
-#define AH_IS_TOP_BLUE( b )  ( (b) == AH_BLUE_CAPITAL_TOP || \
-                               (b) == AH_BLUE_SMALL_F_TOP || \
-                               (b) == AH_BLUE_SMALL_TOP   )
-
-#else /* !FT_CONFIG_CHESTER_SMALL_F */
-
-#define AH_IS_TOP_BLUE( b )  ( (b) == AH_BLUE_CAPITAL_TOP || \
-                               (b) == AH_BLUE_SMALL_TOP   )
-
-#endif /* !FT_CONFIG_CHESTER_SMALL_F */
-
-
-  /* compute global metrics automatically */
-  FT_LOCAL( FT_Error )
-  ah_hinter_compute_globals( AH_Hinter  hinter );
-
-
-FT_END_HEADER
-
-#endif /* __AHGLOBAL_H__ */
-
-
-/* END */
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
deleted file mode 100644
index 3997d70..0000000
--- a/src/autohint/ahglyph.c
+++ /dev/null
@@ -1,1566 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahglyph.c                                                              */
-/*                                                                         */
-/*    Routines used to load and analyze a given glyph before hinting       */
-/*    (body).                                                              */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2004, 2005 Catharon Productions Inc.  */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#include <ft2build.h>
-#include FT_OUTLINE_H
-
-#include "ahglyph.h"
-#include "ahangles.h"
-#include "ahglobal.h"
-#include "aherrors.h"
-
-
-#ifdef AH_DEBUG
-
-#include <stdio.h>
-
-  void
-  ah_dump_edges( AH_Outline  outline )
-  {
-    AH_Edge     edges;
-    AH_Edge     edge_limit;
-    AH_Segment  segments;
-    FT_Int      dimension;
-
-
-    edges      = outline->horz_edges;
-    edge_limit = edges + outline->num_hedges;
-    segments   = outline->horz_segments;
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Edge   edge;
-
-
-      printf ( "Table of %s edges:\n",
-               !dimension ? "vertical" : "horizontal" );
-      printf ( "  [ index |  pos |  dir  | link |"
-               " serif | blue | opos  |  pos  ]\n" );
-
-      for ( edge = edges; edge < edge_limit; edge++ )
-      {
-        printf ( "  [ %5d | %4d | %5s | %4d | %5d |  %c  | %5.2f | %5.2f ]\n",
-                 edge - edges,
-                 (int)edge->fpos,
-                 edge->dir == AH_DIR_UP
-                   ? "up"
-                   : ( edge->dir == AH_DIR_DOWN
-                         ? "down"
-                         : ( edge->dir == AH_DIR_LEFT
-                               ? "left"
-                               : ( edge->dir == AH_DIR_RIGHT
-                                     ? "right"
-                                     : "none" ) ) ),
-                 edge->link ? ( edge->link - edges ) : -1,
-                 edge->serif ? ( edge->serif - edges ) : -1,
-                 edge->blue_edge ? 'y' : 'n',
-                 edge->opos / 64.0,
-                 edge->pos / 64.0 );
-      }
-
-      edges      = outline->vert_edges;
-      edge_limit = edges + outline->num_vedges;
-      segments   = outline->vert_segments;
-    }
-  }
-
-
-  /* A function used to dump the array of linked segments */
-  void
-  ah_dump_segments( AH_Outline  outline )
-  {
-    AH_Segment  segments;
-    AH_Segment  segment_limit;
-    AH_Point    points;
-    FT_Int      dimension;
-
-
-    points        = outline->points;
-    segments      = outline->horz_segments;
-    segment_limit = segments + outline->num_hsegments;
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Segment  seg;
-
-
-      printf ( "Table of %s segments:\n",
-               !dimension ? "vertical" : "horizontal" );
-      printf ( "  [ index |  pos |  dir  | link | serif |"
-               " numl | first | start ]\n" );
-
-      for ( seg = segments; seg < segment_limit; seg++ )
-      {
-        printf ( "  [ %5d | %4d | %5s | %4d | %5d | %4d | %5d | %5d ]\n",
-                 seg - segments,
-                 (int)seg->pos,
-                 seg->dir == AH_DIR_UP
-                   ? "up"
-                   : ( seg->dir == AH_DIR_DOWN
-                         ? "down"
-                         : ( seg->dir == AH_DIR_LEFT
-                               ? "left"
-                               : ( seg->dir == AH_DIR_RIGHT
-                                     ? "right"
-                                     : "none" ) ) ),
-                 seg->link ? ( seg->link - segments ) : -1,
-                 seg->serif ? ( seg->serif - segments ) : -1,
-                 (int)seg->num_linked,
-                 seg->first - points,
-                 seg->last - points );
-      }
-
-      segments      = outline->vert_segments;
-      segment_limit = segments + outline->num_vsegments;
-    }
-  }
-
-#endif /* AH_DEBUG */
-
-
-  /* compute the direction value of a given vector */
-  static AH_Direction
-  ah_compute_direction( FT_Pos  dx,
-                        FT_Pos  dy )
-  {
-    AH_Direction  dir;
-    FT_Pos        ax = FT_ABS( dx );
-    FT_Pos        ay = FT_ABS( dy );
-
-
-    dir = AH_DIR_NONE;
-
-    /* atan(1/12) == 4.7 degrees */
-
-    /* test for vertical direction */
-    if ( ax * 12 < ay )
-    {
-      dir = dy > 0 ? AH_DIR_UP : AH_DIR_DOWN;
-    }
-    /* test for horizontal direction */
-    else if ( ay * 12 < ax )
-    {
-      dir = dx > 0 ? AH_DIR_RIGHT : AH_DIR_LEFT;
-    }
-
-    return dir;
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ah_outline_new                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Creates a new and empty AH_OutlineRec object.                      */
-  /*                                                                       */
-  FT_LOCAL_DEF( FT_Error )
-  ah_outline_new( FT_Memory    memory,
-                  AH_Outline*  aoutline )
-  {
-    FT_Error    error;
-    AH_Outline  outline;
-
-
-    if ( !FT_NEW( outline ) )
-    {
-      outline->memory = memory;
-      *aoutline       = outline;
-    }
-
-    return error;
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ah_outline_done                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Destroys a given AH_OutlineRec object.                             */
-  /*                                                                       */
-  FT_LOCAL_DEF( void )
-  ah_outline_done( AH_Outline  outline )
-  {
-    FT_Memory memory = outline->memory;
-
-
-    FT_FREE( outline->horz_edges );
-    FT_FREE( outline->horz_segments );
-    FT_FREE( outline->contours );
-    FT_FREE( outline->points );
-
-    FT_FREE( outline );
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ah_outline_save                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Saves the contents of a given AH_OutlineRec object into a face's   */
-  /*    glyph slot.                                                        */
-  /*                                                                       */
-  FT_LOCAL_DEF( void )
-  ah_outline_save( AH_Outline  outline,
-                   AH_Loader   gloader )
-  {
-    AH_Point    point       = outline->points;
-    AH_Point    point_limit = point + outline->num_points;
-    FT_Vector*  vec         = gloader->current.outline.points;
-    char*       tag         = gloader->current.outline.tags;
-
-
-    /* we assume that the glyph loader has already been checked for storage */
-    for ( ; point < point_limit; point++, vec++, tag++ )
-    {
-      vec->x = point->x;
-      vec->y = point->y;
-
-      if ( point->flags & AH_FLAG_CONIC )
-        tag[0] = FT_CURVE_TAG_CONIC;
-      else if ( point->flags & AH_FLAG_CUBIC )
-        tag[0] = FT_CURVE_TAG_CUBIC;
-      else
-        tag[0] = FT_CURVE_TAG_ON;
-    }
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ah_outline_load                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads an unscaled outline from a glyph slot into an AH_OutlineRec  */
-  /*    object.                                                            */
-  /*                                                                       */
-  FT_LOCAL_DEF( FT_Error )
-  ah_outline_load( AH_Outline  outline,
-                   FT_Fixed    x_scale,
-                   FT_Fixed    y_scale,
-                   FT_Face     face )
-  {
-    FT_Memory    memory       = outline->memory;
-    FT_Error     error        = AH_Err_Ok;
-    FT_Outline*  source       = &face->glyph->outline;
-    FT_Int       num_points   = source->n_points;
-    FT_Int       num_contours = source->n_contours;
-    AH_Point     points;
-
-
-    /* check arguments */
-    if ( !face                                          ||
-         !face->size                                    ||
-         face->glyph->format != FT_GLYPH_FORMAT_OUTLINE )
-      return AH_Err_Invalid_Argument;
-
-    /* first of all, reallocate the contours array if necessary */
-    if ( num_contours > outline->max_contours )
-    {
-      FT_Int  new_contours = FT_PAD_CEIL( num_contours, 4 );
-
-
-      if ( FT_RENEW_ARRAY( outline->contours,
-                           outline->max_contours,
-                           new_contours ) )
-        goto Exit;
-
-      outline->max_contours = new_contours;
-    }
-
-    /* then, reallocate the points, segments & edges arrays if needed -- */
-    /* note that we reserved two additional point positions, used to     */
-    /* hint metrics appropriately                                        */
-    /*                                                                   */
-    if ( num_points + 2 > outline->max_points )
-    {
-      FT_Int  news = FT_PAD_CEIL( num_points + 2, 8 );
-      FT_Int  max  = outline->max_points;
-
-
-      if ( FT_RENEW_ARRAY( outline->points,     max,     news     ) ||
-           FT_RENEW_ARRAY( outline->horz_edges, max * 2, news * 2 ) )
-        goto Exit;
-
-      outline->vert_edges = outline->horz_edges + news;
-
-      if ( FT_RENEW_ARRAY( outline->horz_segments, max * 2, news * 2 ) )
-        goto Exit;
-
-      /* readjust some pointers */
-      outline->vert_segments = outline->horz_segments + news;
-      outline->max_points    = news;
-    }
-
-    outline->num_points   = num_points;
-    outline->num_contours = num_contours;
-
-    outline->num_hedges    = 0;
-    outline->num_vedges    = 0;
-    outline->num_hsegments = 0;
-    outline->num_vsegments = 0;
-
-    /* We can't rely on the value of `FT_Outline.flags' to know the fill  */
-    /* direction used for a glyph, given that some fonts are broken (e.g. */
-    /* the Arphic ones).  We thus recompute it each time we need to.      */
-    /*                                                                    */
-    outline->vert_major_dir = AH_DIR_UP;
-    outline->horz_major_dir = AH_DIR_LEFT;
-
-    if ( FT_Outline_Get_Orientation( source ) == FT_ORIENTATION_POSTSCRIPT )
-    {
-      outline->vert_major_dir = AH_DIR_DOWN;
-      outline->horz_major_dir = AH_DIR_RIGHT;
-    }
-
-    outline->x_scale = x_scale;
-    outline->y_scale = y_scale;
-
-    points = outline->points;
-    if ( outline->num_points == 0 )
-      goto Exit;
-
-    {
-      /* do one thing at a time -- it is easier to understand, and */
-      /* the code is clearer                                       */
-      AH_Point  point;
-      AH_Point  point_limit = points + outline->num_points;
-
-
-      /* compute coordinates */
-      {
-        FT_Vector*  vec = source->points;
-
-
-        for ( point = points; point < point_limit; vec++, point++ )
-        {
-          point->fx = vec->x;
-          point->fy = vec->y;
-          point->ox = point->x = FT_MulFix( vec->x, x_scale );
-          point->oy = point->y = FT_MulFix( vec->y, y_scale );
-
-          point->flags = 0;
-        }
-      }
-
-      /* compute Bezier flags */
-      {
-        char*  tag = source->tags;
-
-
-        for ( point = points; point < point_limit; point++, tag++ )
-        {
-          switch ( FT_CURVE_TAG( *tag ) )
-          {
-          case FT_CURVE_TAG_CONIC:
-            point->flags = AH_FLAG_CONIC;
-            break;
-          case FT_CURVE_TAG_CUBIC:
-            point->flags = AH_FLAG_CUBIC;
-            break;
-          default:
-            ;
-          }
-        }
-      }
-
-      /* compute `next' and `prev' */
-      {
-        FT_Int    contour_index;
-        AH_Point  prev;
-        AH_Point  first;
-        AH_Point  end;
-
-
-        contour_index = 0;
-
-        first = points;
-        end   = points + source->contours[0];
-        prev  = end;
-
-        for ( point = points; point < point_limit; point++ )
-        {
-          point->prev = prev;
-          if ( point < end )
-          {
-            point->next = point + 1;
-            prev        = point;
-          }
-          else
-          {
-            point->next = first;
-            contour_index++;
-            if ( point + 1 < point_limit )
-            {
-              end   = points + source->contours[contour_index];
-              first = point + 1;
-              prev  = end;
-            }
-          }
-        }
-      }
-
-      /* set-up the contours array */
-      {
-        AH_Point*  contour       = outline->contours;
-        AH_Point*  contour_limit = contour + outline->num_contours;
-        short*     end           = source->contours;
-        short      idx           = 0;
-
-
-        for ( ; contour < contour_limit; contour++, end++ )
-        {
-          contour[0] = points + idx;
-          idx        = (short)( end[0] + 1 );
-        }
-      }
-
-      /* compute directions of in & out vectors */
-      {
-        for ( point = points; point < point_limit; point++ )
-        {
-          AH_Point   prev;
-          AH_Point   next;
-          FT_Vector  ivec, ovec;
-
-
-          prev   = point->prev;
-          ivec.x = point->fx - prev->fx;
-          ivec.y = point->fy - prev->fy;
-
-          point->in_dir = ah_compute_direction( ivec.x, ivec.y );
-
-          next   = point->next;
-          ovec.x = next->fx - point->fx;
-          ovec.y = next->fy - point->fy;
-
-          point->out_dir = ah_compute_direction( ovec.x, ovec.y );
-
-#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
-          if ( point->flags & ( AH_FLAG_CONIC | AH_FLAG_CUBIC ) )
-          {
-          Is_Weak_Point:
-            point->flags |= AH_FLAG_WEAK_INTERPOLATION;
-          }
-          else if ( point->out_dir == point->in_dir )
-          {
-            AH_Angle  angle_in, angle_out, delta;
-
-
-            if ( point->out_dir != AH_DIR_NONE )
-              goto Is_Weak_Point;
-
-            angle_in  = ah_angle( &ivec );
-            angle_out = ah_angle( &ovec );
-            delta     = angle_in - angle_out;
-
-            if ( delta > AH_PI )
-              delta = AH_2PI - delta;
-
-            if ( delta < 0 )
-              delta = -delta;
-
-            if ( delta < 2 )
-              goto Is_Weak_Point;
-          }
-          else if ( point->in_dir == -point->out_dir )
-            goto Is_Weak_Point;
-#endif
-        }
-      }
-    }
-
-  Exit:
-    return error;
-  }
-
-
-  FT_LOCAL_DEF( void )
-  ah_setup_uv( AH_Outline  outline,
-               AH_UV       source )
-  {
-    AH_Point  point       = outline->points;
-    AH_Point  point_limit = point + outline->num_points;
-
-
-    switch ( source )
-    {
-    case AH_UV_FXY:
-      for ( ; point < point_limit; point++ )
-      {
-        point->u = point->fx;
-        point->v = point->fy;
-      }
-      break;
-
-    case AH_UV_FYX:
-      for ( ; point < point_limit; point++ )
-      {
-        point->u = point->fy;
-        point->v = point->fx;
-      }
-      break;
-
-    case AH_UV_OXY:
-      for ( ; point < point_limit; point++ )
-      {
-        point->u = point->ox;
-        point->v = point->oy;
-      }
-      break;
-
-    case AH_UV_OYX:
-      for ( ; point < point_limit; point++ )
-      {
-        point->u = point->oy;
-        point->v = point->ox;
-      }
-      break;
-
-    case AH_UV_YX:
-      for ( ; point < point_limit; point++ )
-      {
-        point->u = point->y;
-        point->v = point->x;
-      }
-      break;
-
-    case AH_UV_OX:
-      for ( ; point < point_limit; point++ )
-      {
-        point->u = point->x;
-        point->v = point->ox;
-      }
-      break;
-
-    case AH_UV_OY:
-      for ( ; point < point_limit; point++ )
-      {
-        point->u = point->y;
-        point->v = point->oy;
-      }
-      break;
-
-    default:
-      for ( ; point < point_limit; point++ )
-      {
-        point->u = point->x;
-        point->v = point->y;
-      }
-    }
-  }
-
-
-  /* compute all inflex points in a given glyph */
-  static void
-  ah_outline_compute_inflections( AH_Outline  outline )
-  {
-    AH_Point*  contour       = outline->contours;
-    AH_Point*  contour_limit = contour + outline->num_contours;
-
-
-    /* load original coordinates in (u,v) */
-    ah_setup_uv( outline, AH_UV_FXY );
-
-    /* do each contour separately */
-    for ( ; contour < contour_limit; contour++ )
-    {
-      FT_Vector  vec;
-      AH_Point   point = contour[0];
-      AH_Point   first = point;
-      AH_Point   start = point;
-      AH_Point   end   = point;
-      AH_Point   before;
-      AH_Point   after;
-      AH_Angle   angle_in, angle_seg, angle_out;
-      AH_Angle   diff_in, diff_out;
-      FT_Int     finished = 0;
-
-
-      /* compute first segment in contour */
-      first = point;
-
-      start = end = first;
-      do
-      {
-        end = end->next;
-        if ( end == first )
-          goto Skip;
-
-      } while ( end->u == first->u && end->v == first->v );
-
-      vec.x = end->u - start->u;
-      vec.y = end->v - start->v;
-      angle_seg = ah_angle( &vec );
-
-      /* extend the segment start whenever possible */
-      before = start;
-      do
-      {
-        do
-        {
-          start  = before;
-          before = before->prev;
-          if ( before == first )
-            goto Skip;
-
-        } while ( before->u == start->u && before->v == start->v );
-
-        vec.x    = start->u - before->u;
-        vec.y    = start->v - before->v;
-        angle_in = ah_angle( &vec );
-
-      } while ( angle_in == angle_seg );
-
-      first   = start;
-      diff_in = ah_angle_diff( angle_in, angle_seg );
-
-      /* now, process all segments in the contour */
-      do
-      {
-        /* first, extend current segment's end whenever possible */
-        after = end;
-        do
-        {
-          do
-          {
-            end   = after;
-            after = after->next;
-            if ( after == first )
-              finished = 1;
-
-          } while ( end->u == after->u && end->v == after->v );
-
-          vec.x     = after->u - end->u;
-          vec.y     = after->v - end->v;
-          angle_out = ah_angle( &vec );
-
-        } while ( angle_out == angle_seg );
-
-        diff_out = ah_angle_diff( angle_seg, angle_out );
-
-        if ( ( diff_in ^ diff_out ) < 0 )
-        {
-          /* diff_in and diff_out have different signs, we have */
-          /* inflection points here...                          */
-          do
-          {
-            start->flags |= AH_FLAG_INFLECTION;
-            start = start->next;
-
-          } while ( start != end );
-
-          start->flags |= AH_FLAG_INFLECTION;
-        }
-
-        start     = end;
-        end       = after;
-        angle_seg = angle_out;
-        diff_in   = diff_out;
-
-      } while ( !finished );
-
-    Skip:
-      ;
-    }
-  }
-
-
-  FT_LOCAL_DEF( void )
-  ah_outline_compute_segments( AH_Outline  outline )
-  {
-    int           dimension;
-    AH_Segment    segments;
-    FT_Int*       p_num_segments;
-    AH_Direction  segment_dir;
-    AH_Direction  major_dir;
-
-
-    segments       = outline->horz_segments;
-    p_num_segments = &outline->num_hsegments;
-    major_dir      = AH_DIR_RIGHT;      /* This value must be positive! */
-    segment_dir    = major_dir;
-
-    /* set up (u,v) in each point */
-    ah_setup_uv( outline, AH_UV_FYX );
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Point*   contour       =  outline->contours;
-      AH_Point*   contour_limit =  contour + outline->num_contours;
-      AH_Segment  segment       =  segments;
-      FT_Int      num_segments  =  0;
-
-#ifdef AH_HINT_METRICS
-      AH_Point    min_point     =  0;
-      AH_Point    max_point     =  0;
-      FT_Pos      min_coord     =  32000;
-      FT_Pos      max_coord     = -32000;
-#endif
-
-
-      /* do each contour separately */
-      for ( ; contour < contour_limit; contour++ )
-      {
-        AH_Point  point   =  contour[0];
-        AH_Point  last    =  point->prev;
-        int       on_edge =  0;
-        FT_Pos    min_pos =  32000;  /* minimum segment pos != min_coord */
-        FT_Pos    max_pos = -32000;  /* maximum segment pos != max_coord */
-        FT_Bool   passed;
-
-
-#ifdef AH_HINT_METRICS
-        if ( point->u < min_coord )
-        {
-          min_coord = point->u;
-          min_point = point;
-        }
-        if ( point->u > max_coord )
-        {
-          max_coord = point->u;
-          max_point = point;
-        }
-#endif
-
-        if ( point == last )  /* skip singletons -- just in case */
-          continue;
-
-        if ( FT_ABS( last->out_dir )  == major_dir &&
-             FT_ABS( point->out_dir ) == major_dir )
-        {
-          /* we are already on an edge, try to locate its start */
-          last = point;
-
-          for (;;)
-          {
-            point = point->prev;
-            if ( FT_ABS( point->out_dir ) != major_dir )
-            {
-              point = point->next;
-              break;
-            }
-            if ( point == last )
-              break;
-          }
-        }
-
-        last   = point;
-        passed = 0;
-
-        for (;;)
-        {
-          FT_Pos  u, v;
-
-
-          if ( on_edge )
-          {
-            u = point->u;
-            if ( u < min_pos )
-              min_pos = u;
-            if ( u > max_pos )
-              max_pos = u;
-
-            if ( point->out_dir != segment_dir || point == last )
-            {
-              /* we are just leaving an edge; record a new segment! */
-              segment->last = point;
-              segment->pos  = ( min_pos + max_pos ) >> 1;
-
-              /* a segment is round if either its first or last point */
-              /* is a control point                                   */
-              if ( ( segment->first->flags | point->flags ) &
-                     AH_FLAG_CONTROL                        )
-                segment->flags |= AH_EDGE_ROUND;
-
-              /* compute segment size */
-              min_pos = max_pos = point->v;
-
-              v = segment->first->v;
-              if ( v < min_pos )
-                min_pos = v;
-              if ( v > max_pos )
-                max_pos = v;
-
-              segment->min_coord = min_pos;
-              segment->max_coord = max_pos;
-
-              on_edge = 0;
-              num_segments++;
-              segment++;
-              /* fallthrough */
-            }
-          }
-
-          /* now exit if we are at the start/end point */
-          if ( point == last )
-          {
-            if ( passed )
-              break;
-            passed = 1;
-          }
-
-          if ( !on_edge && FT_ABS( point->out_dir ) == major_dir )
-          {
-            /* this is the start of a new segment! */
-            segment_dir = point->out_dir;
-
-            /* clear all segment fields */
-            FT_ZERO( segment );
-
-            segment->dir      = segment_dir;
-            segment->flags    = AH_EDGE_NORMAL;
-            min_pos = max_pos = point->u;
-            segment->first    = point;
-            segment->last     = point;
-            segment->contour  = contour;
-            segment->score    = 32000;
-            segment->link     = NULL;
-            on_edge           = 1;
-
-#ifdef AH_HINT_METRICS
-            if ( point == max_point )
-              max_point = 0;
-
-            if ( point == min_point )
-              min_point = 0;
-#endif
-          }
-
-          point = point->next;
-        }
-
-      } /* contours */
-
-#ifdef AH_HINT_METRICS
-      /* we need to ensure that there are edges on the left-most and  */
-      /* right-most points of the glyph in order to hint the metrics; */
-      /* we do this by inserting fake segments when needed            */
-      if ( dimension == 0 )
-      {
-        AH_Point  point       = outline->points;
-        AH_Point  point_limit = point + outline->num_points;
-
-        FT_Pos    min_pos =  32000;
-        FT_Pos    max_pos = -32000;
-
-
-        min_point = 0;
-        max_point = 0;
-
-        /* compute minimum and maximum points */
-        for ( ; point < point_limit; point++ )
-        {
-          FT_Pos  x = point->fx;
-
-
-          if ( x < min_pos )
-          {
-            min_pos   = x;
-            min_point = point;
-          }
-          if ( x > max_pos )
-          {
-            max_pos   = x;
-            max_point = point;
-          }
-        }
-
-        /* insert minimum segment */
-        if ( min_point )
-        {
-          /* clear all segment fields */
-          FT_ZERO( segment );
-
-          segment->dir   = segment_dir;
-          segment->flags = AH_EDGE_NORMAL;
-          segment->first = min_point;
-          segment->last  = min_point;
-          segment->pos   = min_pos;
-          segment->score = 32000;
-          segment->link  = NULL;
-
-          num_segments++;
-          segment++;
-        }
-
-        /* insert maximum segment */
-        if ( max_point )
-        {
-          /* clear all segment fields */
-          FT_ZERO( segment );
-
-          segment->dir   = segment_dir;
-          segment->flags = AH_EDGE_NORMAL;
-          segment->first = max_point;
-          segment->last  = max_point;
-          segment->pos   = max_pos;
-          segment->score = 32000;
-          segment->link  = NULL;
-
-          num_segments++;
-          segment++;
-        }
-      }
-#endif /* AH_HINT_METRICS */
-
-      *p_num_segments = num_segments;
-
-      segments       = outline->vert_segments;
-      major_dir      = AH_DIR_UP;
-      p_num_segments = &outline->num_vsegments;
-
-      ah_setup_uv( outline, AH_UV_FXY );
-    }
-  }
-
-
-  FT_LOCAL_DEF( void )
-  ah_outline_link_segments( AH_Outline  outline )
-  {
-    AH_Segment    segments;
-    AH_Segment    segment_limit;
-    AH_Direction  major_dir;
-    int           dimension;
-
-
-    segments      = outline->horz_segments;
-    segment_limit = segments + outline->num_hsegments;
-    major_dir     = outline->horz_major_dir;
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Segment  seg1;
-      AH_Segment  seg2;
-
-#if 0
-      /* now compare each segment to the others */
-      for ( seg1 = segments; seg1 < segment_limit; seg1++ )
-      {
-        FT_Pos      best_score;
-        AH_Segment  best_segment;
-
-
-        /* the fake segments are introduced to hint the metrics -- */
-        /* we must never link them to anything                     */
-        if ( seg1->first == seg1->last )
-          continue;
-
-        best_segment = seg1->link;
-        if ( best_segment )
-          best_score = seg1->score;
-        else
-          best_score = +32000;
-
-        for ( seg2 = segments; seg2 < segment_limit; seg2++ )
-          if ( seg1 != seg2 && seg1->dir + seg2->dir == 0 )
-          {
-            FT_Pos   pos1 = seg1->pos;
-            FT_Pos   pos2 = seg2->pos;
-            FT_Bool  is_dir;
-            FT_Bool  is_pos;
-
-
-            /* check that the segments are correctly oriented and */
-            /* positioned to form a black distance                */
-
-            is_dir = (FT_Bool)( seg1->dir == outline->horz_major_dir ||
-                                seg1->dir == outline->vert_major_dir );
-            is_pos = (FT_Bool)( pos1 > pos2 );
-
-            if ( pos1 == pos2 || !(is_dir ^ is_pos) )
-              continue;
-
-            {
-              FT_Pos  min = seg1->min_coord;
-              FT_Pos  max = seg1->max_coord;
-              FT_Pos  len, dist, score;
-
-
-              if ( min < seg2->min_coord )
-                min = seg2->min_coord;
-
-              if ( max > seg2->max_coord )
-                max = seg2->max_coord;
-
-              len = max - min;
-              if ( len >= 8 )
-              {
-                dist = seg2->pos - seg1->pos;
-                if ( dist < 0 )
-                  dist = -dist;
-
-                score = dist + 3000 / len;
-
-                if ( score < best_score )
-                {
-                  best_score   = score;
-                  best_segment = seg2;
-                }
-              }
-            }
-          }
-
-        if ( best_segment )
-        {
-          seg1->link  = best_segment;
-          seg1->score = best_score;
-          best_segment->num_linked++;
-        }
-      }
-#endif /* 0 */
-
-#if 1
-      /* the following code does the same, but much faster! */
-
-      /* now compare each segment to the others */
-      for ( seg1 = segments; seg1 < segment_limit; seg1++ )
-      {
-        /* the fake segments are introduced to hint the metrics -- */
-        /* we must never link them to anything                     */
-        if ( seg1->first == seg1->last || seg1->dir != major_dir )
-          continue;
-
-        for ( seg2 = segments; seg2 < segment_limit; seg2++ )
-          if ( seg2 != seg1 && seg1->dir + seg2->dir == 0 )
-          {
-            FT_Pos  pos1 = seg1->pos;
-            FT_Pos  pos2 = seg2->pos;
-            FT_Pos  dist = pos2 - pos1;
-
-
-            if ( dist < 0 )
-              continue;
-
-            {
-              FT_Pos  min = seg1->min_coord;
-              FT_Pos  max = seg1->max_coord;
-              FT_Pos  len, score;
-
-
-              if ( min < seg2->min_coord )
-                min = seg2->min_coord;
-
-              if ( max > seg2->max_coord )
-                max = seg2->max_coord;
-
-              len = max - min;
-              if ( len >= 8 )
-              {
-                score = dist + 3000 / len;
-
-                if ( score < seg1->score )
-                {
-                  seg1->score = score;
-                  seg1->link  = seg2;
-                }
-
-                if ( score < seg2->score )
-                {
-                  seg2->score = score;
-                  seg2->link  = seg1;
-                }
-              }
-            }
-          }
-      }
-#endif /* 1 */
-
-      /* now, compute the `serif' segments */
-      for ( seg1 = segments; seg1 < segment_limit; seg1++ )
-      {
-        seg2 = seg1->link;
-
-        if ( seg2 )
-        {
-          seg2->num_linked++;
-          if ( seg2->link != seg1 )
-          {
-            seg1->link  = 0;
-            seg1->serif = seg2->link;
-          }
-        }
-      }
-
-      segments      = outline->vert_segments;
-      segment_limit = segments + outline->num_vsegments;
-      major_dir     = outline->vert_major_dir;
-    }
-  }
-
-
-  static void
-  ah_outline_compute_edges( AH_Outline  outline )
-  {
-    AH_Edge       edges;
-    AH_Segment    segments;
-    AH_Segment    segment_limit;
-    AH_Direction  up_dir;
-    FT_Int*       p_num_edges;
-    FT_Int        dimension;
-    FT_Fixed      scale;
-    FT_Pos        edge_distance_threshold;
-
-
-    edges         = outline->horz_edges;
-    segments      = outline->horz_segments;
-    segment_limit = segments + outline->num_hsegments;
-    p_num_edges   = &outline->num_hedges;
-    up_dir        = AH_DIR_RIGHT;
-    scale         = outline->y_scale;
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Edge     edge;
-      AH_Edge     edge_limit;  /* really == edge + num_edges */
-      AH_Segment  seg;
-
-
-      /*********************************************************************/
-      /*                                                                   */
-      /* We will begin by generating a sorted table of edges for the       */
-      /* current direction.  To do so, we simply scan each segment and try */
-      /* to find an edge in our table that corresponds to its position.    */
-      /*                                                                   */
-      /* If no edge is found, we create and insert a new edge in the       */
-      /* sorted table.  Otherwise, we simply add the segment to the edge's */
-      /* list which will be processed in the second step to compute the    */
-      /* edge's properties.                                                */
-      /*                                                                   */
-      /* Note that the edges table is sorted along the segment/edge        */
-      /* position.                                                         */
-      /*                                                                   */
-      /*********************************************************************/
-
-      edge_distance_threshold = FT_MulFix( outline->edge_distance_threshold,
-                                           scale );
-      if ( edge_distance_threshold > 64 / 4 )
-        edge_distance_threshold = 64 / 4;
-
-      edge_distance_threshold = FT_DivFix( edge_distance_threshold,
-                                           scale );
-
-      edge_limit = edges;
-      for ( seg = segments; seg < segment_limit; seg++ )
-      {
-        AH_Edge  found = 0;
-
-
-        /* look for an edge corresponding to the segment */
-        for ( edge = edges; edge < edge_limit; edge++ )
-        {
-          FT_Pos  dist;
-
-
-          dist = seg->pos - edge->fpos;
-          if ( dist < 0 )
-            dist = -dist;
-
-          if ( dist < edge_distance_threshold )
-          {
-            found = edge;
-            break;
-          }
-        }
-
-        if ( !found )
-        {
-          /* insert a new edge in the list and */
-          /* sort according to the position    */
-          while ( edge > edges && edge[-1].fpos > seg->pos )
-          {
-            edge[0] = edge[-1];
-            edge--;
-          }
-          edge_limit++;
-
-          /* clear all edge fields */
-          FT_MEM_ZERO( edge, sizeof ( *edge ) );
-
-          /* add the segment to the new edge's list */
-          edge->first    = seg;
-          edge->last     = seg;
-          edge->fpos     = seg->pos;
-          edge->opos     = edge->pos = FT_MulFix( seg->pos, scale );
-          seg->edge_next = seg;
-        }
-        else
-        {
-          /* if an edge was found, simply add the segment to the edge's */
-          /* list                                                       */
-          seg->edge_next        = edge->first;
-          edge->last->edge_next = seg;
-          edge->last            = seg;
-        }
-      }
-      *p_num_edges = (FT_Int)( edge_limit - edges );
-
-
-      /*********************************************************************/
-      /*                                                                   */
-      /* Good, we will now compute each edge's properties according to     */
-      /* segments found on its position.  Basically, these are:            */
-      /*                                                                   */
-      /*  - edge's main direction                                          */
-      /*  - stem edge, serif edge or both (which defaults to stem then)    */
-      /*  - rounded edge, straight or both (which defaults to straight)    */
-      /*  - link for edge                                                  */
-      /*                                                                   */
-      /*********************************************************************/
-
-      /* first of all, set the `edge' field in each segment -- this is */
-      /* required in order to compute edge links                       */
-
-      /* Note that I've tried to remove this loop, setting
-       * the "edge" field of each segment directly in the
-       * code above.  For some reason, it slows down execution
-       * speed -- on a Sun.
-       */
-      for ( edge = edges; edge < edge_limit; edge++ )
-      {
-        seg = edge->first;
-        if ( seg )
-          do
-          {
-            seg->edge = edge;
-            seg       = seg->edge_next;
-          }
-          while ( seg != edge->first );
-      }
-
-      /* now, compute each edge properties */
-      for ( edge = edges; edge < edge_limit; edge++ )
-      {
-        FT_Int  is_round    = 0;  /* does it contain round segments?    */
-        FT_Int  is_straight = 0;  /* does it contain straight segments? */
-        FT_Pos  ups         = 0;  /* number of upwards segments         */
-        FT_Pos  downs       = 0;  /* number of downwards segments       */
-
-
-        seg = edge->first;
-
-        do
-        {
-          FT_Bool  is_serif;
-
-
-          /* check for roundness of segment */
-          if ( seg->flags & AH_EDGE_ROUND )
-            is_round++;
-          else
-            is_straight++;
-
-          /* check for segment direction */
-          if ( seg->dir == up_dir )
-            ups   += seg->max_coord-seg->min_coord;
-          else
-            downs += seg->max_coord-seg->min_coord;
-
-          /* check for links -- if seg->serif is set, then seg->link must */
-          /* be ignored                                                   */
-          is_serif = (FT_Bool)( seg->serif && seg->serif->edge != edge );
-
-          if ( seg->link || is_serif )
-          {
-            AH_Edge     edge2;
-            AH_Segment  seg2;
-
-
-            edge2 = edge->link;
-            seg2  = seg->link;
-
-            if ( is_serif )
-            {
-              seg2  = seg->serif;
-              edge2 = edge->serif;
-            }
-
-            if ( edge2 )
-            {
-              FT_Pos  edge_delta;
-              FT_Pos  seg_delta;
-
-
-              edge_delta = edge->fpos - edge2->fpos;
-              if ( edge_delta < 0 )
-                edge_delta = -edge_delta;
-
-              seg_delta = seg->pos - seg2->pos;
-              if ( seg_delta < 0 )
-                seg_delta = -seg_delta;
-
-              if ( seg_delta < edge_delta )
-                edge2 = seg2->edge;
-            }
-            else
-              edge2 = seg2->edge;
-
-#ifdef FT_CONFIG_CHESTER_SERIF
-            if ( is_serif )
-            {
-              edge->serif   = edge2;
-              edge2->flags |= AH_EDGE_SERIF;
-            }
-            else
-              edge->link  = edge2;
-#else /* !FT_CONFIG_CHESTER_SERIF */
-            if ( is_serif )
-              edge->serif = edge2;
-            else
-              edge->link  = edge2;
-#endif /* !FT_CONFIG_CHESTER_SERIF */
-          }
-
-          seg = seg->edge_next;
-
-        } while ( seg != edge->first );
-
-        /* set the round/straight flags */
-        edge->flags = AH_EDGE_NORMAL;
-
-        if ( is_round > 0 && is_round >= is_straight )
-          edge->flags |= AH_EDGE_ROUND;
-
-        /* set the edge's main direction */
-        edge->dir = AH_DIR_NONE;
-
-        if ( ups > downs )
-          edge->dir = up_dir;
-
-        else if ( ups < downs )
-          edge->dir = -up_dir;
-
-        else if ( ups == downs )
-          edge->dir = 0;  /* both up and down! */
-
-        /* gets rid of serifs if link is set                */
-        /* XXX: This gets rid of many unpleasant artefacts! */
-        /*      Example: the `c' in cour.pfa at size 13     */
-
-        if ( edge->serif && edge->link )
-          edge->serif = 0;
-      }
-
-      edges         = outline->vert_edges;
-      segments      = outline->vert_segments;
-      segment_limit = segments + outline->num_vsegments;
-      p_num_edges   = &outline->num_vedges;
-      up_dir        = AH_DIR_UP;
-      scale         = outline->x_scale;
-    }
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ah_outline_detect_features                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Performs feature detection on a given AH_OutlineRec object.        */
-  /*                                                                       */
-  FT_LOCAL_DEF( void )
-  ah_outline_detect_features( AH_Outline  outline )
-  {
-    ah_outline_compute_segments   ( outline );
-    ah_outline_link_segments      ( outline );
-    ah_outline_compute_edges      ( outline );
-    ah_outline_compute_inflections( outline );
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ah_outline_compute_blue_edges                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Computes the `blue edges' in a given outline (i.e. those that must */
-  /*    be snapped to a blue zone edge (top or bottom).                    */
-  /*                                                                       */
-  FT_LOCAL_DEF( void )
-  ah_outline_compute_blue_edges( AH_Outline       outline,
-                                 AH_Face_Globals  face_globals )
-  {
-    AH_Edge     edge       = outline->horz_edges;
-    AH_Edge     edge_limit = edge + outline->num_hedges;
-    AH_Globals  globals    = &face_globals->design;
-    FT_Fixed    y_scale    = outline->y_scale;
-
-    FT_Bool     blue_active[AH_BLUE_MAX];
-
-
-    /* compute which blue zones are active, i.e. have their scaled */
-    /* size < 3/4 pixels                                           */
-    {
-      AH_Blue  blue;
-      FT_Bool  check = 0;
-
-
-      for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
-      {
-        FT_Pos  ref, shoot, dist;
-
-
-        ref   = globals->blue_refs[blue];
-        shoot = globals->blue_shoots[blue];
-        dist  = ref - shoot;
-        if ( dist < 0 )
-          dist = -dist;
-
-        blue_active[blue] = 0;
-
-        if ( FT_MulFix( dist, y_scale ) < 48 )
-        {
-          blue_active[blue] = 1;
-          check = 1;
-        }
-      }
-
-      /* return immediately if no blue zone is active */
-      if ( !check )
-        return;
-    }
-
-    /* for each horizontal edge search the blue zone which is closest */
-    for ( ; edge < edge_limit; edge++ )
-    {
-      AH_Blue  blue;
-      FT_Pos*  best_blue = 0;
-      FT_Pos   best_dist;  /* initial threshold */
-
-
-      /* compute the initial threshold as a fraction of the EM size */
-      best_dist = FT_MulFix( face_globals->face->units_per_EM / 40, y_scale );
-
-#ifdef FT_CONFIG_CHESTER_SMALL_F
-      if ( best_dist > 64 / 2 )
-        best_dist = 64 / 2;
-#else
-      if ( best_dist > 64 / 4 )
-        best_dist = 64 / 4;
-#endif
-
-      for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
-      {
-        /* if it is a top zone, check for right edges -- if it is a bottom */
-        /* zone, check for left edges                                      */
-        /*                                                                 */
-        /* of course, that's for TrueType XXX                              */
-        FT_Bool  is_top_blue  =
-                   FT_BOOL( AH_IS_TOP_BLUE( blue ) );
-        FT_Bool  is_major_dir =
-                   FT_BOOL( edge->dir == outline->horz_major_dir );
-
-
-        if ( !blue_active[blue] )
-          continue;
-
-        /* if it is a top zone, the edge must be against the major    */
-        /* direction; if it is a bottom zone, it must be in the major */
-        /* direction                                                  */
-        if ( is_top_blue ^ is_major_dir )
-        {
-          FT_Pos   dist;
-          FT_Pos*  blue_pos = globals->blue_refs + blue;
-
-
-          /* first of all, compare it to the reference position */
-          dist = edge->fpos - *blue_pos;
-          if ( dist < 0 )
-            dist = -dist;
-
-          dist = FT_MulFix( dist, y_scale );
-          if ( dist < best_dist )
-          {
-            best_dist = dist;
-            best_blue = blue_pos;
-          }
-
-          /* now, compare it to the overshoot position if the edge is     */
-          /* rounded, and if the edge is over the reference position of a */
-          /* top zone, or under the reference position of a bottom zone   */
-          if ( edge->flags & AH_EDGE_ROUND && dist != 0 )
-          {
-            FT_Bool  is_under_ref = FT_BOOL( edge->fpos < *blue_pos );
-
-
-            if ( is_top_blue ^ is_under_ref )
-            {
-              blue_pos = globals->blue_shoots + blue;
-              dist = edge->fpos - *blue_pos;
-              if ( dist < 0 )
-                dist = -dist;
-
-              dist = FT_MulFix( dist, y_scale );
-              if ( dist < best_dist )
-              {
-                best_dist = dist;
-                best_blue = blue_pos;
-              }
-            }
-          }
-        }
-      }
-
-      if ( best_blue )
-        edge->blue_edge = best_blue;
-    }
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ah_outline_scale_blue_edges                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    This function must be called before hinting in order to re-adjust  */
-  /*    the contents of the detected edges (basically change the `blue     */
-  /*    edge' pointer from `design units' to `scaled ones').               */
-  /*                                                                       */
-  FT_LOCAL_DEF( void )
-  ah_outline_scale_blue_edges( AH_Outline       outline,
-                               AH_Face_Globals  globals )
-  {
-    AH_Edge  edge       = outline->horz_edges;
-    AH_Edge  edge_limit = edge + outline->num_hedges;
-    FT_Pos   delta;
-
-
-    delta = globals->scaled.blue_refs - globals->design.blue_refs;
-
-    for ( ; edge < edge_limit; edge++ )
-    {
-      if ( edge->blue_edge )
-        edge->blue_edge += delta;
-    }
-  }
-
-
-/* END */
diff --git a/src/autohint/ahglyph.h b/src/autohint/ahglyph.h
deleted file mode 100644
index b346cbe..0000000
--- a/src/autohint/ahglyph.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahglyph.h                                                              */
-/*                                                                         */
-/*    Routines used to load and analyze a given glyph before hinting       */
-/*    (specification).                                                     */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002 Catharon Productions Inc.                    */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __AHGLYPH_H__
-#define __AHGLYPH_H__
-
-
-#include <ft2build.h>
-#include "ahtypes.h"
-
-
-FT_BEGIN_HEADER
-
-
-  typedef enum  AH_UV_
-  {
-    AH_UV_FXY,
-    AH_UV_FYX,
-    AH_UV_OXY,
-    AH_UV_OYX,
-    AH_UV_OX,
-    AH_UV_OY,
-    AH_UV_YX,
-    AH_UV_XY  /* should always be last! */
-
-  } AH_UV;
-
-
-  FT_LOCAL( void )
-  ah_setup_uv( AH_Outline  outline,
-               AH_UV       source );
-
-
-  /* AH_OutlineRec functions - they should be typically called in this order */
-
-  FT_LOCAL( FT_Error )
-  ah_outline_new( FT_Memory    memory,
-                  AH_Outline*  aoutline );
-
-  FT_LOCAL( FT_Error )
-  ah_outline_load( AH_Outline  outline,
-                   FT_Fixed    x_scale,
-                   FT_Fixed    y_scale,
-                   FT_Face     face );
-
-  FT_LOCAL( void )
-  ah_outline_compute_segments( AH_Outline  outline );
-
-  FT_LOCAL( void )
-  ah_outline_link_segments( AH_Outline  outline );
-
-  FT_LOCAL( void )
-  ah_outline_detect_features( AH_Outline  outline );
-
-  FT_LOCAL( void )
-  ah_outline_compute_blue_edges( AH_Outline       outline,
-                                 AH_Face_Globals  globals );
-
-  FT_LOCAL( void )
-  ah_outline_scale_blue_edges( AH_Outline       outline,
-                               AH_Face_Globals  globals );
-
-  FT_LOCAL( void )
-  ah_outline_save( AH_Outline  outline,
-                   AH_Loader   loader );
-
-  FT_LOCAL( void )
-  ah_outline_done( AH_Outline  outline );
-
-
-FT_END_HEADER
-
-#endif /* __AHGLYPH_H__ */
-
-
-/* END */
diff --git a/src/autohint/ahhint.c b/src/autohint/ahhint.c
deleted file mode 100644
index 013b951..0000000
--- a/src/autohint/ahhint.c
+++ /dev/null
@@ -1,1937 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahhint.c                                                               */
-/*                                                                         */
-/*    Glyph hinter (body).                                                 */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc.        */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#include <ft2build.h>
-#include "ahhint.h"
-#include "ahglyph.h"
-#include "ahangles.h"
-#include "aherrors.h"
-#include FT_OUTLINE_H
-
-
-#define FACE_GLOBALS( face )  ( (AH_Face_Globals)(face)->autohint.data )
-
-#define AH_USE_IUP
-#define OPTIM_STEM_SNAP
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****   Hinting routines                                              ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  /* snap a given width in scaled coordinates to one of the */
-  /* current standard widths                                */
-  static FT_Pos
-  ah_snap_width( FT_Pos*  widths,
-                 FT_Int   count,
-                 FT_Pos   width )
-  {
-    int     n;
-    FT_Pos  best      = 64 + 32 + 2;
-    FT_Pos  reference = width;
-    FT_Pos  scaled;
-
-
-    for ( n = 0; n < count; n++ )
-    {
-      FT_Pos  w;
-      FT_Pos  dist;
-
-
-      w = widths[n];
-      dist = width - w;
-      if ( dist < 0 )
-        dist = -dist;
-      if ( dist < best )
-      {
-        best      = dist;
-        reference = w;
-      }
-    }
-
-    scaled = FT_PIX_ROUND( reference );
-
-    if ( width >= reference )
-    {
-      if ( width < scaled + 48 )
-        width = reference;
-    }
-    else
-    {
-      if ( width > scaled - 48 )
-        width = reference;
-    }
-
-    return width;
-  }
-
-
-  /* compute the snapped width of a given stem */
-
-#ifdef FT_CONFIG_CHESTER_SERIF
-
-  static FT_Pos
-  ah_compute_stem_width( AH_Hinter      hinter,
-                         int            vertical,
-                         FT_Pos         width,
-                         AH_Edge_Flags  base_flags,
-                         AH_Edge_Flags  stem_flags )
-  {
-    AH_Globals  globals = &hinter->globals->scaled;
-    FT_Pos      dist    = width;
-    FT_Int      sign    = 0;
-
-
-    if ( dist < 0 )
-    {
-      dist = -width;
-      sign = 1;
-    }
-
-    if ( !hinter->do_stem_adjust )
-    {
-      /* leave stem widths unchanged */
-    }
-    else if ( (  vertical && !hinter->do_vert_snapping ) ||
-              ( !vertical && !hinter->do_horz_snapping ) )
-    {
-      /* smooth hinting process: very lightly quantize the stem width */
-      /*                                                              */
-
-      /* leave the widths of serifs alone */
-
-      if ( ( stem_flags & AH_EDGE_SERIF ) && vertical && ( dist < 3 * 64 ) )
-        goto Done_Width;
-
-      else if ( ( base_flags & AH_EDGE_ROUND ) )
-      {
-        if ( dist < 80 )
-          dist = 64;
-      }
-      else if ( dist < 56 )
-        dist = 56;
-
-      {
-        FT_Pos  delta = dist - globals->stds[vertical];
-
-
-        if ( delta < 0 )
-          delta = -delta;
-
-        if ( delta < 40 )
-        {
-          dist = globals->stds[vertical];
-          if ( dist < 48 )
-            dist = 48;
-
-          goto Done_Width;
-        }
-
-        if ( dist < 3 * 64 )
-        {
-          delta  = dist & 63;
-          dist  &= -64;
-
-          if ( delta < 10 )
-            dist += delta;
-
-          else if ( delta < 32 )
-            dist += 10;
-
-          else if ( delta < 54 )
-            dist += 54;
-
-          else
-            dist += delta;
-        }
-        else
-          dist = ( dist + 32 ) & ~63;
-      }
-    }
-    else
-    {
-      /* strong hinting process: snap the stem width to integer pixels */
-      /*                                                               */
-      if ( vertical )
-      {
-        dist = ah_snap_width( globals->heights, globals->num_heights, dist );
-
-        /* in the case of vertical hinting, always round */
-        /* the stem heights to integer pixels            */
-        if ( dist >= 64 )
-          dist = ( dist + 16 ) & ~63;
-        else
-          dist = 64;
-      }
-      else
-      {
-        dist = ah_snap_width( globals->widths, globals->num_widths, dist );
-
-        if ( hinter->flags & AH_HINTER_MONOCHROME )
-        {
-          /* monochrome horizontal hinting: snap widths to integer pixels */
-          /* with a different threshold                                   */
-          if ( dist < 64 )
-            dist = 64;
-          else
-            dist = ( dist + 32 ) & ~63;
-        }
-        else
-        {
-          /* for horizontal anti-aliased hinting, we adopt a more subtle */
-          /* approach: we strengthen small stems, round stems whose size */
-          /* is between 1 and 2 pixels to an integer, otherwise nothing  */
-          if ( dist < 48 )
-            dist = ( dist + 64 ) >> 1;
-
-          else if ( dist < 128 )
-            dist = ( dist + 22 ) & ~63;
-          else
-            /* XXX: round otherwise to prevent color fringes in LCD mode */
-            dist = ( dist + 32 ) & ~63;
-        }
-      }
-    }
-
-  Done_Width:
-    if ( sign )
-      dist = -dist;
-
-    return dist;
-  }
-
-#else /* !FT_CONFIG_CHESTER_SERIF */
-
-  static FT_Pos
-  ah_compute_stem_width( AH_Hinter  hinter,
-                         int        vertical,
-                         FT_Pos     width )
-  {
-    AH_Globals  globals = &hinter->globals->scaled;
-    FT_Pos      dist    = width;
-    FT_Int      sign    = 0;
-
-
-    if ( dist < 0 )
-    {
-      dist = -width;
-      sign = 1;
-    }
-
-    if ( !hinter->do_stem_adjust )
-    {
-      /* leave stem widths unchanged */
-    }
-    else if ( (  vertical && !hinter->do_vert_snapping ) ||
-              ( !vertical && !hinter->do_horz_snapping ) )
-    {
-      /* smooth hinting process: very lightly quantize the stem width */
-      /*                                                              */
-      if ( dist < 64 )
-        dist = 64;
-
-      {
-        FT_Pos  delta = dist - globals->stds[vertical];
-
-
-        if ( delta < 0 )
-          delta = -delta;
-
-        if ( delta < 40 )
-        {
-          dist = globals->stds[vertical];
-          if ( dist < 48 )
-            dist = 48;
-        }
-
-        if ( dist < 3 * 64 )
-        {
-          delta  = dist & 63;
-          dist  &= -64;
-
-          if ( delta < 10 )
-            dist += delta;
-
-          else if ( delta < 32 )
-            dist += 10;
-
-          else if ( delta < 54 )
-            dist += 54;
-
-          else
-            dist += delta;
-        }
-        else
-          dist = ( dist + 32 ) & ~63;
-      }
-    }
-    else
-    {
-      /* strong hinting process: snap the stem width to integer pixels */
-      /*                                                               */
-      if ( vertical )
-      {
-        dist = ah_snap_width( globals->heights, globals->num_heights, dist );
-
-        /* in the case of vertical hinting, always round */
-        /* the stem heights to integer pixels            */
-        if ( dist >= 64 )
-          dist = ( dist + 16 ) & ~63;
-        else
-          dist = 64;
-      }
-      else
-      {
-        dist = ah_snap_width( globals->widths, globals->num_widths, dist );
-
-        if ( hinter->flags & AH_HINTER_MONOCHROME )
-        {
-          /* monochrome horizontal hinting: snap widths to integer pixels */
-          /* with a different threshold                                   */
-          if ( dist < 64 )
-            dist = 64;
-          else
-            dist = ( dist + 32 ) & ~63;
-        }
-        else
-        {
-          /* for horizontal anti-aliased hinting, we adopt a more subtle */
-          /* approach: we strengthen small stems, round stems whose size */
-          /* is between 1 and 2 pixels to an integer, otherwise nothing  */
-          if ( dist < 48 )
-            dist = ( dist + 64 ) >> 1;
-
-          else if ( dist < 128 )
-            dist = ( dist + 22 ) & ~63;
-          else
-            /* XXX: round otherwise to prevent color fringes in LCD mode */
-            dist = ( dist + 32 ) & ~63;
-        }
-      }
-    }
-
-    if ( sign )
-      dist = -dist;
-
-    return dist;
-  }
-
-#endif /* !FT_CONFIG_CHESTER_SERIF */
-
-
-  /* align one stem edge relative to the previous stem edge */
-  static void
-  ah_align_linked_edge( AH_Hinter  hinter,
-                        AH_Edge    base_edge,
-                        AH_Edge    stem_edge,
-                        int        vertical )
-  {
-    FT_Pos  dist = stem_edge->opos - base_edge->opos;
-
-#ifdef FT_CONFIG_CHESTER_SERIF
-
-    FT_Pos  fitted_width = ah_compute_stem_width( hinter,
-                                                  vertical,
-                                                  dist,
-                                                  base_edge->flags,
-                                                  stem_edge->flags );
-
-
-    stem_edge->pos = base_edge->pos + fitted_width;
-
-#else
-
-    stem_edge->pos = base_edge->pos +
-                     ah_compute_stem_width( hinter, vertical, dist );
-
-#endif
-
-  }
-
-
-  static void
-  ah_align_serif_edge( AH_Hinter  hinter,
-                       AH_Edge    base,
-                       AH_Edge    serif,
-                       int        vertical )
-  {
-    FT_Pos  dist;
-    FT_Pos  sign = 1;
-
-    FT_UNUSED( hinter );
-    FT_UNUSED( vertical );
-
-
-    dist = serif->opos - base->opos;
-    if ( dist < 0 )
-    {
-      dist = -dist;
-      sign = -1;
-    }
-
-#if 0
-    /* do not touch serifs widths! */
-    if ( base->flags & AH_EDGE_DONE )
-    {
-      if ( dist >= 64 )
-        dist = ( dist + 8 ) & ~63;
-
-      else if ( dist <= 32 && !vertical )
-        dist = ( dist + 33 ) >> 1;
-
-      else
-        dist = 0;
-    }
-#endif
-
-    serif->pos = base->pos + sign * dist;
-  }
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****       E D G E   H I N T I N G                                   ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  FT_LOCAL_DEF( void )
-  ah_hinter_hint_edges( AH_Hinter  hinter )
-  {
-    AH_Edge     edges;
-    AH_Edge     edge_limit;
-    AH_Outline  outline = hinter->glyph;
-    FT_Int      dimension;
-    FT_Int      n_edges;
-
-
-    edges      = outline->horz_edges;
-    edge_limit = edges + outline->num_hedges;
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Edge  edge;
-      AH_Edge  anchor = 0;
-      int      has_serifs = 0;
-
-
-      if ( !hinter->do_horz_hints && !dimension )
-        goto Next_Dimension;
-
-      if ( !hinter->do_vert_hints && dimension )
-        goto Next_Dimension;
-
-      /* we begin by aligning all stems relative to the blue zone */
-      /* if needed -- that's only for horizontal edges            */
-      if ( dimension )
-      {
-        for ( edge = edges; edge < edge_limit; edge++ )
-        {
-          FT_Pos*      blue;
-          AH_EdgeRec  *edge1, *edge2;
-
-
-          if ( edge->flags & AH_EDGE_DONE )
-            continue;
-
-          blue  = edge->blue_edge;
-          edge1 = 0;
-          edge2 = edge->link;
-
-          if ( blue )
-          {
-            edge1 = edge;
-          }
-          else if ( edge2 && edge2->blue_edge )
-          {
-            blue  = edge2->blue_edge;
-            edge1 = edge2;
-            edge2 = edge;
-          }
-
-          if ( !edge1 )
-            continue;
-
-          edge1->pos    = blue[0];
-          edge1->flags |= AH_EDGE_DONE;
-
-          if ( edge2 && !edge2->blue_edge )
-          {
-            ah_align_linked_edge( hinter, edge1, edge2, dimension );
-            edge2->flags |= AH_EDGE_DONE;
-          }
-
-          if ( !anchor )
-            anchor = edge;
-        }
-      }
-
-      /* now we will align all stem edges, trying to maintain the */
-      /* relative order of stems in the glyph                     */
-      for ( edge = edges; edge < edge_limit; edge++ )
-      {
-        AH_EdgeRec*  edge2;
-
-
-        if ( edge->flags & AH_EDGE_DONE )
-          continue;
-
-        /* skip all non-stem edges */
-        edge2 = edge->link;
-        if ( !edge2 )
-        {
-          has_serifs++;
-          continue;
-        }
-
-        /* now align the stem */
-
-        /* this should not happen, but it's better to be safe */
-        if ( edge2->blue_edge || edge2 < edge )
-        {
-          ah_align_linked_edge( hinter, edge2, edge, dimension );
-          edge->flags |= AH_EDGE_DONE;
-          continue;
-        }
-
-        if ( !anchor )
-        {
-
-#ifdef FT_CONFIG_CHESTER_STEM
-
-          FT_Pos  org_len, org_center, cur_len;
-          FT_Pos  cur_pos1, error1, error2, u_off, d_off;
-
-
-          org_len = edge2->opos - edge->opos;
-          cur_len = ah_compute_stem_width( hinter, dimension, org_len,
-                                           edge->flags, edge2->flags );
-
-          if ( cur_len <= 64 )
-            u_off = d_off = 32;
-          else
-          {
-            u_off = 38;
-            d_off = 26;
-          }
-
-          if ( cur_len < 96 )
-          {
-            org_center = edge->opos + ( org_len >> 1 );
-
-            cur_pos1   = FT_PIX_ROUND( org_center );
-
-            error1 = org_center - ( cur_pos1 - u_off );
-            if ( error1 < 0 )
-              error1 = -error1;
-
-            error2 = org_center - ( cur_pos1 + d_off );
-            if ( error2 < 0 )
-              error2 = -error2;
-
-            if ( error1 < error2 )
-              cur_pos1 -= u_off;
-            else
-              cur_pos1 += d_off;
-
-            edge->pos  = cur_pos1 - cur_len / 2;
-            edge2->pos = cur_pos1 + cur_len / 2;
-
-          }
-          else
-            edge->pos = FT_PIX_ROUND( edge->opos );
-
-          anchor = edge;
-
-          edge->flags |= AH_EDGE_DONE;
-
-          ah_align_linked_edge( hinter, edge, edge2, dimension );
-
-#else /* !FT_CONFIG_CHESTER_STEM */
-
-          edge->pos = FT_PIX_ROUND( edge->opos );
-          anchor    = edge;
-
-          edge->flags |= AH_EDGE_DONE;
-
-          ah_align_linked_edge( hinter, edge, edge2, dimension );
-
-#endif /* !FT_CONFIG_CHESTER_STEM */
-
-        }
-        else
-        {
-          FT_Pos  org_pos, org_len, org_center, cur_len;
-          FT_Pos  cur_pos1, cur_pos2, delta1, delta2;
-
-
-          org_pos    = anchor->pos + ( edge->opos - anchor->opos );
-          org_len    = edge2->opos - edge->opos;
-          org_center = org_pos + ( org_len >> 1 );
-
-#ifdef FT_CONFIG_CHESTER_SERIF
-
-          cur_len = ah_compute_stem_width( hinter, dimension, org_len,
-                                           edge->flags, edge2->flags  );
-
-
-#else  /* !FT_CONFIG_CHESTER_SERIF */
-
-          cur_len = ah_compute_stem_width( hinter, dimension, org_len );
-
-#endif /* !FT_CONFIG_CHESTER_SERIF */
-
-#ifdef FT_CONFIG_CHESTER_STEM
-
-          if ( cur_len < 96 )
-          {
-            FT_Pos  u_off, d_off;
-
-
-            cur_pos1 = FT_PIX_ROUND( org_center );
-
-            if (cur_len <= 64 )
-              u_off = d_off = 32;
-            else
-            {
-              u_off = 38;
-              d_off = 26;
-            }
-
-            delta1 = org_center - ( cur_pos1 - u_off );
-            if ( delta1 < 0 )
-              delta1 = -delta1;
-
-            delta2 = org_center - ( cur_pos1 + d_off );
-            if ( delta2 < 0 )
-              delta2 = -delta2;
-
-            if ( delta1 < delta2 )
-              cur_pos1 -= u_off;
-            else
-              cur_pos1 += d_off;
-
-            edge->pos  = cur_pos1 - cur_len / 2;
-            edge2->pos = cur_pos1 + cur_len / 2;
-          }
-          else
-          {
-            org_pos    = anchor->pos + ( edge->opos - anchor->opos );
-            org_len    = edge2->opos - edge->opos;
-            org_center = org_pos + ( org_len >> 1 );
-
-            cur_len    = ah_compute_stem_width( hinter, dimension, org_len,
-                                                edge->flags, edge2->flags );
-
-            cur_pos1   = FT_PIX_ROUND( org_pos );
-            delta1     = ( cur_pos1 + ( cur_len >> 1 ) - org_center );
-            if ( delta1 < 0 )
-              delta1 = -delta1;
-
-            cur_pos2   = FT_PIX_ROUND( org_pos + org_len ) - cur_len;
-            delta2     = ( cur_pos2 + ( cur_len >> 1 ) - org_center );
-            if ( delta2 < 0 )
-              delta2 = -delta2;
-
-            edge->pos  = ( delta1 < delta2 ) ? cur_pos1 : cur_pos2;
-            edge2->pos = edge->pos + cur_len;
-          }
-
-#else /* !FT_CONFIG_CHESTER_STEM */
-
-          cur_pos1   = FT_PIX_ROUND( org_pos );
-          delta1     = ( cur_pos1 + ( cur_len >> 1 ) - org_center );
-          if ( delta1 < 0 )
-            delta1 = -delta1;
-
-          cur_pos2   = FT_PIX_ROUND( org_pos + org_len ) - cur_len;
-          delta2     = ( cur_pos2 + ( cur_len >> 1 ) - org_center );
-          if ( delta2 < 0 )
-            delta2 = -delta2;
-
-          edge->pos  = ( delta1 <= delta2 ) ? cur_pos1 : cur_pos2;
-          edge2->pos = edge->pos + cur_len;
-
-#endif /* !FT_CONFIG_CHESTER_STEM */
-
-          edge->flags  |= AH_EDGE_DONE;
-          edge2->flags |= AH_EDGE_DONE;
-
-          if ( edge > edges && edge->pos < edge[-1].pos )
-            edge->pos = edge[-1].pos;
-        }
-      }
-
-      /* make sure that lowercase m's maintain their symmetry */
-
-      /* In general, lowercase m's have six vertical edges if they are sans */
-      /* serif, or twelve if they are avec serif.  This implementation is   */
-      /* based on that assumption, and seems to work very well with most    */
-      /* faces.  However, if for a certain face this assumption is not      */
-      /* true, the m is just rendered like before.  In addition, any stem   */
-      /* correction will only be applied to symmetrical glyphs (even if the */
-      /* glyph is not an m), so the potential for unwanted distortion is    */
-      /* relatively low.                                                    */
-
-      /* We don't handle horizontal edges since we can't easily assure that */
-      /* the third (lowest) stem aligns with the base line; it might end up */
-      /* one pixel higher or lower.                                         */
-
-      n_edges = (FT_Int)( edge_limit - edges );
-      if ( !dimension && ( n_edges == 6 || n_edges == 12 ) )
-      {
-        AH_EdgeRec  *edge1, *edge2, *edge3;
-        FT_Pos       dist1, dist2, span, delta;
-
-
-        if ( n_edges == 6 )
-        {
-          edge1 = edges;
-          edge2 = edges + 2;
-          edge3 = edges + 4;
-        }
-        else
-        {
-          edge1 = edges + 1;
-          edge2 = edges + 5;
-          edge3 = edges + 9;
-        }
-
-        dist1 = edge2->opos - edge1->opos;
-        dist2 = edge3->opos - edge2->opos;
-
-        span = dist1 - dist2;
-        if ( span < 0 )
-          span = -span;
-
-        if ( span < 8 )
-        {
-          delta = edge3->pos - ( 2 * edge2->pos - edge1->pos );
-          edge3->pos -= delta;
-          if ( edge3->link )
-            edge3->link->pos -= delta;
-
-          /* move the serifs along with the stem */
-          if ( n_edges == 12 )
-          {
-            ( edges + 8 )->pos -= delta;
-            ( edges + 11 )->pos -= delta;
-          }
-
-          edge3->flags |= AH_EDGE_DONE;
-          if ( edge3->link )
-            edge3->link->flags |= AH_EDGE_DONE;
-        }
-      }
-
-      if ( !has_serifs )
-        goto Next_Dimension;
-
-      /* now hint the remaining edges (serifs and single) in order */
-      /* to complete our processing                                */
-      for ( edge = edges; edge < edge_limit; edge++ )
-      {
-        if ( edge->flags & AH_EDGE_DONE )
-          continue;
-
-        if ( edge->serif )
-          ah_align_serif_edge( hinter, edge->serif, edge, dimension );
-        else if ( !anchor )
-        {
-          edge->pos = FT_PIX_ROUND( edge->opos );
-          anchor    = edge;
-        }
-        else
-          edge->pos = anchor->pos +
-                      FT_PIX_ROUND( edge->opos - anchor->opos );
-
-        edge->flags |= AH_EDGE_DONE;
-
-        if ( edge > edges && edge->pos < edge[-1].pos )
-          edge->pos = edge[-1].pos;
-
-        if ( edge + 1 < edge_limit        &&
-             edge[1].flags & AH_EDGE_DONE &&
-             edge->pos > edge[1].pos      )
-          edge->pos = edge[1].pos;
-      }
-
-    Next_Dimension:
-      edges      = outline->vert_edges;
-      edge_limit = edges + outline->num_vedges;
-    }
-  }
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****       P O I N T   H I N T I N G                                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-  static void
-  ah_hinter_align_edge_points( AH_Hinter  hinter )
-  {
-    AH_Outline  outline = hinter->glyph;
-    AH_Edge     edges;
-    AH_Edge     edge_limit;
-    FT_Int      dimension;
-
-
-    edges      = outline->horz_edges;
-    edge_limit = edges + outline->num_hedges;
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Edge  edge;
-
-
-      edge = edges;
-      for ( ; edge < edge_limit; edge++ )
-      {
-        /* move the points of each segment     */
-        /* in each edge to the edge's position */
-        AH_Segment  seg = edge->first;
-
-
-        do
-        {
-          AH_Point  point = seg->first;
-
-
-          for (;;)
-          {
-            if ( dimension )
-            {
-              point->y      = edge->pos;
-              point->flags |= AH_FLAG_TOUCH_Y;
-            }
-            else
-            {
-              point->x      = edge->pos;
-              point->flags |= AH_FLAG_TOUCH_X;
-            }
-
-            if ( point == seg->last )
-              break;
-
-            point = point->next;
-          }
-
-          seg = seg->edge_next;
-
-        } while ( seg != edge->first );
-      }
-
-      edges      = outline->vert_edges;
-      edge_limit = edges + outline->num_vedges;
-    }
-  }
-
-
-  /* hint the strong points -- this is equivalent to the TrueType `IP' */
-  /* hinting instruction                                               */
-  static void
-  ah_hinter_align_strong_points( AH_Hinter  hinter )
-  {
-    AH_Outline  outline = hinter->glyph;
-    FT_Int      dimension;
-    AH_Edge     edges;
-    AH_Edge     edge_limit;
-    AH_Point    points;
-    AH_Point    point_limit;
-    AH_Flags    touch_flag;
-
-
-    points      = outline->points;
-    point_limit = points + outline->num_points;
-
-    edges       = outline->horz_edges;
-    edge_limit  = edges + outline->num_hedges;
-    touch_flag  = AH_FLAG_TOUCH_Y;
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Point  point;
-      AH_Edge   edge;
-
-
-      if ( edges < edge_limit )
-        for ( point = points; point < point_limit; point++ )
-        {
-          FT_Pos  u, ou, fu;  /* point position */
-          FT_Pos  delta;
-
-
-          if ( point->flags & touch_flag )
-            continue;
-
-#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
-          /* if this point is candidate to weak interpolation, we will  */
-          /* interpolate it after all strong points have been processed */
-          if (  ( point->flags & AH_FLAG_WEAK_INTERPOLATION ) &&
-               !( point->flags & AH_FLAG_INFLECTION )         )
-            continue;
-#endif
-
-          if ( dimension )
-          {
-            u  = point->fy;
-            ou = point->oy;
-          }
-          else
-          {
-            u  = point->fx;
-            ou = point->ox;
-          }
-
-          fu = u;
-
-          /* is the point before the first edge? */
-          edge  = edges;
-          delta = edge->fpos - u;
-          if ( delta >= 0 )
-          {
-            u = edge->pos - ( edge->opos - ou );
-            goto Store_Point;
-          }
-
-          /* is the point after the last edge? */
-          edge  = edge_limit - 1;
-          delta = u - edge->fpos;
-          if ( delta >= 0 )
-          {
-            u = edge->pos + ( ou - edge->opos );
-            goto Store_Point;
-          }
-
-#if 1
-          {
-            FT_UInt  min, max, mid;
-            FT_Pos   fpos;
-
-
-            /* find enclosing edges */
-            min = 0;
-            max = (FT_UInt)( edge_limit - edges );
-
-            while ( min < max )
-            {
-              mid  = ( max + min ) >> 1;
-              edge = edges + mid;
-              fpos = edge->fpos;
-
-              if ( u < fpos )
-                max = mid;
-              else if ( u > fpos )
-                min = mid + 1;
-              else
-              {
-                /* we are on the edge */
-                u = edge->pos;
-                goto Store_Point;
-              }
-            }
-
-            {
-              AH_Edge  before = edges + min - 1;
-              AH_Edge  after  = edges + min + 0;
-
-
-              /* assert( before && after && before != after ) */
-              if ( before->scale == 0 )
-                before->scale = FT_DivFix( after->pos - before->pos,
-                                           after->fpos - before->fpos );
-
-              u = before->pos + FT_MulFix( fu - before->fpos,
-                                           before->scale );
-            }
-          }
-
-#else /* !0 */
-
-          /* otherwise, interpolate the point in between */
-          {
-            AH_Edge  before = 0;
-            AH_Edge  after  = 0;
-
-
-            for ( edge = edges; edge < edge_limit; edge++ )
-            {
-              if ( u == edge->fpos )
-              {
-                u = edge->pos;
-                goto Store_Point;
-              }
-              if ( u < edge->fpos )
-                break;
-              before = edge;
-            }
-
-            for ( edge = edge_limit - 1; edge >= edges; edge-- )
-            {
-              if ( u == edge->fpos )
-              {
-                u = edge->pos;
-                goto Store_Point;
-              }
-              if ( u > edge->fpos )
-                break;
-              after = edge;
-            }
-
-            if ( before->scale == 0 )
-              before->scale = FT_DivFix( after->pos - before->pos,
-                                        after->fpos - before->fpos );
-
-            u = before->pos + FT_MulFix( fu - before->fpos,
-                                        before->scale );
-          }
-
-#endif /* !0 */
-
-        Store_Point:
-
-          /* save the point position */
-          if ( dimension )
-            point->y = u;
-          else
-            point->x = u;
-
-          point->flags |= touch_flag;
-        }
-
-      edges      = outline->vert_edges;
-      edge_limit = edges + outline->num_vedges;
-      touch_flag = AH_FLAG_TOUCH_X;
-    }
-  }
-
-
-#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
-
-  static void
-  ah_iup_shift( AH_Point  p1,
-                AH_Point  p2,
-                AH_Point  ref )
-  {
-    AH_Point  p;
-    FT_Pos    delta = ref->u - ref->v;
-
-
-    for ( p = p1; p < ref; p++ )
-      p->u = p->v + delta;
-
-    for ( p = ref + 1; p <= p2; p++ )
-      p->u = p->v + delta;
-  }
-
-
-  static void
-  ah_iup_interp( AH_Point  p1,
-                 AH_Point  p2,
-                 AH_Point  ref1,
-                 AH_Point  ref2 )
-  {
-    AH_Point  p;
-    FT_Pos    u;
-    FT_Pos    v1 = ref1->v;
-    FT_Pos    v2 = ref2->v;
-    FT_Pos    d1 = ref1->u - v1;
-    FT_Pos    d2 = ref2->u - v2;
-
-
-    if ( p1 > p2 )
-      return;
-
-    if ( v1 == v2 )
-    {
-      for ( p = p1; p <= p2; p++ )
-      {
-        u = p->v;
-
-        if ( u <= v1 )
-          u += d1;
-        else
-          u += d2;
-
-        p->u = u;
-      }
-      return;
-    }
-
-    if ( v1 < v2 )
-    {
-      for ( p = p1; p <= p2; p++ )
-      {
-        u = p->v;
-
-        if ( u <= v1 )
-          u += d1;
-        else if ( u >= v2 )
-          u += d2;
-        else
-          u = ref1->u + FT_MulDiv( u - v1, ref2->u - ref1->u, v2 - v1 );
-
-        p->u = u;
-      }
-    }
-    else
-    {
-      for ( p = p1; p <= p2; p++ )
-      {
-        u = p->v;
-
-        if ( u <= v2 )
-          u += d2;
-        else if ( u >= v1 )
-          u += d1;
-        else
-          u = ref1->u + FT_MulDiv( u - v1, ref2->u - ref1->u, v2 - v1 );
-
-        p->u = u;
-      }
-    }
-  }
-
-
-  /* interpolate weak points -- this is equivalent to the TrueType `IUP' */
-  /* hinting instruction                                                 */
-  static void
-  ah_hinter_align_weak_points( AH_Hinter  hinter )
-  {
-    AH_Outline  outline = hinter->glyph;
-    FT_Int      dimension;
-    AH_Point    points;
-    AH_Point    point_limit;
-    AH_Point*   contour_limit;
-    AH_Flags    touch_flag;
-
-
-    points      = outline->points;
-    point_limit = points + outline->num_points;
-
-    /* PASS 1: Move segment points to edge positions */
-
-    touch_flag = AH_FLAG_TOUCH_Y;
-
-    contour_limit = outline->contours + outline->num_contours;
-
-    ah_setup_uv( outline, AH_UV_OY );
-
-    for ( dimension = 1; dimension >= 0; dimension-- )
-    {
-      AH_Point   point;
-      AH_Point   end_point;
-      AH_Point   first_point;
-      AH_Point*  contour;
-
-
-      point   = points;
-      contour = outline->contours;
-
-      for ( ; contour < contour_limit; contour++ )
-      {
-        point       = *contour;
-        end_point   = point->prev;
-        first_point = point;
-
-        while ( point <= end_point && !( point->flags & touch_flag ) )
-          point++;
-
-        if ( point <= end_point )
-        {
-          AH_Point  first_touched = point;
-          AH_Point  cur_touched   = point;
-
-
-          point++;
-          while ( point <= end_point )
-          {
-            if ( point->flags & touch_flag )
-            {
-              /* we found two successive touched points; we interpolate */
-              /* all contour points between them                        */
-              ah_iup_interp( cur_touched + 1, point - 1,
-                             cur_touched, point );
-              cur_touched = point;
-            }
-            point++;
-          }
-
-          if ( cur_touched == first_touched )
-          {
-            /* this is a special case: only one point was touched in the */
-            /* contour; we thus simply shift the whole contour           */
-            ah_iup_shift( first_point, end_point, cur_touched );
-          }
-          else
-          {
-            /* now interpolate after the last touched point to the end */
-            /* of the contour                                          */
-            ah_iup_interp( cur_touched + 1, end_point,
-                           cur_touched, first_touched );
-
-            /* if the first contour point isn't touched, interpolate */
-            /* from the contour start to the first touched point     */
-            if ( first_touched > points )
-              ah_iup_interp( first_point, first_touched - 1,
-                             cur_touched, first_touched );
-          }
-        }
-      }
-
-      /* now save the interpolated values back to x/y */
-      if ( dimension )
-      {
-        for ( point = points; point < point_limit; point++ )
-          point->y = point->u;
-
-        touch_flag = AH_FLAG_TOUCH_X;
-        ah_setup_uv( outline, AH_UV_OX );
-      }
-      else
-      {
-        for ( point = points; point < point_limit; point++ )
-          point->x = point->u;
-
-        break;  /* exit loop */
-      }
-    }
-  }
-
-#endif /* !AH_OPTION_NO_WEAK_INTERPOLATION */
-
-
-  FT_LOCAL_DEF( void )
-  ah_hinter_align_points( AH_Hinter  hinter )
-  {
-    ah_hinter_align_edge_points( hinter );
-
-#ifndef AH_OPTION_NO_STRONG_INTERPOLATION
-    ah_hinter_align_strong_points( hinter );
-#endif
-
-#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
-    ah_hinter_align_weak_points( hinter );
-#endif
-  }
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****       H I N T E R   O B J E C T   M E T H O D S                 ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /* scale and fit the global metrics */
-  static void
-  ah_hinter_scale_globals( AH_Hinter  hinter,
-                           FT_Fixed   x_scale,
-                           FT_Fixed   y_scale )
-  {
-    FT_Int           n;
-    AH_Face_Globals  globals = hinter->globals;
-    AH_Globals       design  = &globals->design;
-    AH_Globals       scaled  = &globals->scaled;
-
-
-    /* copy content */
-    *scaled = *design;
-
-    /* scale the standard widths & heights */
-    for ( n = 0; n < design->num_widths; n++ )
-      scaled->widths[n] = FT_MulFix( design->widths[n], x_scale );
-
-    for ( n = 0; n < design->num_heights; n++ )
-      scaled->heights[n] = FT_MulFix( design->heights[n], y_scale );
-
-    scaled->stds[0] = ( design->num_widths  > 0 ) ? scaled->widths[0]  : 32000;
-    scaled->stds[1] = ( design->num_heights > 0 ) ? scaled->heights[0] : 32000;
-
-    /* scale the blue zones */
-    for ( n = 0; n < AH_BLUE_MAX; n++ )
-    {
-      FT_Pos  delta, delta2;
-
-
-      delta = design->blue_shoots[n] - design->blue_refs[n];
-      delta2 = delta;
-      if ( delta < 0 )
-        delta2 = -delta2;
-      delta2 = FT_MulFix( delta2, y_scale );
-
-      if ( delta2 < 32 )
-        delta2 = 0;
-      else if ( delta2 < 64 )
-        delta2 = 32 + ( ( ( delta2 - 32 ) + 16 ) & ~31 );
-      else
-        delta2 = FT_PIX_ROUND( delta2 );
-
-      if ( delta < 0 )
-        delta2 = -delta2;
-
-      scaled->blue_refs[n] =
-        FT_PIX_ROUND( FT_MulFix( design->blue_refs[n], y_scale ) );
-
-      scaled->blue_shoots[n] = scaled->blue_refs[n] + delta2;
-    }
-
-    globals->x_scale = x_scale;
-    globals->y_scale = y_scale;
-  }
-
-
-  static void
-  ah_hinter_align( AH_Hinter  hinter )
-  {
-    ah_hinter_align_edge_points( hinter );
-    ah_hinter_align_points( hinter );
-  }
-
-
-  /* finalize a hinter object */
-  FT_LOCAL_DEF( void )
-  ah_hinter_done( AH_Hinter  hinter )
-  {
-    if ( hinter )
-    {
-      FT_Memory  memory = hinter->memory;
-
-
-      ah_loader_done( hinter->loader );
-      ah_outline_done( hinter->glyph );
-
-      /* note: the `globals' pointer is _not_ owned by the hinter */
-      /*       but by the current face object; we don't need to   */
-      /*       release it                                         */
-      hinter->globals = 0;
-      hinter->face    = 0;
-
-      FT_FREE( hinter );
-    }
-  }
-
-
-  /* create a new empty hinter object */
-  FT_LOCAL_DEF( FT_Error )
-  ah_hinter_new( FT_Library  library,
-                 AH_Hinter  *ahinter )
-  {
-    AH_Hinter  hinter = 0;
-    FT_Memory  memory = library->memory;
-    FT_Error   error;
-
-
-    *ahinter = 0;
-
-    /* allocate object */
-    if ( FT_NEW( hinter ) )
-      goto Exit;
-
-    hinter->memory = memory;
-    hinter->flags  = 0;
-
-    /* allocate outline and loader */
-    error = ah_outline_new( memory, &hinter->glyph )  ||
-            ah_loader_new ( memory, &hinter->loader ) ||
-            ah_loader_create_extra( hinter->loader );
-    if ( error )
-      goto Exit;
-
-    *ahinter = hinter;
-
-  Exit:
-    if ( error )
-      ah_hinter_done( hinter );
-
-    return error;
-  }
-
-
-  /* create a face's autohint globals */
-  FT_LOCAL_DEF( FT_Error )
-  ah_hinter_new_face_globals( AH_Hinter   hinter,
-                              FT_Face     face,
-                              AH_Globals  globals )
-  {
-    FT_Error         error;
-    FT_Memory        memory = hinter->memory;
-    AH_Face_Globals  face_globals;
-
-
-    if ( FT_NEW( face_globals ) )
-      goto Exit;
-
-    hinter->face    = face;
-    hinter->globals = face_globals;
-
-    if ( globals )
-      face_globals->design = *globals;
-    else
-      ah_hinter_compute_globals( hinter );
-
-    face->autohint.data      = face_globals;
-    face->autohint.finalizer = (FT_Generic_Finalizer)
-                                 ah_hinter_done_face_globals;
-    face_globals->face       = face;
-
-  Exit:
-    return error;
-  }
-
-
-  /* discard a face's autohint globals */
-  FT_LOCAL_DEF( void )
-  ah_hinter_done_face_globals( AH_Face_Globals  globals )
-  {
-    FT_Face    face   = globals->face;
-    FT_Memory  memory = face->memory;
-
-
-    FT_FREE( globals );
-  }
-
-
-  static FT_Error
-  ah_hinter_load( AH_Hinter  hinter,
-                  FT_UInt    glyph_index,
-                  FT_Int32   load_flags,
-                  FT_UInt    depth )
-  {
-    FT_Face           face     = hinter->face;
-    FT_GlyphSlot      slot     = face->glyph;
-    FT_Slot_Internal  internal = slot->internal;
-    FT_Fixed          x_scale  = hinter->globals->x_scale;
-    FT_Fixed          y_scale  = hinter->globals->y_scale;
-    FT_Error          error;
-    AH_Outline        outline  = hinter->glyph;
-    AH_Loader         gloader  = hinter->loader;
-
-
-    /* load the glyph */
-    error = FT_Load_Glyph( face, glyph_index, load_flags );
-    if ( error )
-      goto Exit;
-
-    /* Set `hinter->transformed' after loading with FT_LOAD_NO_RECURSE. */
-    hinter->transformed = internal->glyph_transformed;
-
-    if ( hinter->transformed )
-    {
-      FT_Matrix  imatrix;
-
-
-      imatrix              = internal->glyph_matrix;
-      hinter->trans_delta  = internal->glyph_delta;
-      hinter->trans_matrix = imatrix;
-
-      FT_Matrix_Invert( &imatrix );
-      FT_Vector_Transform( &hinter->trans_delta, &imatrix );
-    }
-
-    /* set linear horizontal metrics */
-    slot->linearHoriAdvance = slot->metrics.horiAdvance;
-    slot->linearVertAdvance = slot->metrics.vertAdvance;
-
-    switch ( slot->format )
-    {
-    case FT_GLYPH_FORMAT_OUTLINE:
-
-      /* translate glyph outline if we need to */
-      if ( hinter->transformed )
-      {
-        FT_UInt     n     = slot->outline.n_points;
-        FT_Vector*  point = slot->outline.points;
-
-
-        for ( ; n > 0; point++, n-- )
-        {
-          point->x += hinter->trans_delta.x;
-          point->y += hinter->trans_delta.y;
-        }
-      }
-
-      /* copy the outline points in the loader's current               */
-      /* extra points which is used to keep original glyph coordinates */
-      error = ah_loader_check_points( gloader, slot->outline.n_points + 4,
-                                      slot->outline.n_contours );
-      if ( error )
-        goto Exit;
-
-      FT_ARRAY_COPY( gloader->current.extra_points, slot->outline.points,
-                     slot->outline.n_points );
-
-      FT_ARRAY_COPY( gloader->current.outline.contours, slot->outline.contours,
-                     slot->outline.n_contours );
-
-      FT_ARRAY_COPY( gloader->current.outline.tags, slot->outline.tags,
-                     slot->outline.n_points );
-
-      gloader->current.outline.n_points   = slot->outline.n_points;
-      gloader->current.outline.n_contours = slot->outline.n_contours;
-
-      /* compute original horizontal phantom points, ignoring vertical ones */
-      hinter->pp1.x = 0;
-      hinter->pp1.y = 0;
-      hinter->pp2.x = FT_MulFix( slot->metrics.horiAdvance, x_scale );
-      hinter->pp2.y = 0;
-
-      /* be sure to check for spacing glyphs */
-      if ( slot->outline.n_points == 0 )
-        goto Hint_Metrics;
-
-      /* now load the slot image into the auto-outline and run the */
-      /* automatic hinting process                                 */
-      error = ah_outline_load( outline, x_scale, y_scale, face );
-      if ( error )
-        goto Exit;
-
-      /* perform feature detection */
-      ah_outline_detect_features( outline );
-
-      if ( hinter->do_vert_hints )
-      {
-        ah_outline_compute_blue_edges( outline, hinter->globals );
-        ah_outline_scale_blue_edges( outline, hinter->globals );
-      }
-
-      /* perform alignment control */
-      ah_hinter_hint_edges( hinter );
-      ah_hinter_align( hinter );
-
-      /* now save the current outline into the loader's current table */
-      ah_outline_save( outline, gloader );
-
-      /* we now need to hint the metrics according to the change in */
-      /* width/positioning that occurred during the hinting process */
-      if ( outline->num_vedges > 0 )
-      {
-        FT_Pos   old_advance, old_rsb, old_lsb, new_lsb, pp1x_uh, pp2x_uh;
-        AH_Edge  edge1 = outline->vert_edges;     /* leftmost edge  */
-        AH_Edge  edge2 = edge1 +
-                         outline->num_vedges - 1; /* rightmost edge */
-
-
-        old_advance = hinter->pp2.x;
-        old_rsb     = old_advance - edge2->opos;
-        old_lsb     = edge1->opos;
-        new_lsb     = edge1->pos;
-
-        /* remember unhinted values to later account for rounding errors */
-
-        pp1x_uh = new_lsb    - old_lsb;
-        pp2x_uh = edge2->pos + old_rsb;
-
-        /* prefer too much space over too little space for very small sizes */
-
-        if ( old_lsb < 24 )
-          pp1x_uh -= 5;
-
-        if ( old_rsb < 24 )
-          pp2x_uh += 5;
-
-        hinter->pp1.x = FT_PIX_ROUND( pp1x_uh );
-        hinter->pp2.x = FT_PIX_ROUND( pp2x_uh );
-
-        slot->lsb_delta = hinter->pp1.x - pp1x_uh;
-        slot->rsb_delta = hinter->pp2.x - pp2x_uh;
-
-#if 0
-        /* try to fix certain bad advance computations */
-        if ( hinter->pp2.x + hinter->pp1.x == edge2->pos && old_rsb > 4 )
-          hinter->pp2.x += 64;
-#endif
-      }
-
-      else
-      {
-        hinter->pp1.x = ( hinter->pp1.x + 32 ) & -64;
-        hinter->pp2.x = ( hinter->pp2.x + 32 ) & -64;
-      }
-
-      /* good, we simply add the glyph to our loader's base */
-      ah_loader_add( gloader );
-      break;
-
-    case FT_GLYPH_FORMAT_COMPOSITE:
-      {
-        FT_UInt      nn, num_subglyphs = slot->num_subglyphs;
-        FT_UInt      num_base_subgs, start_point;
-        FT_SubGlyph  subglyph;
-
-
-        start_point = gloader->base.outline.n_points;
-
-        /* first of all, copy the subglyph descriptors in the glyph loader */
-        error = ah_loader_check_subglyphs( gloader, num_subglyphs );
-        if ( error )
-          goto Exit;
-
-        FT_ARRAY_COPY( gloader->current.subglyphs, slot->subglyphs,
-                       num_subglyphs );
-
-        gloader->current.num_subglyphs = num_subglyphs;
-        num_base_subgs = gloader->base.num_subglyphs;
-
-        /* now, read each subglyph independently */
-        for ( nn = 0; nn < num_subglyphs; nn++ )
-        {
-          FT_Vector  pp1, pp2;
-          FT_Pos     x, y;
-          FT_UInt    num_points, num_new_points, num_base_points;
-
-
-          /* gloader.current.subglyphs can change during glyph loading due */
-          /* to re-allocation -- we must recompute the current subglyph on */
-          /* each iteration                                                */
-          subglyph = gloader->base.subglyphs + num_base_subgs + nn;
-
-          pp1 = hinter->pp1;
-          pp2 = hinter->pp2;
-
-          num_base_points = gloader->base.outline.n_points;
-
-          error = ah_hinter_load( hinter, subglyph->index,
-                                  load_flags, depth + 1 );
-          if ( error )
-            goto Exit;
-
-          /* recompute subglyph pointer */
-          subglyph = gloader->base.subglyphs + num_base_subgs + nn;
-
-          if ( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS )
-          {
-            pp1 = hinter->pp1;
-            pp2 = hinter->pp2;
-          }
-          else
-          {
-            hinter->pp1 = pp1;
-            hinter->pp2 = pp2;
-          }
-
-          num_points     = gloader->base.outline.n_points;
-          num_new_points = num_points - num_base_points;
-
-          /* now perform the transform required for this subglyph */
-
-          if ( subglyph->flags & ( FT_SUBGLYPH_FLAG_SCALE    |
-                                   FT_SUBGLYPH_FLAG_XY_SCALE |
-                                   FT_SUBGLYPH_FLAG_2X2      ) )
-          {
-            FT_Vector*  cur   = gloader->base.outline.points +
-                                num_base_points;
-            FT_Vector*  org   = gloader->base.extra_points +
-                                num_base_points;
-            FT_Vector*  limit = cur + num_new_points;
-
-
-            for ( ; cur < limit; cur++, org++ )
-            {
-              FT_Vector_Transform( cur, &subglyph->transform );
-              FT_Vector_Transform( org, &subglyph->transform );
-            }
-          }
-
-          /* apply offset */
-
-          if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ) )
-          {
-            FT_Int      k = subglyph->arg1;
-            FT_UInt     l = subglyph->arg2;
-            FT_Vector*  p1;
-            FT_Vector*  p2;
-
-
-            if ( start_point + k >= num_base_points         ||
-                               l >= (FT_UInt)num_new_points )
-            {
-              error = AH_Err_Invalid_Composite;
-              goto Exit;
-            }
-
-            l += num_base_points;
-
-            /* for now, only use the current point coordinates;    */
-            /* we may consider another approach in the near future */
-            p1 = gloader->base.outline.points + start_point + k;
-            p2 = gloader->base.outline.points + start_point + l;
-
-            x = p1->x - p2->x;
-            y = p1->y - p2->y;
-          }
-          else
-          {
-            x = FT_MulFix( subglyph->arg1, x_scale );
-            y = FT_MulFix( subglyph->arg2, y_scale );
-
-            x = FT_PIX_ROUND(x);
-            y = FT_PIX_ROUND(y);
-          }
-
-          {
-            FT_Outline  dummy = gloader->base.outline;
-
-
-            dummy.points  += num_base_points;
-            dummy.n_points = (short)num_new_points;
-
-            FT_Outline_Translate( &dummy, x, y );
-          }
-        }
-      }
-      break;
-
-    default:
-      /* we don't support other formats (yet?) */
-      error = AH_Err_Unimplemented_Feature;
-    }
-
-  Hint_Metrics:
-    if ( depth == 0 )
-    {
-      FT_BBox  bbox;
-
-
-      /* transform the hinted outline if needed */
-      if ( hinter->transformed )
-        FT_Outline_Transform( &gloader->base.outline, &hinter->trans_matrix );
-
-      /* we must translate our final outline by -pp1.x and compute */
-      /* the new metrics                                           */
-      if ( hinter->pp1.x )
-        FT_Outline_Translate( &gloader->base.outline, -hinter->pp1.x, 0 );
-
-      FT_Outline_Get_CBox( &gloader->base.outline, &bbox );
-      bbox.xMin  = FT_PIX_FLOOR(  bbox.xMin );
-      bbox.yMin  = FT_PIX_FLOOR(  bbox.yMin );
-      bbox.xMax  = FT_PIX_CEIL( bbox.xMax );
-      bbox.yMax  = FT_PIX_CEIL( bbox.yMax );
-
-      slot->metrics.width        = bbox.xMax - bbox.xMin;
-      slot->metrics.height       = bbox.yMax - bbox.yMin;
-      slot->metrics.horiBearingX = bbox.xMin;
-      slot->metrics.horiBearingY = bbox.yMax;
-
-      /* for mono-width fonts (like Andale, Courier, etc.) we need */
-      /* to keep the original rounded advance width                */
-      if ( !FT_IS_FIXED_WIDTH( slot->face ) )
-        slot->metrics.horiAdvance = hinter->pp2.x - hinter->pp1.x;
-      else
-        slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
-                                               x_scale );
-
-      slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
-
-      /* now copy outline into glyph slot */
-      ah_loader_rewind( slot->internal->loader );
-      error = ah_loader_copy_points( slot->internal->loader, gloader );
-      if ( error )
-        goto Exit;
-
-      slot->outline = slot->internal->loader->base.outline;
-      slot->format  = FT_GLYPH_FORMAT_OUTLINE;
-    }
-
-#ifdef DEBUG_HINTER
-    ah_debug_hinter = hinter;
-#endif
-
-  Exit:
-    return error;
-  }
-
-
-  /* load and hint a given glyph */
-  FT_LOCAL_DEF( FT_Error )
-  ah_hinter_load_glyph( AH_Hinter     hinter,
-                        FT_GlyphSlot  slot,
-                        FT_Size       size,
-                        FT_UInt       glyph_index,
-                        FT_Int32      load_flags )
-  {
-    FT_Face          face         = slot->face;
-    FT_Error         error;
-    FT_Fixed         x_scale      = size->metrics.x_scale;
-    FT_Fixed         y_scale      = size->metrics.y_scale;
-    AH_Face_Globals  face_globals = FACE_GLOBALS( face );
-    FT_Render_Mode   hint_mode    = FT_LOAD_TARGET_MODE( load_flags );
-
-
-    /* first of all, we need to check that we're using the correct face and */
-    /* global hints to load the glyph                                       */
-    if ( hinter->face != face || hinter->globals != face_globals )
-    {
-      hinter->face = face;
-      if ( !face_globals )
-      {
-        error = ah_hinter_new_face_globals( hinter, face, 0 );
-        if ( error )
-          goto Exit;
-
-      }
-      hinter->globals = FACE_GLOBALS( face );
-      face_globals    = FACE_GLOBALS( face );
-
-    }
-
-#ifdef FT_CONFIG_CHESTER_BLUE_SCALE
-
-   /* try to optimize the y_scale so that the top of non-capital letters
-    * is aligned on a pixel boundary whenever possible
-    */
-    {
-      AH_Globals  design = &face_globals->design;
-      FT_Pos      shoot  = design->blue_shoots[AH_BLUE_SMALL_TOP];
-
-
-      /* the value of 'shoot' will be -1000 if the font doesn't have */
-      /* small latin letters; we simply check the sign here...       */
-      if ( shoot > 0 )
-      {
-        FT_Pos  scaled = FT_MulFix( shoot, y_scale );
-        FT_Pos  fitted = FT_PIX_ROUND( scaled );
-
-
-        if ( scaled != fitted )
-        {
-         /* adjust y_scale
-          */
-          y_scale = FT_MulDiv( y_scale, fitted, scaled );
-
-         /* adust x_scale
-          */
-          if ( fitted < scaled )
-            x_scale -= x_scale / 50;  /* x_scale*0.98 with integers */
-        }
-      }
-    }
-
-#endif /* FT_CONFIG_CHESTER_BLUE_SCALE */
-
-    /* now, we must check the current character pixel size to see if we */
-    /* need to rescale the global metrics                               */
-    if ( face_globals->x_scale != x_scale ||
-         face_globals->y_scale != y_scale )
-      ah_hinter_scale_globals( hinter, x_scale, y_scale );
-
-    ah_loader_rewind( hinter->loader );
-
-    /* reset hinting flags according to load flags and current render target */
-    hinter->do_horz_hints = FT_BOOL( !(load_flags & FT_LOAD_NO_AUTOHINT) );
-    hinter->do_vert_hints = FT_BOOL( !(load_flags & FT_LOAD_NO_AUTOHINT) );
-
-#ifdef DEBUG_HINTER
-    hinter->do_horz_hints = !ah_debug_disable_vert;  /* not a bug, the meaning */
-    hinter->do_vert_hints = !ah_debug_disable_horz;  /* of h/v is inverted!    */
-#endif
-
-    /* we snap the width of vertical stems for the monochrome and         */
-    /* horizontal LCD rendering targets only.  Corresponds to X snapping. */
-    hinter->do_horz_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_MONO ||
-                                        hint_mode == FT_RENDER_MODE_LCD  );
-
-    /* we snap the width of horizontal stems for the monochrome and     */
-    /* vertical LCD rendering targets only.  Corresponds to Y snapping. */
-    hinter->do_vert_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_MONO   ||
-                                        hint_mode == FT_RENDER_MODE_LCD_V  );
-
-    hinter->do_stem_adjust   = FT_BOOL( hint_mode != FT_RENDER_MODE_LIGHT );
-
-    load_flags |= FT_LOAD_NO_SCALE
-                | FT_LOAD_IGNORE_TRANSFORM;
-    load_flags &= ~FT_LOAD_RENDER;
-
-    error = ah_hinter_load( hinter, glyph_index, load_flags, 0 );
-
-  Exit:
-    return error;
-  }
-
-
-  /* retrieve a face's autohint globals for client applications */
-  FT_LOCAL_DEF( void )
-  ah_hinter_get_global_hints( AH_Hinter  hinter,
-                              FT_Face    face,
-                              void**     global_hints,
-                              long*      global_len )
-  {
-    AH_Globals  globals = 0;
-    FT_Memory   memory  = hinter->memory;
-    FT_Error    error;
-
-
-    /* allocate new master globals */
-    if ( FT_NEW( globals ) )
-      goto Fail;
-
-    /* compute face globals if needed */
-    if ( !FACE_GLOBALS( face ) )
-    {
-      error = ah_hinter_new_face_globals( hinter, face, 0 );
-      if ( error )
-        goto Fail;
-    }
-
-    *globals      = FACE_GLOBALS( face )->design;
-    *global_hints = globals;
-    *global_len   = sizeof( *globals );
-
-    return;
-
-  Fail:
-    FT_FREE( globals );
-
-    *global_hints = 0;
-    *global_len   = 0;
-  }
-
-
-  FT_LOCAL_DEF( void )
-  ah_hinter_done_global_hints( AH_Hinter  hinter,
-                               void*      global_hints )
-  {
-    FT_Memory  memory = hinter->memory;
-
-
-    FT_FREE( global_hints );
-  }
-
-
-/* END */
diff --git a/src/autohint/ahhint.h b/src/autohint/ahhint.h
deleted file mode 100644
index 2c352d0..0000000
--- a/src/autohint/ahhint.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahhint.h                                                               */
-/*                                                                         */
-/*    Glyph hinter (declaration).                                          */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002 Catharon Productions Inc.                    */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __AHHINT_H__
-#define __AHHINT_H__
-
-
-#include <ft2build.h>
-#include "ahglobal.h"
-
-
-FT_BEGIN_HEADER
-
-
-#define AH_HINT_DEFAULT        0
-#define AH_HINT_NO_ALIGNMENT   1
-#define AH_HINT_NO_HORZ_EDGES  0x200000L  /* temporary hack */
-#define AH_HINT_NO_VERT_EDGES  0x400000L  /* temporary hack */
-
-
-  /* create a new empty hinter object */
-  FT_LOCAL( FT_Error )
-  ah_hinter_new( FT_Library  library,
-                 AH_Hinter*  ahinter );
-
-  /* Load a hinted glyph in the hinter */
-  FT_LOCAL( FT_Error )
-  ah_hinter_load_glyph( AH_Hinter     hinter,
-                        FT_GlyphSlot  slot,
-                        FT_Size       size,
-                        FT_UInt       glyph_index,
-                        FT_Int32      load_flags );
-
-  /* finalize a hinter object */
-  FT_LOCAL( void )
-  ah_hinter_done( AH_Hinter  hinter );
-
-  FT_LOCAL( void )
-  ah_hinter_done_face_globals( AH_Face_Globals  globals );
-
-  FT_LOCAL( void )
-  ah_hinter_get_global_hints( AH_Hinter  hinter,
-                              FT_Face    face,
-                              void**     global_hints,
-                              long*      global_len );
-
-  FT_LOCAL( void )
-  ah_hinter_done_global_hints( AH_Hinter  hinter,
-                               void*      global_hints );
-
-
-FT_END_HEADER
-
-#endif /* __AHHINT_H__ */
-
-
-/* END */
diff --git a/src/autohint/ahloader.h b/src/autohint/ahloader.h
deleted file mode 100644
index c8e42ef..0000000
--- a/src/autohint/ahloader.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahloader.h                                                             */
-/*                                                                         */
-/*    Glyph loader for the auto-hinting module (declaration only).         */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002 Catharon Productions Inc.                    */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* This defines the AH_GlyphLoader type; it is simply a typedef to       */
-  /* FT_GlyphLoader.                                                       */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-#ifndef __AHLOADER_H__
-#define __AHLOADER_H__
-
-
-#include <ft2build.h>
-
-
-FT_BEGIN_HEADER
-
-#include FT_INTERNAL_GLYPH_LOADER_H
-
-  #define AH_Load    FT_GlyphLoad
-  #define AH_Loader  FT_GlyphLoader
-
-  #define ah_loader_new              FT_GlyphLoader_New
-  #define ah_loader_done             FT_GlyphLoader_Done
-  #define ah_loader_reset            FT_GlyphLoader_Reset
-  #define ah_loader_rewind           FT_GlyphLoader_Rewind
-  #define ah_loader_create_extra     FT_GlyphLoader_CreateExtra
-  #define ah_loader_check_points     FT_GlyphLoader_CheckPoints
-  #define ah_loader_check_subglyphs  FT_GlyphLoader_CheckSubGlyphs
-  #define ah_loader_prepare          FT_GlyphLoader_Prepare
-  #define ah_loader_add              FT_GlyphLoader_Add
-  #define ah_loader_copy_points      FT_GlyphLoader_CopyPoints
-
-
-FT_END_HEADER
-
-#endif /* __AHLOADER_H__ */
-
-
-/* END */
diff --git a/src/autohint/ahmodule.c b/src/autohint/ahmodule.c
deleted file mode 100644
index 03d067b..0000000
--- a/src/autohint/ahmodule.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahmodule.c                                                             */
-/*                                                                         */
-/*    Auto-hinting module implementation (declaration).                    */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc.        */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#include <ft2build.h>
-#include FT_MODULE_H
-#include "ahhint.h"
-
-
-#ifdef  DEBUG_HINTER
-   AH_Hinter  ah_debug_hinter       = NULL;
-   FT_Bool    ah_debug_disable_horz = 0;
-   FT_Bool    ah_debug_disable_vert = 0;
-#endif
-
-  typedef struct  FT_AutoHinterRec_
-  {
-    FT_ModuleRec  root;
-    AH_Hinter     hinter;
-
-  } FT_AutoHinterRec;
-
-
-  FT_CALLBACK_DEF( FT_Error )
-  ft_autohinter_init( FT_Module  module )       /* FT_AutoHinter */
-  {
-    FT_AutoHinter  autohinter = (FT_AutoHinter)module;
-    FT_Error       error;
-
-
-    error = ah_hinter_new( module->library, &autohinter->hinter );
-
-#ifdef DEBUG_HINTER
-    if ( !error )
-      ah_debug_hinter = autohinter->hinter;
-#endif
-
-    return error;
-  }
-
-
-  FT_CALLBACK_DEF( void )
-  ft_autohinter_done( FT_Module  module )
-  {
-    FT_AutoHinter  autohinter = (FT_AutoHinter)module;
-
-
-    ah_hinter_done( autohinter->hinter );
-
-#ifdef DEBUG_HINTER
-    ah_debug_hinter = NULL;
-#endif
-  }
-
-
-  FT_CALLBACK_DEF( FT_Error )
-  ft_autohinter_load_glyph( FT_AutoHinter  module,
-                            FT_GlyphSlot   slot,
-                            FT_Size        size,
-                            FT_UInt        glyph_index,
-                            FT_Int32       load_flags )
-  {
-    return ah_hinter_load_glyph( module->hinter,
-                                 slot, size, glyph_index, load_flags );
-  }
-
-
-  FT_CALLBACK_DEF( void )
-  ft_autohinter_reset_globals( FT_AutoHinter  module,
-                               FT_Face        face )
-  {
-    FT_UNUSED( module );
-
-    if ( face->autohint.data )
-      ah_hinter_done_face_globals( (AH_Face_Globals)(face->autohint.data) );
-  }
-
-
-  FT_CALLBACK_DEF( void )
-  ft_autohinter_get_globals( FT_AutoHinter  module,
-                             FT_Face        face,
-                             void**         global_hints,
-                             long*          global_len )
-  {
-    ah_hinter_get_global_hints( module->hinter, face,
-                                global_hints, global_len );
-  }
-
-
-  FT_CALLBACK_DEF( void )
-  ft_autohinter_done_globals( FT_AutoHinter  module,
-                              void*          global_hints )
-  {
-    ah_hinter_done_global_hints( module->hinter, global_hints );
-  }
-
-
-  FT_CALLBACK_TABLE_DEF
-  const FT_AutoHinter_ServiceRec  ft_autohinter_service =
-  {
-    ft_autohinter_reset_globals,
-    ft_autohinter_get_globals,
-    ft_autohinter_done_globals,
-    ft_autohinter_load_glyph
-  };
-
-
-  FT_CALLBACK_TABLE_DEF
-  const FT_Module_Class  autohint_module_class =
-  {
-    FT_MODULE_HINTER,
-    sizeof ( FT_AutoHinterRec ),
-
-    "autohinter",
-    0x10000L,   /* version 1.0 of the autohinter  */
-    0x20000L,   /* requires FreeType 2.0 or above */
-
-    (const void*) &ft_autohinter_service,
-
-    ft_autohinter_init,
-    ft_autohinter_done,
-    0                       /* FT_Module_Requester */
-  };
-
-
-/* END */
diff --git a/src/autohint/ahmodule.h b/src/autohint/ahmodule.h
deleted file mode 100644
index 43b1dbe..0000000
--- a/src/autohint/ahmodule.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahmodule.h                                                             */
-/*                                                                         */
-/*    Auto-hinting module (declaration).                                   */
-/*                                                                         */
-/*  Copyright 2000-2001 Catharon Productions Inc.                          */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __AHMODULE_H__
-#define __AHMODULE_H__
-
-
-#include <ft2build.h>
-#include FT_MODULE_H
-
-
-FT_BEGIN_HEADER
-
-
-  FT_CALLBACK_TABLE
-  const FT_Module_Class  autohint_module_class;
-
-
-FT_END_HEADER
-
-#endif /* __AHMODULE_H__ */
-
-
-/* END */
diff --git a/src/autohint/ahtypes.h b/src/autohint/ahtypes.h
deleted file mode 100644
index f2cedd2..0000000
--- a/src/autohint/ahtypes.h
+++ /dev/null
@@ -1,527 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ahtypes.h                                                              */
-/*                                                                         */
-/*    General types and definitions for the auto-hint module               */
-/*    (specification only).                                                */
-/*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc.        */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef __AHTYPES_H__
-#define __AHTYPES_H__
-
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-
-#ifdef DEBUG_HINTER
-#include <../src/autohint/ahloader.h>
-#else
-#include "ahloader.h"
-#endif
-
-
-#define xxAH_DEBUG
-
-
-#ifdef AH_DEBUG
-
-#include <stdio.h>
-#define AH_LOG( x )  printf ## x
-
-#else
-
-#define AH_LOG( x )  do ; while ( 0 ) /* nothing */
-
-#endif /* AH_DEBUG */
-
-
-FT_BEGIN_HEADER
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /**** COMPILE-TIME BUILD OPTIONS                                      ****/
-  /****                                                                 ****/
-  /**** Toggle these configuration macros to experiment with `features' ****/
-  /**** of the auto-hinter.                                             ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* If this option is defined, only strong interpolation will be used to  */
-  /* place the points between edges.  Otherwise, `smooth' points are       */
-  /* detected and later hinted through weak interpolation to correct some  */
-  /* unpleasant artefacts.                                                 */
-  /*                                                                       */
-#undef AH_OPTION_NO_WEAK_INTERPOLATION
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Undefine this macro if you don't want to hint the metrics.  There is  */
-  /* no reason to do this (at least for non-CJK scripts), except for       */
-  /* experimentation.                                                      */
-  /*                                                                       */
-#undef  AH_HINT_METRICS
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Define this macro if you do not want to insert extra edges at a       */
-  /* glyph's x and y extremum (if there isn't one already available).      */
-  /* This helps to reduce a number of artefacts and allows hinting of      */
-  /* metrics.                                                              */
-  /*                                                                       */
-#undef AH_OPTION_NO_EXTREMUM_EDGES
-
-
-  /* don't touch for now */
-#define AH_MAX_WIDTHS   12
-#define AH_MAX_HEIGHTS  12
-
-
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-  /****                                                                 ****/
-  /****   TYPE DEFINITIONS                                              ****/
-  /****                                                                 ****/
-  /*************************************************************************/
-  /*************************************************************************/
-  /*************************************************************************/
-
-
-  /* see ahangles.h */
-  typedef FT_Int  AH_Angle;
-
-
-  /* hint flags */
-#define AH_FLAG_NONE       0
-
-  /* bezier control points flags */
-#define AH_FLAG_CONIC                 1
-#define AH_FLAG_CUBIC                 2
-#define AH_FLAG_CONTROL               ( AH_FLAG_CONIC | AH_FLAG_CUBIC )
-
-  /* extrema flags */
-#define AH_FLAG_EXTREMA_X             4
-#define AH_FLAG_EXTREMA_Y             8
-
-  /* roundness */
-#define AH_FLAG_ROUND_X              16
-#define AH_FLAG_ROUND_Y              32
-
-  /* touched */
-#define AH_FLAG_TOUCH_X              64
-#define AH_FLAG_TOUCH_Y             128
-
-  /* weak interpolation */
-#define AH_FLAG_WEAK_INTERPOLATION  256
-#define AH_FLAG_INFLECTION          512
-
-  typedef FT_Int AH_Flags;
-
-
-  /* edge hint flags */
-#define AH_EDGE_NORMAL  0
-#define AH_EDGE_ROUND   1
-#define AH_EDGE_SERIF   2
-#define AH_EDGE_DONE    4
-
-  typedef FT_Int  AH_Edge_Flags;
-
-
-  /* hint directions -- the values are computed so that two vectors are */
-  /* in opposite directions iff `dir1+dir2 == 0'                        */
-#define AH_DIR_NONE    4
-#define AH_DIR_RIGHT   1
-#define AH_DIR_LEFT   -1
-#define AH_DIR_UP      2
-#define AH_DIR_DOWN   -2
-
-  typedef FT_Int  AH_Direction;
-
-
-  typedef struct AH_PointRec_*    AH_Point;
-  typedef struct AH_SegmentRec_*  AH_Segment;
-  typedef struct AH_EdgeRec_*     AH_Edge;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    AH_PointRec                                                        */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to model an outline point to the AH_OutlineRec    */
-  /*    type.                                                              */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    flags     :: The current point hint flags.                         */
-  /*                                                                       */
-  /*    ox, oy    :: The current original scaled coordinates.              */
-  /*                                                                       */
-  /*    fx, fy    :: The current coordinates in font units.                */
-  /*                                                                       */
-  /*    x,  y     :: The current hinted coordinates.                       */
-  /*                                                                       */
-  /*    u, v      :: Point coordinates -- meaning varies with context.     */
-  /*                                                                       */
-  /*    in_dir    :: The direction of the inwards vector (prev->point).    */
-  /*                                                                       */
-  /*    out_dir   :: The direction of the outwards vector (point->next).   */
-  /*                                                                       */
-  /*    next      :: The next point in same contour.                       */
-  /*                                                                       */
-  /*    prev      :: The previous point in same contour.                   */
-  /*                                                                       */
-  typedef struct  AH_PointRec_
-  {
-    AH_Flags      flags;    /* point flags used by hinter */
-    FT_Pos        ox, oy;
-    FT_Pos        fx, fy;
-    FT_Pos        x,  y;
-    FT_Pos        u,  v;
-
-    AH_Direction  in_dir;   /* direction of inwards vector  */
-    AH_Direction  out_dir;  /* direction of outwards vector */
-
-    AH_Point      next;     /* next point in contour     */
-    AH_Point      prev;     /* previous point in contour */
-
-  } AH_PointRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    AH_SegmentRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to describe an edge segment to the auto-hinter.   */
-  /*    A segment is simply a sequence of successive points located on the */
-  /*    same horizontal or vertical `position', in a given direction.      */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    flags      :: The segment edge flags (straight, rounded, etc.).    */
-  /*                                                                       */
-  /*    dir        :: The segment direction.                               */
-  /*                                                                       */
-  /*    min_coord  :: The minimum coordinate of the segment.               */
-  /*                                                                       */
-  /*    max_coord  :: The maximum coordinate of the segment.               */
-  /*                                                                       */
-  /*    edge       :: The edge of the current segment.                     */
-  /*                                                                       */
-  /*    edge_next  :: The next segment on the same edge.                   */
-  /*                                                                       */
-  /*    link       :: The pairing segment for this edge.                   */
-  /*                                                                       */
-  /*    serif      :: The primary segment for serifs.                      */
-  /*                                                                       */
-  /*    num_linked :: The number of other segments that link to this one.  */
-  /*                                                                       */
-  /*    score      :: Used to score the segment when selecting them.       */
-  /*                                                                       */
-  /*    first      :: The first point in the segment.                      */
-  /*                                                                       */
-  /*    last       :: The last point in the segment.                       */
-  /*                                                                       */
-  /*    contour    :: A pointer to the first point of the segment's        */
-  /*                  contour.                                             */
-  /*                                                                       */
-  typedef struct  AH_SegmentRec_
-  {
-    AH_Edge_Flags  flags;
-    AH_Direction   dir;
-    FT_Pos         pos;         /* position of segment           */
-    FT_Pos         min_coord;   /* minimum coordinate of segment */
-    FT_Pos         max_coord;   /* maximum coordinate of segment */
-
-    AH_Edge        edge;
-    AH_Segment     edge_next;
-
-    AH_Segment     link;        /* link segment               */
-    AH_Segment     serif;       /* primary segment for serifs */
-    FT_Pos         num_linked;  /* number of linked segments  */
-    FT_Pos         score;
-
-    AH_Point       first;       /* first point in edge segment             */
-    AH_Point       last;        /* last point in edge segment              */
-    AH_Point*      contour;     /* ptr to first point of segment's contour */
-
-  } AH_SegmentRec;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    AH_EdgeRec                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A structure used to describe an edge, which really is a horizontal */
-  /*    or vertical coordinate to be hinted depending on the segments      */
-  /*    located on it.                                                     */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    fpos       :: The original edge position in font units.            */
-  /*                                                                       */
-  /*    opos       :: The original scaled edge position.                   */
-  /*                                                                       */
-  /*    pos        :: The hinted edge position.                            */
-  /*                                                                       */
-  /*    flags      :: The segment edge flags (straight, rounded, etc.).    */
-  /*                                                                       */
-  /*    dir        :: The main segment direction on this edge.             */
-  /*                                                                       */
-  /*    scale      :: Scaling factor between original and hinted edge      */
-  /*                  positions.                                           */
-  /*                                                                       */
-  /*    blue_edge  :: Indicate the blue zone edge this edge is related to. */
-  /*                  Only set for some of the horizontal edges in a latin */
-  /*                  font.                                                */
-  /*                                                                       */
-  /*    link       :: The linked edge.                                     */
-  /*                                                                       */
-  /*    serif      :: The serif edge.                                      */
-  /*                                                                       */
-  /*    num_linked :: The number of other edges that pair to this one.     */
-  /*                                                                       */
-  /*    score      :: Used to score the edge when selecting them.          */
-  /*                                                                       */
-  /*    first      :: The first edge segment.                              */
-  /*                                                                       */
-  /*    last       :: The last edge segment.                               */
-  /*                                                                       */
-  typedef struct  AH_EdgeRec_
-  {
-    FT_Pos         fpos;
-    FT_Pos         opos;
-    FT_Pos         pos;
-
-    AH_Edge_Flags  flags;
-    AH_Direction   dir;
-    FT_Fixed       scale;
-    FT_Pos*        blue_edge;
-
-    AH_Edge        link;
-    AH_Edge        serif;
-    FT_Int         num_linked;
-
-    FT_Int         score;
-
-    AH_Segment     first;
-    AH_Segment     last;
-
-
-  } AH_EdgeRec;
-
-
-  /* an outline as seen by the hinter */
-  typedef struct  AH_OutlineRec_
-  {
-    FT_Memory     memory;
-
-    AH_Direction  vert_major_dir;   /* vertical major direction   */
-    AH_Direction  horz_major_dir;   /* horizontal major direction */
-
-    FT_Fixed      x_scale;
-    FT_Fixed      y_scale;
-    FT_Pos        edge_distance_threshold;
-
-    FT_Int        max_points;
-    FT_Int        num_points;
-    AH_Point      points;
-
-    FT_Int        max_contours;
-    FT_Int        num_contours;
-    AH_Point*     contours;
-
-    FT_Int        num_hedges;
-    AH_Edge       horz_edges;
-
-    FT_Int        num_vedges;
-    AH_Edge       vert_edges;
-
-    FT_Int        num_hsegments;
-    AH_Segment    horz_segments;
-
-    FT_Int        num_vsegments;
-    AH_Segment    vert_segments;
-
-  } AH_OutlineRec, *AH_Outline;
-
-
-#ifdef FT_CONFIG_CHESTER_SMALL_F
-
-#define AH_BLUE_CAPITAL_TOP     0                              /* THEZOCQS */
-#define AH_BLUE_CAPITAL_BOTTOM  ( AH_BLUE_CAPITAL_TOP + 1 )    /* HEZLOCUS */
-#define AH_BLUE_SMALL_F_TOP     ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* fijkdbh  */
-#define AH_BLUE_SMALL_TOP       ( AH_BLUE_SMALL_F_TOP + 1 )    /* xzroesc  */
-#define AH_BLUE_SMALL_BOTTOM    ( AH_BLUE_SMALL_TOP + 1 )      /* xzroesc  */
-#define AH_BLUE_SMALL_MINOR     ( AH_BLUE_SMALL_BOTTOM + 1 )   /* pqgjy    */
-#define AH_BLUE_MAX             ( AH_BLUE_SMALL_MINOR + 1 )
-
-#else /* !FT_CONFIG_CHESTER_SMALL_F */
-
-#define AH_BLUE_CAPITAL_TOP     0                              /* THEZOCQS */
-#define AH_BLUE_CAPITAL_BOTTOM  ( AH_BLUE_CAPITAL_TOP + 1 )    /* HEZLOCUS */
-#define AH_BLUE_SMALL_TOP       ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* xzroesc  */
-#define AH_BLUE_SMALL_BOTTOM    ( AH_BLUE_SMALL_TOP + 1 )      /* xzroesc  */
-#define AH_BLUE_SMALL_MINOR     ( AH_BLUE_SMALL_BOTTOM + 1 )   /* pqgjy    */
-#define AH_BLUE_MAX             ( AH_BLUE_SMALL_MINOR + 1 )
-
-#endif /* !FT_CONFIG_CHESTER_SMALL_F */
-
-  typedef FT_Int  AH_Blue;
-
-
-#define AH_HINTER_MONOCHROME  1
-#define AH_HINTER_OPTIMIZE    2
-
-  typedef FT_Int  AH_Hinter_Flags;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    AH_GlobalsRec                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Holds the global metrics for a given font face (be it in design    */
-  /*    units or scaled pixel values).                                     */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    num_widths  :: The number of widths.                               */
-  /*                                                                       */
-  /*    num_heights :: The number of heights.                              */
-  /*                                                                       */
-  /*    stds        :: A two-element array giving the default stem width   */
-  /*                   and height.                                         */
-  /*                                                                       */
-  /*    widths      :: Snap widths, including standard one.                */
-  /*                                                                       */
-  /*    heights     :: Snap height, including standard one.                */
-  /*                                                                       */
-  /*    blue_refs   :: The reference positions of blue zones.              */
-  /*                                                                       */
-  /*    blue_shoots :: The overshoot positions of blue zones.              */
-  /*                                                                       */
-  typedef struct  AH_GlobalsRec_
-  {
-    FT_Int  num_widths;
-    FT_Int  num_heights;
-
-    FT_Pos  stds[2];
-
-    FT_Pos  widths [AH_MAX_WIDTHS];
-    FT_Pos  heights[AH_MAX_HEIGHTS];
-
-    FT_Pos  blue_refs  [AH_BLUE_MAX];
-    FT_Pos  blue_shoots[AH_BLUE_MAX];
-
-  } AH_GlobalsRec, *AH_Globals;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Struct>                                                              */
-  /*    AH_Face_GlobalsRec                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Holds the complete global metrics for a given font face (i.e., the */
-  /*    design units version + a scaled version + the current scales       */
-  /*    used).                                                             */
-  /*                                                                       */
-  /* <Fields>                                                              */
-  /*    face    :: A handle to the source face object                      */
-  /*                                                                       */
-  /*    design  :: The globals in font design units.                       */
-  /*                                                                       */
-  /*    scaled  :: Scaled globals in sub-pixel values.                     */
-  /*                                                                       */
-  /*    x_scale :: The current horizontal scale.                           */
-  /*                                                                       */
-  /*    y_scale :: The current vertical scale.                             */
-  /*                                                                       */
-  /*    control_overshoot ::                                               */
-  /*               Currently unused.                                       */
-  /*                                                                       */
-  typedef struct  AH_Face_GlobalsRec_
-  {
-    FT_Face        face;
-    AH_GlobalsRec  design;
-    AH_GlobalsRec  scaled;
-    FT_Fixed       x_scale;
-    FT_Fixed       y_scale;
-    FT_Bool        control_overshoot;
-
-  } AH_Face_GlobalsRec, *AH_Face_Globals;
-
-
-  typedef struct  AH_HinterRec_
-  {
-    FT_Memory        memory;
-    AH_Hinter_Flags  flags;
-
-    FT_Int           algorithm;
-    FT_Face          face;
-
-    AH_Face_Globals  globals;
-
-    AH_Outline       glyph;
-
-    AH_Loader        loader;
-    FT_Vector        pp1;               /* horizontal phantom points */
-    FT_Vector        pp2;
-    /* we ignore vertical phantom points */
-
-    FT_Bool          transformed;
-    FT_Vector        trans_delta;
-    FT_Matrix        trans_matrix;
-
-    FT_Bool          do_horz_hints;     /* disable X hinting            */
-    FT_Bool          do_vert_hints;     /* disable Y hinting            */
-    FT_Bool          do_horz_snapping;  /* disable X stem size snapping */
-    FT_Bool          do_vert_snapping;  /* disable Y stem size snapping */
-    FT_Bool          do_stem_adjust;    /* disable light stem snapping  */
-
-  } AH_HinterRec, *AH_Hinter;
-
-
-#ifdef DEBUG_HINTER
-  extern AH_Hinter  ah_debug_hinter;
-  extern FT_Bool    ah_debug_disable_horz;
-  extern FT_Bool    ah_debug_disable_vert;
-#else
-#define ah_debug_disable_horz  0
-#define ah_debug_disable_vert  0
-#endif /* DEBUG_HINTER */
-
-
-FT_END_HEADER
-
-#endif /* __AHTYPES_H__ */
-
-
-/* END */
diff --git a/src/autohint/autohint.c b/src/autohint/autohint.c
deleted file mode 100644
index 3783a82..0000000
--- a/src/autohint/autohint.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  autohint.c                                                             */
-/*                                                                         */
-/*    Automatic Hinting wrapper (body only).                               */
-/*                                                                         */
-/*  Copyright 2000-2001 Catharon Productions Inc.                          */
-/*  Author: David Turner                                                   */
-/*                                                                         */
-/*  This file is part of the Catharon Typography Project and shall only    */
-/*  be used, modified, and distributed under the terms of the Catharon     */
-/*  Open Source License that should come with this file under the name     */
-/*  `CatharonLicense.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 that this license is compatible with the FreeType license.        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#define FT_MAKE_OPTION_SINGLE_OBJECT
-
-#include <ft2build.h>
-#include "ahangles.c"
-#include "ahglyph.c"
-#include "ahglobal.c"
-#include "ahhint.c"
-#include "ahmodule.c"
-
-
-/* END */
diff --git a/src/autohint/mather.py b/src/autohint/mather.py
deleted file mode 100644
index 8ad8b55..0000000
--- a/src/autohint/mather.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env python
-#
-
-#
-# autohint math table builder
-#
-
-
-# Copyright 1996-2000 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.
-
-
-import math
-
-ag_pi = 256
-
-def print_arctan( atan_bits ):
-    atan_base = 1 << atan_bits
-
-    print "  static AH_Angle  ag_arctan[1L << AG_ATAN_BITS] ="
-    print "  {"
-
-    count = 0
-    line  = "   "
-
-    for n in range( atan_base ):
-        comma = ","
-        if ( n == atan_base - 1 ):
-            comma = ""
-
-        angle = math.atan( n * 1.0 / atan_base ) / math.pi * ag_pi
-        line  = line + " " + repr( int( angle + 0.5 ) ) + comma
-        count = count + 1;
-        if ( count == 8 ):
-            count = 0
-            print line
-            line = "   "
-
-    if ( count > 0 ):
-        print line
-    print "  };"
-
-
-# This routine is not used currently.
-#
-def print_sines():
-    print "  static FT_Fixed  ah_sines[AG_HALF_PI + 1] ="
-    print "  {"
-
-    count = 0
-    line  = "   "
-
-    for n in range( ag_pi / 2 ):
-        sinus = math.sin( n * math.pi / ag_pi )
-        line  = line + " " + repr( int( 65536.0 * sinus ) ) + ","
-        count = count + 1
-        if ( count == 8 ):
-            count = 0
-            print line
-            line = "   "
-
-    if ( count > 0 ):
-        print line
-    print "   65536"
-    print "  };"
-
-
-print_arctan( 8 )
-print
-
-
-# END
diff --git a/src/autohint/module.mk b/src/autohint/module.mk
deleted file mode 100644
index edc9f4e..0000000
--- a/src/autohint/module.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# FreeType 2 auto-hinter module definition
-#
-
-
-# Copyright 2000 Catharon Productions Inc.
-# Author: David Turner
-#
-# This file is part of the Catharon Typography Project and shall only
-# be used, modified, and distributed under the terms of the Catharon
-# Open Source License that should come with this file under the name
-# `CatharonLicense.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 that this license is compatible with the FreeType license.
-
-
-make_module_list: add_autohint_module
-
-add_autohint_module:
-	$(OPEN_DRIVER)autohint_module_class$(CLOSE_DRIVER)
-	$(ECHO_DRIVER)autohint  $(ECHO_DRIVER_DESC)automatic hinting module$(ECHO_DRIVER_DONE)
-
-# EOF
diff --git a/src/autohint/rules.mk b/src/autohint/rules.mk
deleted file mode 100644
index ee264e8..0000000
--- a/src/autohint/rules.mk
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# FreeType 2 auto-hinter module configuration rules
-#
-
-
-# Copyright 2000, 2001, 2002, 2003 Catharon Productions Inc.
-# Author: David Turner
-#
-# This file is part of the Catharon Typography Project and shall only
-# be used, modified, and distributed under the terms of the Catharon
-# Open Source License that should come with this file under the name
-# `CatharonLicense.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 that this license is compatible with the FreeType license.
-
-
-# AUTO driver directory
-#
-AUTO_DIR := $(SRC_DIR)/autohint
-
-
-# compilation flags for the driver
-#
-AUTO_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(AUTO_DIR))
-
-
-# AUTO driver sources (i.e., C files)
-#
-AUTO_DRV_SRC := $(AUTO_DIR)/ahangles.c \
-                $(AUTO_DIR)/ahglobal.c \
-                $(AUTO_DIR)/ahglyph.c  \
-                $(AUTO_DIR)/ahhint.c   \
-                $(AUTO_DIR)/ahmodule.c
-
-# AUTO driver headers
-#
-AUTO_DRV_H := $(AUTO_DRV_SRC:%c=%h)  \
-              $(AUTO_DIR)/ahloader.h \
-              $(AUTO_DIR)/ahtypes.h  \
-              $(AUTO_DIR)/aherrors.h
-
-
-# AUTO driver object(s)
-#
-#   AUTO_DRV_OBJ_M is used during `multi' builds.
-#   AUTO_DRV_OBJ_S is used during `single' builds.
-#
-AUTO_DRV_OBJ_M := $(AUTO_DRV_SRC:$(AUTO_DIR)/%.c=$(OBJ_DIR)/%.$O)
-AUTO_DRV_OBJ_S := $(OBJ_DIR)/autohint.$O
-
-# AUTO driver source file for single build
-#
-AUTO_DRV_SRC_S := $(AUTO_DIR)/autohint.c
-
-
-# AUTO driver - single object
-#
-$(AUTO_DRV_OBJ_S): $(AUTO_DRV_SRC_S) $(AUTO_DRV_SRC) \
-                   $(FREETYPE_H) $(AUTO_DRV_H)
-	$(AUTO_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(AUTO_DRV_SRC_S))
-
-
-# AUTO driver - multiple objects
-#
-$(OBJ_DIR)/%.$O: $(AUTO_DIR)/%.c $(FREETYPE_H) $(AUTO_DRV_H)
-	$(AUTO_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
-
-
-# update main driver object lists
-#
-DRV_OBJS_S += $(AUTO_DRV_OBJ_S)
-DRV_OBJS_M += $(AUTO_DRV_OBJ_M)
-
-
-# EOF