summaryrefslogtreecommitdiff
path: root/fonts/apl/cmapl10.mf
blob: 64b68cd341655296354348ee68bba2aba8b490ee (plain)
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

%====================================================================
%           This material is from  C M T E X 1 0 . M F
%====================================================================

% Computer Modern TeX extended ASCII characters for use with 10 point
if unknown cmbase: input cmbase fi

font_identifier:="CMAPL"; font_size 10pt#;

u#:=21/36pt#;			% unit width
width_adj#:=0pt#;		% width adjustment for certain characters
serif_fit#:=0pt#;		% extra sidebar near lowercase serifs
cap_serif_fit#:=0pt#;		% extra sidebar near uppercase serifs
letter_fit#:=0pt#;		% extra space added to all sidebars

body_height#:=250/36pt#;	% height of tallest characters
asc_height#:=220/36pt#;		% height of lowercase ascenders
cap_height#:=220/36pt#;		% height of caps
fig_height#:=220/36pt#;		% height of numerals
x_height#:=155/36pt#;		% height of lowercase without ascenders
math_axis#:=110/36pt#;		% axis of symmetry for math symbols
bar_height#:=79/36pt#;		% height of crossbar in lowercase e
comma_depth#:=50/36pt#;		% depth of comma below baseline
desc_depth#:=80/36pt#;		% depth of lowercase descenders

crisp#:=22/36pt#;		% diameter of serif corners
tiny#:=22/36pt#;		% diameter of rounded corners
fine#:=21/36pt#;		% diameter of sharply rounded corners
thin_join#:=21/36pt#;		% width of extrafine details
hair#:=25/36pt#;		% lowercase hairline breadth
stem#:=25/36pt#;		% lowercase stem breadth
curve#:=25/36pt#;		% lowercase curve breadth
ess#:=22/36pt#;			% breadth in middle of lowercase s
flare#:=32/36pt#;		% diameter of bulbs or breadth of terminals
dot_size#:=36/36pt#;		% diameter of dots
cap_hair#:=25/36pt#;		% uppercase hairline breadth
cap_stem#:=25/36pt#;		% uppercase stem breadth
cap_curve#:=25/36pt#;		% uppercase curve breadth
cap_ess#:=25/36pt#;		% breadth in middle of uppercase s
rule_thickness#:=25/36pt#;	% thickness of lines in math symbols

dish#:=0pt#;			% amount erased at top or bottom of serifs
bracket#:=0pt#;			% vertical distance from serif base to tangent
jut#:=34/36pt#;			% protrusion of lowercase serifs
cap_jut#:=34/36pt#;		% protrusion of uppercase serifs
beak_jut#:=0pt#;		% horizontal protrusion of beak serifs
beak#:=34/36pt#;		% vertical protrusion of beak serifs
vair#:=22/36pt#;		% vertical diameter of hairlines
notch_cut#:=25/36pt#;		% maximum breadth above or below notches
bar#:=22/36pt#;			% lowercase bar thickness
slab#:=22/36pt#;		% serif and arm thickness
cap_bar#:=22/36pt#;		% uppercase bar thickness
cap_band#:=22/36pt#;		% uppercase thickness above/below lobes
cap_notch_cut#:=25/36pt#;	% max breadth above/below uppercase notches
serif_drop#:=0pt#;		% vertical drop of sloped serifs
stem_corr#:=0pt#;		% for small refinements of stem breadth
vair_corr#:=0pt#;		% for small refinements of hairline height
apex_corr#:=10/36pt#;		% extra width at diagonal junctions

o#:=4/36pt#;			% amount of overshoot for curves
apex_o#:=3/36pt#;		% amount of overshoot for diagonal junctions

%-------------------------------------------
% (AH) the tilt ratio has been changed to 0.
%-------------------------------------------

slant:=0;			% tilt ratio $(\Delta x/\Delta y)$
fudge:=0.81;			% factor applied to weights of heavy characters
math_spread:=-1;		% extra openness of math symbols
superness:=1/sqrt2;		% parameter for superellipses
superpull:=0;			% extra openness inside bowls
beak_darkness:=0;		% fraction of triangle inside beak serifs
ligs:=0;			% level of ligatures to be included

square_dots:=false;		% should dots be square?
hefty:=true;			% should we try hard not to be overweight?
serifs:=true;			% should serifs and bulbs be attached?
monospace:=true;		% should all characters have the same width?
variant_g:=false;		% should an italic-style g be used?
low_asterisk:=true;		% should the asterisk be centered at the axis?
math_fitting:=false;		% should math-mode spacing be used?




%===============================================================
%            This material is from  T E X S E T . M F
%===============================================================



% Special version of Computer Modern for \TeX's extended ASCII character set

font_coding_scheme:="TeX extended ASCII";

mode_setup; font_setup; mono_charic#:=0;


	cmchar "An empty space";		%  This character
	beginchar(" ",8u#,0,0);			%  was entirely
	adjust_fit(0,0);			%  defined by
	endchar;				%  O J K .  



% These characters were copied from greekl.mf and 
% with character positions changed and italic corrections added to the width.


cmchar "Lowercase Greek alpha for extended ASCII";
beginchar(oct"004",11u#,x_height#,0);
italcorr max(1/3x_height#*slant+.5hair#+.5u#,x_height#*slant-.5u#);
adjust_fit(0,0); pickup fine.nib;
pos0(hair,0); pos1(vair,-90); pos2(curve,-180); pos3(vair,-270);
z4=(w-3.25u,9/16h); z5=(w-2.75u,.5[vair,y4]);
numeric theta; theta=angle(z4-z5)-90;
pos4(stem,theta); pos5(stem,theta);
pos6(vair,90); pos7(hair,180);
rt x0r=hround(w-u); x1=x3=.5w-u; lft x2r=hround(1.5u-.5curve);
x6=w-u; x7+.5hair=hround(w+.5hair-eps);
top y0=vround .8[bar_height,h]; bot y1r=bot y6l=-oo;
y2=.5[y1,y3]; top y3r=h+oo; y7=1/4bar_height;
filldraw stroke z0e{down}...pulled_arc.e(1,2) & pulled_arc.e(2,3)
 ...z4e---z5e...z6e{right}...{up}z7e; % diagonal, bowl, and hook
penlabels(0,1,2,3,4,5,6,7); endchar;



                                                  
                                            % Rejected(OJK) at this stage %
%  cmchar "Lowercase Greek epsilon";        %=============================%  
%  beginchar(oct"002",8u#,x_height#,0);
%  italcorr x_height#*slant+.5hair#-2u#;
%  adjust_fit(0,0); pickup fine.nib;
%  pos0(bar,90); pos1(bar,90); pos2(curve,180);
%  pos3(vair,270); pos4(hair,300); pos6(bar,90); pos7(bar,90);
%  x1=.5w+.5u; x0=x1+u; lft x2r=hround(1.5u-.5curve); x3=.5[x0,x1];
%  x4r=good.x(w-u); x5=w+.5u; x6=x0; z7=z2l;
%  top y0r=top y1r=h; y2=y5=y6=bar_height; bot y3r=-oo;
%  path p; p=z3r{right}...{up}z5;
%  numeric t; t=ypart(((x4r,y3r)--(x4r,y5))intersectiontimes p);
%  y4r=ypart point t of p;
%  filldraw circ_stroke z0e..pulled_arc.e(1,2) & pulled_arc.e(2,3)
%  ..z4e{direction t of p};	% arc
%  filldraw circ_stroke z6e--z7e;	% bar
%  penlabels(0,1,2,3,4,5,6,7); endchar;

% This letter has been copied from ITALMS.MF as the
% original iota from GREEKL.MF had only one hook (the 
% iota symbol in APL needs two)
cmchar "iota";
beginchar(oct"015",5u#,x_height#,0);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib;
x0=0; x5=w; x2=.5w+.25u; x3=.5w-.25u;
hook_in(0,1,2)(skewed); hook_out(3,4,5)(skewed);	% hooks
filldraw stroke z2e--z3e;	% stem
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#);
penlabels(0,1,2,3,4,5); endchar;

cmchar "Lowercase Greek rho";
beginchar(oct"014",8.25u#,x_height#,desc_depth#);
italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi;
adjust_fit(0,0); pickup fine.nib;
pos1(stem,180); pos2(stem,180); pos3(vair,90);
pos4(curve,0); pos5(vair,-90); pos6(hair,-180);
lft x2r=hround(1.5u-.5stem); x1=x2=x6; x3=x5=.5[x2,x4];
rt x4r=hround(w-1.5u+.5curve);
y1-.5stem=-d-o; y2=y4=y6=.5[y3,y5]; top y3r=h+oo; bot y5r=-oo;
filldraw circ_stroke z1e..pulled_arc.e(2,3) & pulled_arc.e(3,4)
 & pulled_arc.e(4,5) & pulled_arc.e(5,6);	% stem and bowl
penlabels(1,2,3,4,5,6); endchar;

cmchar "Lowercase Greek omega";
beginchar(oct"005",11u#,x_height#,0);
italcorr x_height#*slant;
adjust_fit(0,0); pickup fine.nib;
pos2(hair,-180); lft x2r=hround.5u; y2=y4=y6=y8=bar_height;
y1+.5hair=h; x1=x2+.75u; pos1(hair,angle(2(x1-x2),y1-y2)+90);
pos3(vstem+dw,-90); pos4(hair,0); pos5(vair,90);
pos6(hair,180); pos7(vstem+dw,270); pos8(hair,360);
bot y3r=bot y7r=-oo; top y5r=vround(.2[y4,h]+.5vair);
x3=.5[x2,x4]; x7+.25u=.5[x6,x8]; rt x8r=hround(w-.5u);
x5+.5stem=hround(.5w+.5stem)+eps;
x5=.5[x4,x6]; rt x4r-lft x6r=min(stem,2hair)+2eps;
if x4l<x6l: x4l:=x6l:=x5; fi
filldraw circ_stroke z1e{2(x2-x1),y2-y1}...z2e{down}...z3e{right}
 ...{up}z4e...{left}z5e;	% left arc
filldraw stroke z5e{left}...z6e{down}...z7e{right}...{up}z8e;	% right arc
v_bulb(8,9);	% closing bulb
penlabels(0,1,2,3,4,5,6,7,8,9);
endchar;

%=================================================================
%               (the end of Greek characters for APL)
%=================================================================


currenttransform:=identity yscaled aspect_ratio scaled granularity;



%==================================================================
%                   from  R O M A N D . M F
%==================================================================

% Computer Modern Roman digits:
% Character codes \0060 through \0071 are generated.

% All digits have the same height, width, depth, and italic correction.

cmchar "The numeral 0";
beginchar("0",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
penpos1(vair,90); penpos3(vair,-90); penpos2(curve,180); penpos4(curve,0);
if not monospace: interim superness:=sqrt(more_super*hein_super); fi
x2r=hround max(.7u,1.45u-.5curve); x4r=w-x2r; x1=x3=.5w;
y1r=h+o; y3r=-o; y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;	% bowl
penlabels(1,2,3,4); endchar;

cmchar "The numeral 1";
beginchar("1",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric light_stem; light_stem=hround .4[stem',cap_stem'];
pickup tiny.nib;
pos1(light_stem,0); pos2(light_stem,0);
lft x1l=lft x2l=hround(.5(w+.5u)-.5cap_stem'); top y1=h+o; bot y2=0;
filldraw stroke z1e--z2e;	% stem
if not serifs: save slab; slab=bar; fi
dish_serif(2,1,a,1/3,min(2.25u,lft x2l-1.5u),
  b,1/3,min(2.25u,w-1.25u-rt x2r)); % serif
pickup crisp.nib; pos3(slab,-90); pos4(bar,-90);
top y3l=h+o; top y4l=if monospace: .8 else: .9 fi\\ h+o;
lft x4=max(1.25u,tiny.lft x1l-2.35u);
tiny.rt x1r=lft x3+.25[tiny,hair];
erase fill z3l{x4l-x3l,3(y4l-y3l)}...z4l{left}
 --(x4l,h+o+1)--(x3l,h+o+1)--cycle; % erase excess at top
filldraw stroke z3e{x4e-x3e,3(y4e-y3e)}..z4e{left};	% point
penlabels(1,2,3,4); endchar;

cmchar "The numeral 2";
beginchar("2",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric arm_thickness, hair_vair; hair_vair=.25[vair,hair];
arm_thickness=Vround(if hefty:slab+2stem_corr else:.4[stem,cap_stem] fi);
pickup crisp.nib; pos7(arm_thickness,-90); pos8(hair,0);
bot y7r=0; lft x7=hround .9u; rt x8r=hround(w-.9u); y8=good.y(y7l+beak/2)+eps;
arm(7,8,a,.3beak_darkness,beak_jut);	% arm and beak
pickup fine.nib; pos2(slab,90); pos3(.4[curve,cap_curve],0);
top y2r=h+o; x2=.5(w-.5u); rt x3r=hround(w-.9u); y3+.5vair=.75h;
if serifs: numeric bulb_diam; bulb_diam=hround(flare+2/3(cap_stem-stem));
 pos0(bulb_diam,180); pos1(cap_hair,180);
 lft x1r=hround .9u; y1-.5bulb_diam=2/3h;
 (x,y2l)=whatever[z1l,z2r]; x2l:=x; bulb(2,1,0);	% bulb and arc
else: x2l:=x2l-.25u; pos1(flare,angle(-9u,h));
 lft x1r=hround .75u; bot y1l=vround .7h; y1r:=good.y y1r+eps; x1l:=good.x x1l;
 filldraw stroke term.e(2,1,left,.9,4); fi	% terminal and arc
pos4(.25[hair_vair,cap_stem],0);
pos5(hair_vair,0); pos6(hair_vair,0);
y5=arm_thickness; y4=.3[y5,y3]; top y6=min(y5,slab,top y7l);
lft x6l=crisp.lft x7; z4l=whatever[z6l,(x3l,bot .58h)]; z5l=whatever[z6l,z4l];
erase fill z4l--z6l--lft z6l--(lft x6l,y4l)--cycle;	% erase excess at left
filldraw stroke z2e{right}..tension atleast .9 and atleast 1
 ..z3e{down}.. z4e---z5e--z6e;	% stroke
penlabels(0,1,2,3,4,5,6,7,8); endchar;

cmchar "The numeral 3";
beginchar("3",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric top_thickness,mid_thickness,bot_thickness;
top_thickness=max(fine.breadth,vround(slab-2vair_corr));
mid_thickness=max(fine.breadth,vround 2/3vair);
bot_thickness=max(fine.breadth,vround(slab-vair_corr));
pickup fine.nib; pos2(top_thickness,90); top y2r=h+o;
pos3(max(fine.breadth,.6[curve,cap_curve]-stem_corr),0);
rt x3r=hround(w-1.25u);
pos4(vair,-90); pos5(vair,-90);
pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7];
pos7(cap_curve,0); rt x7r=hround(w-.75u); lft x5=min(hround 3u,lft x6)-eps;
pos8(bot_thickness,-90); bot y8r=-o;
y3=.6[top y4l,bot y2l]; y7=.5[bot y6l,top y8l];
top y5l=vround(.54h+.5vair); y5r=y6l;
x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h);
filldraw stroke pulled_super_arc.e(2,3)(.5superpull)
 & z3e{down}...z4e---z5e;	% upper bowl
filldraw z5r--z6l--z6r--z5l---cycle;	% middle tip
filldraw stroke pulled_super_arc.e(6,7)(.5superpull)
 & pulled_super_arc.e(7,8)(.5superpull);	% lower bowl
if serifs: numeric bulb_diam[];
 bulb_diam1=flare+.5(cap_stem-stem); bulb_diam2=flare+cap_stem-stem;
 pos0(bulb_diam1,180); pos1(hair,180);
 lft x0r=hround 1.25u; y0=min(.9h-.5bulb_diam1,.75h+.5bulb_diam1);
 bulb(2,1,0);	% upper bulb
 pos10(bulb_diam2,-180); pos9(cap_hair,-180);
 lft x10r=hround .75u; y10=max(.1h+.5bulb_diam2,.3h-.5bulb_diam2);
 bulb(8,9,10);	% lower bulb
else: pos1(.5[vair,flare],angle(-8u,h));
 lft x1r=hround u; bot y1l=vround .75h+o;
 y1r:=good.y y1r+eps; x1l:=good.x x1l;
 pos9(bot_thickness,angle(-2u,-h));
 lft x9r=hround .75u; top y9l=vround .25h-o;
 y9r:=good.y y9r-eps; x9l:=good.x x9l;
 filldraw stroke term.e(2,1,left,1,4);	% upper terminal
 filldraw stroke term.e(8,9,left,1,4); fi	% lower terminal
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

cmchar "The numeral 4";
beginchar("4",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric light_stem, light_stem', diag_stem, alpha, cut; cut=.75notch_cut;
light_stem=hround .4[fudged.stem,fudged.cap_stem];
light_stem'=hround max(tiny.breadth,light_stem-2stem_corr);
diag_stem=max(tiny.breadth,.4[vair,fudged.hair]);
pickup crisp.nib; pos5(cap_bar,90); pos6(cap_bar,90);
lft x5=hround .5u; rt x6=hround(w-.5u);
top y5r=vround(if serifs: 5/18[slab,h-light_stem]+1
 else:.35(h-light_stem) fi+.5cap_bar);
z4l=top lft z5r; y2=y2'=y5=y6; x1r=x2r=hround(w-3u+.5light_stem);
penpos1(light_stem',0); penpos2(light_stem',0); y1=y3=h+apex_o+apex_oo;
x3r+apex_corr=x1r; alpha=diag_ratio(1,diag_stem,y3-y4l,x3r-x4l);
penpos3(alpha*diag_stem,0); penpos4(alpha*diag_stem,0);
x0=x1l; z0=whatever[z3r,z4r];
x5'=x5; z5''=z5'+penoffset z4-z3 of currentpen=whatever[z4l,z3l];
fill diag_end(2r,1r,1,.5,3l,4l)---z5''...lft z5'
 ---lft z5l -- (x4r,y5l) -- z4r
 if y0<h-cut:{z3r-z4r}...{up}(x1l-1,h-cut)
  --(x1l,h-cut) else: -- z0 fi
 --z2l--z2r--cycle;	% diagonal and upper stem
filldraw stroke z5e--z6e;	% bar
pickup tiny.nib; pos7(light_stem,0); rt x7r=x1r; bot y7=0;
pos2'(light_stem,0); x2'=x7;
filldraw stroke z2'e--z7e;	% lower stem
if serifs: dish_serif(7,2',a,1/3,1.75u,
  b,1/3,min(1.75u,w-.5u-rt x7r)); fi	% serif
penlabels(0,1,2,3,4,5,6,7); endchar;

cmchar "The numeral 5";
beginchar("5",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric bot_thickness,light_hair;
bot_thickness=max(fine.breadth,vround(slab-vair_corr));
light_hair=hround(cap_hair if hefty: -\\2stem_corr fi);
pickup tiny.nib; pos5(vair,180); pos6(vair,90);
bot y5=vround(.53h-vair); top y6r=max(vround .61803h+o,top y6r+y5+eps-y6l);
pos3(light_hair,0); pos4(light_hair,0);
lft x3l=max(1.35u,2.1u-.5light_hair); x3=x4=x5; y4=y5;
top y3=h if not hefty: +\\o fi;
filldraw stroke z3e--z4e;	% thin stem
penpos7(cap_stem-fine,0); penpos8(bot_thickness-fine,-90);
fine.rt x7r=hround(w-.9u); x8=.5[u,x7]; x6=.5[x5,x7];
erase fill z5--bot z5--(x6,bot y5)--z6{left}
 ..tension .9 and 1..{x5-x6,3(y5-y6)}cycle; % erase excess in middle
filldraw stroke z6e{left}..tension .9 and 1..{x5-x6,3(y5-y6)}z5e;	% link
pickup fine.nib; pos6'(vair,90); z6'=z6;
y7=.5[y6,y8]; bot y8r=-o;
filldraw stroke pulled_arc.e(6',7) & pulled_arc.e(7,8);	% bowl
if serifs: pos9(hair,-180); y9=.5y5; lft x9r=hround .9u;
 pos10(flare+1/3(cap_stem-stem),-180); bulb(8,9,10);	% bulb
else: pos9(3/7[bot_thickness,flare],angle(-7u,-h));
 lft x9r=hround(tiny.lft x3l-.75u); bot y9r=vround .15h-o;
 x9l:=good.x x9l; y9l:=good.y y9l;
 filldraw stroke term.e(8,9,left,1,4); fi	% terminal
if hefty: pickup crisp.nib; pos1(slab,90); pos2(hair,0);
 top y1r=h; x1=x4; rt x2r=hround(w-1.5u); y2=y1l-eps;
 arm(1,2,a,0,0);	% arm
else: numeric flag_breadth; flag_breadth=7/8[vair,cap_curve];
 pos1(flag_breadth,90); pos2(flag_breadth,60);
 pos0(vair,90); top y1r=tiny.top y3; top y2r=vround .95h+o; y0r=y1r;
 lft x1=tiny.lft x3l; x2r=.5[x1,x0]; rt x0=hround(w-1.6u);
 erase fill top z1r--z1r...{right}z2r
  --(x2r,top y1r)--cycle; % erase excess at top
 filldraw stroke z1e...{right}z2e...z0e; fi	% flag
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

cmchar "The numeral 6";
beginchar("6",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric top_thickness,bot_thickness,side_thickness,pull;
top_thickness=max(fine.breadth,vround(slab-2vair_corr));
bot_thickness=max(fine.breadth,vround(slab-vair_corr));
side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]);
pull=min(.25,1.5superpull);
pickup fine.nib; pos2(top_thickness,-270);
pos3(side_thickness,-180); pos4(bot_thickness,-90);
pos5(side_thickness,0); pos6(vair,90);
lft x3r=w-rt x5r=hround max(.75u,1.5u-.5side_thickness);
x4=x6-.1u=x2-u=.5w;
top y2r=h+o; y3=.5[y2,y4]; bot y4r=-o;
y5=.5[y4,y6]; top y6=vround 5/8h+o;
path p; p=pulled_super_arc.l(3,4)(pull);
numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5)));
pos7(thin_join,180); z7l=point t of p;
(x,y6r)=whatever[z7l,z6l]; x6r:=min(x,.5[x5r,x6]);
filldraw stroke pulled_super_arc.e(2,3)(pull)
 & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}}
 & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}}
 & z6e{left}...{direction t of p}z7e;	% arc and bowl
if serifs: pos1(hair,-360); pos0(flare,-360);
 rt x0r=max(rt x2+eps,hround(w-1.2u));
 y0=vround min(.9h-.5flare,.85h+.5flare)+o;
 {{less_tense; bulb(2,1,0)}};	% arc and bulb
else: pos1(vround .1[top_thickness,flare],90);
 top y1r=vround .97h+o; rt x1=hround(x5-.5);
 filldraw stroke term.e(2,1,right,.9,4); fi	% terminal
penlabels(0,1,2,3,4,5,6,7); endchar;

cmchar "The numeral 7";
beginchar("7",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric arm_thickness, bot_width, top_shift, top_hair;
if hefty: arm_thickness=Vround(slab+2stem_corr); top_shift=0;
 bot_width=hround .51[curve,cap_curve]; top_hair=.4[thin_join,bot_width];
else: arm_thickness=Vround .4[stem,cap_stem]; top_shift=.5u;
 bot_width=flare; top_hair=cap_hair; fi
if top_hair<tiny.breadth: top_hair:=tiny.breadth; fi
pickup crisp.nib; pos2(arm_thickness,90); pos1(hair,180);
top y2r=h; rt x2=hround(w-.75u+top_shift);
lft x1r=hround(.75u+.5top_shift); y1=good.y(y2l-beak/2)-eps;
arm(2,1,a,.3beak_darkness,-beak_jut);	% arm and beak
pos3(hair,180); y3=good.y(y2r+beak/6)+eps; z3r=whatever[z1r,z.a0];
penpos2'(eps,-90); z2'=z2r;
arm(2',3,b,beak_darkness,x3r-x.a0);	% upward extension of beak
pickup tiny.nib; pos4(top_hair,0); pos6(bot_width,0);
bot y4=max(h-arm_thickness,h-slab,bot y2l); rt x4r=crisp.rt x2;
lft x6l=hround(3.5u+top_shift-.5bot_width);
if serifs: y6-.5bot_width=-o; filldraw z6l{down}..{up}z6r--cycle;	% bulb
else: bot y6=-oo; fi
if hefty: erase fill rt z4r--z4r...{down}z6r
  --(rt x4r,y6)--cycle;	% erase excess at top
 filldraw stroke z4e...{down}z6e;	% stroke
else: pos5(top_hair,0); y5=2/3h; z5=whatever[z4,(.75u,y6)];
 erase fill rt z4r--z4r--z5r--(rt x4r,y5)--cycle;	% erase excess at top
 filldraw stroke z4e---z5e...{down}z6e; fi	% stroke
penlabels(1,2,3,4,5,6); endchar;

cmchar "The numeral 8";
beginchar("8",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric top_thickness,mid_thickness,bot_thickness,upper_side,lower_side,theta;
top_thickness=max(fine.breadth,vround(slab-2vair_corr));
bot_thickness=max(fine.breadth,vround(slab-vair_corr));
x0=.5w; y0=.54h;
if hefty: mid_thickness=vround 2/3vair; upper_side=hround(stem-3stem_corr);
 lower_side=hround min(.5[curve,cap_curve]-stem_corr,upper_side+.25u);
 penpos1(top_thickness,90); penpos2(upper_side,180);
 penpos3(mid_thickness,270); penpos8(upper_side,360);
 penpos4(mid_thickness,90); penpos7(lower_side,180);
 penpos6(bot_thickness,270); penpos5(lower_side,360);
 penpos0(vair,90); z3l=z0r; z4l=z0l;
 x1=x6=.5w; x2r=w-x8r=hround u; x7r=w-x5r=hround .75u;
 top y1r=h+o; bot y6r=-o; y2=y8=.5[y1l,y3l]; y7=y5=.5[y4l,y6l];
 filldraw stroke pulled_arc.e(1,2)
  & pulled_arc.e(2,3);	% left half of upper bowl
 filldraw stroke pulled_arc.e(4,5)
  & pulled_arc.e(5,6);	% right half of lower bowl
 filldraw stroke pulled_arc.e(6,7)
  & pulled_arc.e(7,4);	% left half of lower bowl
 filldraw stroke pulled_arc.e(3,8)
  & pulled_arc.e(8,1);	% right half of upper bowl
else: pickup fine.nib; theta=90-angle(18u,h); slope:=-h/18u;
 upper_side=max(fine.breadth,hround(.5[hair,stem]-stem_corr));
 lower_side=hround(.5[hair,stem]+stem_corr);
 pos1(top_thickness,-90); pos6(bot_thickness,-90);
 x1=x6=.5w; top y1l=h+o; bot y6r=-o; pos0(cap_stem,theta);
 lft x2l=w-rt x8l=hround 1.25u; lft x7r=w-rt x5r=hround .75u;
 x2r-x2l=upper_side-fine; x5r-x5l=lower_side-fine;
 ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r);
 ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r);
 numeric tau; tau=max(.8,.20710678/(superness-.5));
 filldraw stroke z1e{left}..tension atleast tau..z2e{down}
  ..z3e---z4e..z5e{down}..tension atleast tau..z6e{left};	% S stroke
 pos7(lower_side,180); pos8(upper_side,180);
 y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; pos9(vair,90); z9=z0;
 filldraw stroke z1e{right}..tension atleast tau..z8e{down}
  ..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke
 filldraw stroke z6e{left}..tension atleast tau..z7e{up}
  ..tension atleast tau and atleast 1..{18u,.5h}z9e; fi % lower left stroke
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;

cmchar "The numeral 9";
beginchar("9",9u#,fig_height#,0);
italcorr fig_height#*slant-.5u#;
adjust_fit(0,0);
numeric top_thickness,bot_thickness,side_thickness,pull;
top_thickness=max(fine.breadth,vround(slab-2vair_corr));
bot_thickness=max(fine.breadth,vround(slab-vair_corr));
side_thickness=max(fine.breadth,hround 1/3[curve,cap_curve]);
pull=min(.25,1.5superpull);
pickup fine.nib; pos2(bot_thickness,-90);
pos3(side_thickness,0); pos4(top_thickness,90);
pos5(side_thickness,180); pos6(vair,270);
w-rt x3r=lft x5r=hround max(.75u,1.5u-.5side_thickness);
x4-.1u=x6+.1u=x2+.75u=.5w;
bot y2r=-o; y3=.5[y2,y4]; top y4r=h+o;
y5=.5[y4,y6]; bot y6=vround 3/8h-o;
path p; p=pulled_super_arc.l(3,4)(pull);
numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5)));
pos7(thin_join,360); z7l=point t of p;
(x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]);
filldraw stroke pulled_super_arc.e(2,3)(pull)
 & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}}
 & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}}
 & z6e{right}...{direction t of p}z7e;	% arc and bowl
if serifs: pos1(hair,-180); pos0(flare,-180);
 lft x0r=min(lft x2-eps,hround 1.2u);
 y0=vround max(.1h+.5flare,.15h-.5flare)-o;
 {{less_tense; bulb(2,1,0)}};	% arc and bulb
else: pos1(.1[bot_thickness,flare],-120);
 bot y1r=vround .07h-o; lft x1r=hround 1.3u;
 filldraw stroke term.e(2,1,left,.9,4); fi	% terminal
penlabels(0,1,2,3,4,5,6,7); endchar;

                     %  R O M A N D  ends %

%=======================================================================
%                     from  P U N C T . M F
%=======================================================================


cmchar "Exclamation point";
beginchar("!",5u#+width_adj#,asc_height#,0);
italcorr asc_height#*slant-2u#-.5width_adj#+.5dot_size#;
adjust_fit(0,0);
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
lft x3l=hround(.5w-.5dot_size); bot y4l=0; z3=z4; dot(3,4);	% dot
numeric bot_width;
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos1(dot_size,0); pos2(bot_width,0);
x1=x2=x3; bot y2=.25[top y4r,x_height]+1;
if square_dots: top y1=h;
 filldraw stroke z1e--z2e;	% stem
else: top z0=(x1,h+o); y1+.5dot_size=h+o;
 filldraw z1r...z0...z1l---z2l--z2r---cycle; fi	% stem and bulb
penlabels(0,1,2,3,4); endchar;

cmchar "Left parenthesis";
beginchar("(",7u# if monospace: -u# fi,body_height#,paren_depth#);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup fine.nib;
pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0);
rt x1r=rt x3r=hround(w-u); lft x2l=hround(x1-4u if monospace: +4/3u fi);
top y1=h; y2=.5[y1,y3]=math_axis;
filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e
 ...{3(x3e-x2e),y3-y2}z3e;	% arc
penlabels(1,2,3); endchar;

cmchar "Right parenthesis";
beginchar(")",7u# if monospace: -u# fi,body_height#,paren_depth#);
italcorr math_axis#*slant-.5u#;
adjust_fit(0,0); pickup fine.nib;
pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0);
lft x1l=lft x3l=hround u; rt x2r=hround(x1+4u if monospace: -4/3u fi);
top y1=h; y2=.5[y1,y3]=math_axis;
filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e
 ...{3(x3e-x2e),y3-y2}z3e;	% arc
penlabels(1,2,3); endchar;

cmchar "Five-pointed star";
beginchar("*",9u#,v_center(x_height#));
adjust_fit(0,0); pickup crisp.nib;
numeric theta; theta=360/5; % degrees between points
pos0(curve,0); pos1(rule_thickness,90); x0=x1=good.x .5w;
top y1r=vround(math_axis+.4x_height+.5rule_thickness);    %@ .5 by .4
ypart(.5[z1,z0+(z1-z2) rotated 2theta])=math_axis;
pos2(curve,theta); pos3(rule_thickness,90+theta);
z2=z0; z3-z0=(z1-z0) rotated theta;
z4=whatever[z0l,z1r]=whatever[z2r,z3r];
filldraw for n=0 upto 4:
 z0+(z1r-z0)rotated(n*theta)--z0+(z4-z0)rotated(n*theta)--endfor
 cycle;	% star
penlabels(0,1,2,3,4); endchar;

cmchar "Plus sign";
beginarithchar("+"); pickup light_rule.nib;
x1=x2=good.x .5w; top y1=h+eps; .5[y1,y2]=math_axis;
lft x3=hround u-eps; x4=w-x3; y3=y4=math_axis;
draw z1--z2;	% stem
draw z3--z4;	% crossbar
labels(1,2,3,4); endchar;

cmchar "Comma";
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
beginchar(",",5u#,dot_diam#,comma_depth#);
adjust_fit(0,0);
x1-.5dot_diam=hround(.5w-.5dot_diam); y1-.5dot_diam=0;
comma(1,a,dot_diam,.2u,comma_depth);	% dot and tail
penlabels(1); endchar;

cmchar "Period";
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
beginchar(".",5u#,dot_diam#,0);
adjust_fit(0,0); pickup fine.nib;
pos1(dot_diam,0); pos2(dot_diam,90);
lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2);	% dot
penlabels(1,2); endchar;

cmchar "Virgule (slash)";
beginchar("/",9u#,body_height#,paren_depth#);
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup light_rule.nib;
rt x1=hround(w-u)+eps; top y1=h+eps;
lft x2=hround u-eps; bot y2=-d-eps;
draw z1--z2;	% diagonal
penlabels(1,2); endchar;

cmchar "Colon";
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
beginchar(":",5u#,x_height#,0);
italcorr x_height#*slant+.5dot_diam#-2u#;
adjust_fit(0,0); pickup fine.nib;
pos1(dot_diam,0); pos2(dot_diam,90);
lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2);	% upper dot
pos3(dot_diam,0); pos4(dot_diam,90);
x3=x1; bot y4l=0; z3=z4; dot(3,4);	% lower dot
penlabels(1,2,3,4); endchar;

cmchar "Semicolon";
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
beginchar(";",5u#,x_height#,comma_depth#);
italcorr x_height#*slant+.5dot_diam#-2u#;
adjust_fit(0,0); pickup fine.nib;
pos1(dot_diam,0); pos2(dot_diam,90);
lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2);	% upper dot
x3-.5dot_diam=hround(.5w-.5dot_diam); y3-.5dot_diam=0;
comma(3,a,dot_diam,.05u,comma_depth);	% lower dot and tail
penlabels(1,2,3); endchar;

cmchar "Equals sign";
compute_spread(.45x_height#,.55x_height#);
beginchar("=",14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0); pickup light_rule.nib;
lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
draw z1--z2;	% upper bar
draw z3--z4;	% lower bar
labels(1,2,3,4); endchar;


cmchar "Left bracket";
numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi);
beginchar("[",wd#,body_height#,paren_depth#);
italcorr body_height#*slant;
adjust_fit(0,0);
numeric top_thickness,side_thickness;
if hefty: top_thickness=vair;
 side_thickness=max(crisp.breadth,stem-2stem_corr);
else: top_thickness=side_thickness=rule_thickness; fi;
pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0);
top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5side_thickness)-1-eps;
filldraw stroke z1e--z2e;	% stem
pos3(top_thickness,90); pos4(top_thickness,90);
pos5(top_thickness,90); pos6(top_thickness,90);
x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2;
filldraw stroke z3e--z4e;	% upper bar
filldraw stroke z5e--z6e;	% lower bar
penlabels(1,2,3,4,5,6); endchar;

cmchar "Right bracket";
numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi);
beginchar("]",wd#,body_height#,paren_depth#);
italcorr body_height#*slant-2u#+.5if hefty:stem# else:rule_thickness# fi;
adjust_fit(0,0);
numeric top_thickness,side_thickness;
if hefty: top_thickness=vair;
 side_thickness=max(crisp.breadth,stem-2stem_corr);
else: top_thickness=side_thickness=rule_thickness; fi;
pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0);
top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5side_thickness)+1+eps;
filldraw stroke z1e--z2e;	% stem
pos3(top_thickness,90); pos4(top_thickness,90);
pos5(top_thickness,90); pos6(top_thickness,90);
x3=x5=x1r; lft x4=lft x6=floor .4u-eps; y3r=y4r=y1; y5l=y6l=y2;
filldraw stroke z3e--z4e;	% upper bar
filldraw stroke z5e--z6e;	% lower bar
penlabels(1,2,3,4,5,6); endchar;


                        % P U N C T  ends %


%=======================================================================
%                       from  R O M A N P . M F
%=======================================================================

cmchar "Dollar sign";
beginchar("$",9u#,body_height#,body_height#-asc_height#);
italcorr fig_height#*slant-.5u#; % same as for digits
adjust_fit(0,0);
numeric theta; theta=90-angle(50u,asc_height); slope:=-asc_height/50u;
pickup fine.nib; pos2(slab,-90);
pos0(cap_stem,theta); pos7(slab,-90);
x2=x0=x7=.5w; top y2l=asc_height+oo; bot y7r=-oo;
y0=.52asc_height; lft x3l=hround u; rt x6r=hround(w-u);
x3r-x3l=x6r-x6l=hround .35[slab,cap_stem]-fine;
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
filldraw stroke super_arc.e(2,3) & z3e{down}
 ..z4e---z5e..z6e{down} & super_arc.e(6,7);	% main stroke
if serifs: pos1(hair,0); pos8(hair,180);
 pos10(flare,0); pos9(flare,180);
 rt x1r=hround(w-u); lft x8r=hround u; y1=.5[y0,y2]; y8=.5[y0,y7];
 {{less_tense; pos2'(slab,90); z2'=z2; bulb(2',1,10);	% upper arc and bulb
 bulb(7,8,9)}};	% lower arc and bulb
else: pos1(.6[slab,flare],-100); pos8(flare,-100);
 rt x1l=hround(w-1.3u); lft x8r=hround .8u;
 top y1l=vround .92asc_height+oo; bot y8r=vround .1asc_height-oo;
 filldraw stroke term.e(2,1,right,.9,4);	% upper arc and terminal
 filldraw stroke term.e(7,8,left,1,4); fi	% lower arc and terminal
pickup crisp.nib; pos12(bar,0); pos11(bar,0);
lft x12l=lft x11l=hround(.5w-.5bar); top y12=h; bot y11=-d;
filldraw stroke z12e--z11e;	% vertical crossbar
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar;

cmchar "Question mark";
beginchar("?",8.5u#,asc_height#,0);
italcorr .8asc_height#*slant;
adjust_fit(0,0);
pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
lft x7l=hround(.5w-.25u-.5dot_size); bot y8l=0; z7=z8; dot(7,8);	% dot
numeric bot_width;
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos2(vair,90); pos3(curve,0);
pos4(vair,-90); pos5(bot_width,0); pos6(bot_width,0);
x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.25[top y8r,x_height];
top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
{{interim superness:=more_super;
filldraw stroke pulled_super_arc.e(2,3)(superpull)
 & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}};	% arc and stem
if serifs: pos1(hair,180); pos0(flare,180);
 lft x1r=hround u; y1=y3; bulb(2,1,0);	% bulb
else: pos1(Vround 5/7[vair,flare],110);
 lft x1r=hround u; top y1r=vround .9[y6,top y2r];
 filldraw stroke term.e(2,1,left,1,4); fi	% terminal
penlabels(0,1,2,3,4,5,6,7,8); endchar;

                         % R O M A N P  ends %

%=======================================================================
%                          from  T S E T
%=======================================================================


% Special characters for ``extended ASCII character set'' fonts


dieresis=oct"007"; % (AH) this is the high double dot in APL
high_minus=oct"025"; % (AH) this is the high minus symbol in APL 
elt=oct"006";
down_arrow=oct"037";
meet=oct"046";
comment=oct"042";         % (OJK) This is the comment symbol in APL.
up_arrow=oct"136";
subset=oct"022";
superset=oct"023";
cap=oct"021";
cup=oct"020";
left_arrow=oct"137";
right_arrow=oct"036";
neq=oct"027";
negation=oct"026";
diamond=oct"011";
leq=oct"012";
geq=oct"013";
join=oct"010";
minus=oct"055";
less=oct"074";
greater=oct"076";
backslash=oct"134";
underbar=oct"024";
left_brace=oct"173";
vertical=oct"174";
right_brace=oct"175";


%=====================================================================
%                          from S Y M
%=====================================================================


iff known minus: cmchar "Minus sign";
beginarithchar(minus); pickup light_rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; y1=y2=math_axis;
draw z1--z2;	% bar
labels(1,2); endchar;

%  iff known high_minus: cmchar "High minus sign";
%  beginchar(high_minus,12u#,asc_height#,0); 
%  pickup light_rule.nib; % light rule, since high_minus is like a superscript
%  lft x1=.5*w; x2=w; y1=y2=h+o;
%  draw z1--z2;	% bar
%  labels(1,2); endchar;


                %==============================================%
                % Inserted(OJK), with changes, from  ACCENT.MF %      
                %==============================================%
  

cmchar "Macron (bar) accent";
numeric macron_breadth#; macron_breadth#=.2[vair#,stem#];
beginchar(high_minus,9u#,.4[x_height#,asc_height#]+macron_breadth#,0);
italcorr h#*slant-.75u#;
adjust_fit(0,0);
numeric macron_breadth; macron_breadth:=Vround .2[vair,stem];
pickup if serifs: crisp.nib else: fine.nib fi;
pos1(macron_breadth,90); pos2(macron_breadth,90);
top y1r=top y2r=h+o; lft x1=w-rt x2=hround 1.25u;
filldraw stroke z1e--z2e;	% bar
penlabels(1,2); endchar;



cmchar "Umlaut (double dot) accent";
numeric dot_diam#,dot_diam;
dot_diam#=max(dot_size#,cap_curve#);
beginchar(dieresis,9u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
dot_diam=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr));
italcorr h#*slant+.5dot_diam#-2.25u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
x1=x2=2.75u; top y2r=h+1;
if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi
y1=.5[y2l,y2r]; dot(1,2);	% left dot
pos3(dot_diam,0); penpos4(y2r-y2l,90); y3=y4=y1; x3=x4=w-x1;
dot(3,4);	% right dot
penlabels(1,2,3,4); endchar;


                        %==================%
                        % S Y M  continues %
                        %==================%  


iff known cup: cmchar "Set union sign";
beginchar(cup,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup light_rule.nib; autorounded;
lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
y1=good.y h+o; bot y3=-o; y2=y4=2/3[y1,y3]; y5=y1;
draw z1---z2...z3...z4---z5;	% stems and cup
labels(1,2,3,4,5); endchar;

iff known cap: cmchar "Set intersection sign";
beginchar(cap,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup light_rule.nib; autorounded;
lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
y3=good.y h+o; bot y1=-o; y2=y4=2/3[y1,y3]; y5=y1;
draw z1---z2...z3...z4---z5;	% stems and cap
labels(1,2,3,4,5); endchar;


					%========================
					% Symbol designed by OJK:
					%========================
						% (using "cap")
%  cmchar "Comment sign";
%  beginchar(comment,12u#,.8asc_height#,0);
%  italcorr .8asc_height#*slant-.5u#;
%  adjust_fit(0,0); pickup light_rule.nib; autorounded;
%  lft x1=hround u; x2=x0; x4=w-x4; x6=x9=w-x1;
%  y4=good.y h+o; bot y0=-o; y2=y6=2/3[y1,y4]; y9=y0;
%  circle_points; draw_circle;     % circle
%  draw z0---z2...z4...z6---z9;	% stems and cap
%  labels(0,1,2,3,4,5,6,7,8,9); endchar;

cmchar "Comment sign";
beginchar(comment,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup light_rule.nib; autorounded;
lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
y3=good.y h+o; bot y1=-o; y2=y4=2/3[y1,y3]; y5=y1;
draw z1---z2...z3...z4---z5;	% stems and cap
x0=.5w; y3-y0=x4-x0;
z6-z0 =(z3-z0) rotated 60;
z7-z0 =(z6-z0) rotated 60;
z8-z0 =(z7-z0) rotated 60;
z9-z0 =(z8-z0) rotated 60;
z10-z0=(z9-z0) rotated 60;
draw z3...z6...z7...z8...z9...z10...cycle;     % circle
labels(0,1,2,3,4,5,6,7,8,9,10); endchar;


iff known meet: cmchar "Lattice infimum (logical and) sign";
beginchar(meet,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup light_rule.nib;
lft x1=hround u-eps; x3=w-x3; x5=w-x1;
y3=good.y h+o; bot y1=-o; y5=y1;
draw z1--z3--z5;	% diagonals
labels(1,3,5); endchar;


iff known join: cmchar "Lattice supremum (logical or) sign";
beginchar(join,12u#,.8asc_height#,0);
italcorr .8asc_height#*slant-.5u#;
adjust_fit(0,0); pickup light_rule.nib;
lft x1=hround u-eps; x3=w-x3; x5=w-x1;
y1=good.y h+o; bot y3=-o; y5=y1;
draw z1--z3--z5;	% diagonals
labels(1,3,5); endchar;


iff known down_arrow: cmchar "Downward arrow";
beginchar(down_arrow,9u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup light_rule.nib;
pos1(rule_thickness,0); pos2(rule_thickness,0);
pos3(bar,90); pos4(bar,90);
lft x1l=hround(.5w-.5rule_thickness); y1+.5rule_thickness=h;
x0=x1=x2; bot y0=-d; x0-x3=x4-x0=3u+eps;
y3=y4=y0+.24asc_height+eps;
pos5(bar,angle(z4-z0)); z5l=z0;
pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t; path p; p=z4r{z9-z4}..z6r;
t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
 --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3r{z9-z3}..z5r)
 --z3l{z9-z3}..z0 & cycle;	% arrowhead and stem
penlabels(0,1,2,3,4,5,6,9); endchar;

iff known up_arrow: cmchar "Upward arrow";
beginchar(up_arrow,9u#,asc_height#,asc_depth#);
italcorr .76asc_height#*slant+.5crisp#-u#;
adjust_fit(0,0); pickup light_rule.nib;
pos1(rule_thickness,0); pos2(rule_thickness,0);
pos3(bar,90); pos4(bar,90);
lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d;
x0=x1=x2; top y0=h; x0-x3=x4-x0=3u+eps;
y3=y4=y0-.24asc_height-eps;
pos5(bar,angle(z4-z0)); z5l=z0;
pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t; path p; p=z4l{z9-z4}..z6r;
t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
 --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3l{z9-z3}..z5r)
 --z3r{z9-z3}..z0 & cycle;	% arrowhead and stem
penlabels(0,1,2,3,4,5,6,9); endchar;

iff known left_arrow: cmchar "Leftward arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(left_arrow,18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup light_rule.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t; path p; p=z4r{z9-z4}..z6r;
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
 --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r)
 --z3l{z9-z3}..z0 & cycle;	% arrowhead and stem
penlabels(0,1,2,3,4,5,6,9); endchar;

iff known right_arrow: cmchar "Rightward arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(right_arrow,18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup light_rule.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t; path p; p=z4l{z9-z4}..z6r;
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
 --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3l{z9-z3}..z5r)
 --z3r{z9-z3}..z0 & cycle;	% arrowhead and stem
penlabels(0,1,2,3,4,5,6,9); endchar;


iff known subset: cmchar "Proper subset sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(subset,14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup light_rule.nib; autorounded;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
x4=x5=.5w; y4=y1; y5=y3;
draw z1---z4...z2{down}...z5---z3;	% arc and bars
labels(1,2,3,4,5); endchar;

iff known superset: cmchar "Proper superset sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(superset,14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup light_rule.nib; autorounded;
lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
x4=x5=.5w; y4=y1; y5=y3;
draw z1---z4...z2{down}...z5---z3;	% arc and bars
labels(1,2,3,4,5); endchar;


iff known less: cmchar "Less than sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(less,14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup light_rule.nib;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
draw z1--z2--z3;	% diagonals
labels(1,2,3); endchar;

iff known greater: cmchar "Greater than sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(greater,14u#,v_center(spread#+rule_thickness#));
italcorr math_axis#*slant-u#;
adjust_fit(0,0); pickup light_rule.nib;
rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
draw z1--z2--z3;	% diagonals
labels(1,2,3); endchar;

iff known underbar: cmchar "Underbar suitable for < and >";
compute_spread((5/8+.45)*x_height#,(3/4+.55)*x_height#);
beginchar(underbar,14u#,0,spread#-math_axis#+.5rule_thickness#);
adjust_fit(0,0); pickup light_rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; bot y1=bot y2=-d;
draw z1--z2;	% bar
labels(1,2); endchar;
                                       %=======================%
                                       % Rejected        (?):  %
				       %=======================%
%  cmchar "Overbar";
%  compute_spread((5/8+.45)*x_height#,(3/4+.55)*x_height#);
%  beginchar(oct"142",14u#,body_height#,0);
%  adjust_fit(0,0); pickup rule.nib;
%  lft x1=hround 1.5u-eps; x2=w-x1; top y1=top y2=h+o;
%  draw z1--z2;	% bar
%  labels(1,2); endchar;

iff known neq: cmchar "Unequals sign";
compute_spread(.45x_height#,.55x_height#);
beginchar(neq,14u#,v_center(4spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0); pickup light_rule.nib;
lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
draw z1--z2; draw z3--z4;	% bars
lft x6=hround 3.5u-eps; x5=w-x6; top y5=h+o; bot y6=-d-o;
draw z5--z6;	% diagonal
labels(1,2,3,4,5,6); endchar;

iff known leq: cmchar "Less than or equal to sign";
compute_spread(.45x_height#,.55x_height#);
spread#':=spread#; spread':=spread; % the spread of `$=$'
compute_spread(5/4x_height#,3/2x_height#);
beginchar(leq,14u#,v_center(spread#'+spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup light_rule.nib;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]; top y1=h;
draw z1--z2--z3;	% diagonals
x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;	% bar
labels(1,2,3,8,9); endchar;

iff known geq: cmchar "Greater than or equal to sign";
compute_spread(.45x_height#,.55x_height#);
spread#':=spread#; spread':=spread; % the spread of `$=$'
compute_spread(5/4x_height#,3/2x_height#);
beginchar(geq,14u#,v_center(spread#'+spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup light_rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
y1-y3=spread; y2=.5[y1,y3]; top y1=h;
draw z1--z2--z3;	% diagonals
x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;	% bar
labels(1,2,3,8,9); endchar;

iff known backslash: cmchar "Reverse slash (backslash)";
beginchar(backslash,9u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup light_rule.nib;
lft x1=hround u-eps; top y1=h+eps;
rt x2=hround(w-u)+eps; bot y2=-d-eps;
draw z1--z2;	% diagonal
labels(1,2); endchar;

iff known vertical: cmchar "Vertical line";
beginchar(vertical,5u#,body_height#,paren_depth#);
italcorr body_height#*slant+.5rule_thickness#-2u#;
adjust_fit(0,0); pickup light_rule.nib;
x1=x2=good.x .5w; top y1=h+eps; bot y2=-d-eps;
draw z1--z2;      % stem
labels(1,2); endchar;

%  % modified from cdot (AH)
%  iff known dieresis: cmchar "High double dot in APL";
%  beginchar(dieresis,7u#,asc_height#);
%  adjust_fit(0,0); pickup fine.nib;
%  numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
%  define_whole_blacker_pixels(dot_diam);
%  pos1(dot_diam,0); pos2(dot_diam,90);
%  pos3(dot_diam,0); pos4(dot_diam,90);
%  lft x1l=hround(.25w-.5dot_diam);y1=h;
%  lft x3l=hround(.75w-.5dot_diam);y3=h;
%  z1=z2; dot(1,2);       % first dot
%  z3=z4; dot(3,4);       % second dot
%  penlabels(1,2,3,4); endchar;


% changed (AH) from the original diamond since the diamond 
% operator in APL is taller than a square rotated by 45 degrees
iff known diamond: cmchar "Diamond operator";
beginchar(diamond,9u#,v_center(7u#));
italcorr math_axis#*slant;
adjust_fit(0,0); pickup light_rule.nib;
numeric a; a=(lft 3.5u)*sqrt(3.14159/2); % an attempt to match circle area
x4=x8=good.x .5w; w:=r:=2x4; x2=w-x6=good.x(x4+a);
y2=y6=.5[y4,y8]=math_axis; y8=good.y(y2+1.5a);
draw z2--z4--z6--z8--cycle;	% bowl
labels(2,4,6,8); endchar;

iff known left_brace: cmchar "Left curly brace";
beginchar(left_brace,9u#,body_height#,paren_depth#);
italcorr body_height#*slant+.5vair#-u#;
adjust_fit(0,0); pickup fine.nib;
forsuffixes $=1,1',4,4',7,7': pos$(vair,0); endfor
forsuffixes $=2,3,5,6: pos$(stem,0); endfor
x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
lft x4l=hround(1.5u-.5vair); lft x2l=hround(.5w-.5stem);
top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine;
filldraw z1l{left}...z2l---z3l...{left}z4l
 --z4'l{right}...z5l---z6l...{right}z7l
 --z7r--z7'r{left}...z6r---z5r...{left}.5[z4r,z4'r]{right}
 ...z3r---z2r...{right}z1'r--z1r--cycle;	% stroke
penlabels(1,2,3,4,5,6,7); endchar;

iff known right_brace: cmchar "Right curly brace";
beginchar(right_brace,9u#,body_height#,paren_depth#);
italcorr math_axis#*slant+.5vair#-u#;
adjust_fit(0,0); pickup fine.nib;
forsuffixes $=1,1',4,4',7,7': pos$(vair,0); endfor
forsuffixes $=2,3,5,6: pos$(stem,0); endfor
x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
rt x4r=hround(w-1.5u+.5vair); rt x2r=hround(.5w+.5stem);
top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine;
filldraw z1r{right}...z2r---z3r...{right}z4r
 --z4'r{left}...z5r---z6r...{left}z7r
 --z7l--z7'l{right}...z6l---z5l...{right}.5[z4l,z4'l]{left}
 ...z3l---z2l...{left}z1'l--z1l--cycle;	% stroke
penlabels(1,2,3,4,5,6,7); endchar;

%  cmchar "APL quote";
%  beginchar("'",9u#,asc_height#,0);
%  numeric top_width#,spread#; top_width#=if serifs: flare# else: stem# fi;
%  spread#=max(3u#,top_width#+.5u#); define_pixels(spread);
%  italcorr asc_height#*slant+.5top_width#+.5spread#-4u#;
%  adjust_fit(0,0);
%  x1=x2; x3=x4=w-x1; x3-x1=0; y1=y3;
%  y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height);
%  if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0);
%   pos3(flare,0); pos4(vair,0);
%   y1+.5stem=h; filldraw circ_stroke z1e--z2e;	% left stem and bulb
%   filldraw circ_stroke z3e--z4e;	% right stem and bulb
%  else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
%   top y1=h; filldraw stroke z1e--z2e;	% left stem
%   pos3(stem,0); pos4(vair,0);
%   filldraw stroke z3e--z4e; fi	% right stem
%  penlabels(1,2,3,4); endchar;


       %================================================================%
       % The next definition inserted(OJK), with changes, from PUNCT.MF %
       %================================================================%


%  cmchar "Apostrophe";
%  beginchar("'",5u#,asc_height#,0);
%  italcorr asc_height#*slant+.5dot_size#-2u#;
%  adjust_fit(0,0);
%  x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h;
%  if monospace: comma(1,a,dot_size,.28u,vround 1.5comma_depth);   % large comma
%  else: comma(1,a,dot_size,.25u,comma_depth); fi     % comma with increased jut
%  penlabels(1); endchar;


		        %=================================%
		        % This trial is from QUOTE.MF(?): %
		        %=================================%


%cmchar "Straight single quote";
%beginchar("'",5u#,asc_height#,0);
%italcorr asc_height#*slant+.5 if serifs: flare# else: stem# fi -2u#;
%adjust_fit(0,0);
%x1=x2=.5w; y2=max(.5[bar_height,x_height]+.5vair,h-x_height);
%if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0);
% y1+.5stem=h; filldraw circ_stroke z1e--z2e;	% stem and bulb
%else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
% top y1=h; filldraw stroke z1e--z2e; fi	% stem
%penlabels(1,2,3,4); endchar;



%cmchar "Straight single quote";
%beginchar("'",5u#,asc_height#,0);
%adjust_fit(0,0); pickup light_rule.nib;
%bot y1=vround(5/7*h); y2=y1; top y3=h+2o; y4=y3;
%.5[x1,x2]=x5=good.x .5w; w:=r:=2x5;
%lft x1=hround(.5w-1/28*h);
%.5[x3,x4]=x6=good.x .5w; w:=r:=2x6;
%lft x3=hround(.5w-1/7*h);
%filldraw z1--z2--z4--z3--cycle;
%penlabels(1,2,3,4); endchar;


cmchar "Straight single quote";
beginchar("'",5u#,asc_height#,0);
italcorr asc_height#*slant+.5 if serifs: flare# else: stem# fi -2u#;
adjust_fit(0,0);
x1=x2=.5w; y2=max(.5[bar_height,x_height]+.5vair,h-x_height);
if serifs: pickup rule.nib; pos1(flare,0); pos2(vair,0);
 y1+.5stem=h; filldraw circ_stroke z1e--z2e;	% stem and bulb
else: pickup crisp.nib; pos1(stem,0); pos2(vair,0);
 top y1=h; filldraw stroke z1e--z2e; fi	% stem
penlabels(1,2,3,4); endchar;




                       % S Y M  ends %


% The following definitions are copied from  S Y M B O L . M F

cmchar "Times operator";
beginarithchar("#"); pickup light_rule.nib;
x1=good.x(1/sqrt2)[.5w,rt u]; y1=good.y(1/sqrt2)[math_axis,bot h];
x2=x3=w-x1; x4=x1; .5[y1,y2]=.5[y3,y4]=math_axis; y2=y4;
draw z1--z2; draw z3--z4;	% diagonals
labels(1,2,3,4); endchar;

%cmchar "Division operator";
%beginarithchar("%"); pickup light_rule.nib;
%x3-.5dot_size=hround(.5w-.5dot_size); w:=r:=2x3;
%y3+.5dot_size=vround(math_axis+math_spread[.3x_height,.4x_height]+.5dot_size);
%lft x1=hround u-eps; x2=w-x1; y1=y2=math_axis;
%draw z1--z2;	% bar
%pos3(dot_size,0); pos4(dot_size,90); z3=z4;
%pos5(dot_size,0); pos6(dot_size,90); z5=z6; x5=x3; .5[y3,y5]=math_axis;
%dot(3,4); dot(5,6);	% dots
%penlabels(1,2,3,4,5,6); endchar;


cmchar "Division operator";
beginarithchar("%"); pickup light_rule.nib;
x3-.5dot_size=hround(.5w-.5dot_size); w:=r:=2x3;
y3=vround(math_axis+1.5dot_size);
lft x1=hround u-eps; x2=w-x1; y1=y2=math_axis;
draw z1--z2;	% bar	
pos3(dot_size,0); pos4(dot_size,90); z3=z4;
pos5(dot_size,0); pos6(dot_size,90); z5=z6; 
x5=x3; .5[y3,y5]=math_axis+.1rule_thickness;
dot(3,4); dot(5,6);	% dots
penlabels(1,2,3,4,5,6); endchar; 

				%=========================================
				% To be replaced by the next definition...
				
% cmchar "Circle operator";
% beginchar(oct"017",9u#,v_center(9u#));
% adjust_fit(0,0); pickup light_rule.nib; autorounded;
% lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
% circle_points; draw_circle;	% circle
% labels(1,2,3,4,5,6,7,8); endchar;


cmchar "Circle operator";
beginchar(oct"017",16u#,v_center(16u#));               %@ For test purposes!
adjust_fit(0,0); pickup light_rule.nib; autorounded;
lft x1=hround u; x0=.5w; y1=y0=math_axis; 
z2-z0=(z1-z0) rotated 45;
z3-z0=(z2-z0) rotated 45;
z4-z0=(z3-z0) rotated 45;
z5-z0=(z4-z0) rotated 45;
z6-z0=(z5-z0) rotated 45;
z7-z0=(z6-z0) rotated 45;
z8-z0=(z7-z0) rotated 45;
draw z1...z2...z3...z4...z5...z6...z7...z8...cycle;    %  Circle(OJK) which is
labels(0,1,2,3,4,5,6,7,8); endchar;                    %  round as it should.



cmchar "Small circle";
beginchar(oct"016",5u#,v_center(5u#));
adjust_fit(0,0); pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; top y8=h-.3x_height; y2=math_axis-.3x_height; %@ Addition here!
circle_points; draw_circle;	% circle
labels(1,2,3,4,5,6,7,8); endchar;

%  cmchar "Circle stile operator";
%  beginchar(oct"175",8u#,v_center(8u#)); 
%  pickup light_rule.nib; autorounded;
%  lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
%  circle_points; draw_circle;	% circle
%  top y10=body_height#;
%  bot y9=-paren_depth#;
%  x9=x10=x4;
%  draw z9--z10;	% stile
%  labels(1,2,3,4,5,6,7,8); endchar;

%  cmchar "Circle slope operator";
%  beginchar(oct"176",8u#,v_center(8u#)); 
%  pickup light_rule.nib; autorounded;
%  lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
%  circle_points; draw_circle;	% circle
%  top y10=body_height#;
%  bot y9=-paren_depth#;
%  x9=x10=x4;
%  draw z9--z10;	% slope
%  labels(1,2,3,4,5,6,7,8); endchar;

iff known elt: cmchar "Element sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(elt,12u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup light_rule.nib; autorounded;
lft x2=hround 1.5u-eps; x1=x3=x6=w-x2;
y1-y3=spread; y2=y6=.5[y1,y3]=math_axis;
x4=x5=.5w+u; y4=y1; y5=y3;
draw z1---z4...z2{down}...z5---z3;	% arc and bars
draw z2--z6;	% middle bar
labels(1,2,3,4,5,6); endchar;

cmchar "Negation";
compute_spread(.45x_height#,.55x_height#);
beginchar(negation,14u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0);
pickup pencircle xscaled .7rule_thickness yscaled 1.4rule_thickness;
if vair#>.8curve#: pickup light_rule.nib; autorounded; fi % monoline
lft x1=hround u; x2=4u; x3=w-x2; x4=w-x1;
bot y1=bot y3=-d; top y2=top y4=h;
draw z1{up}...z2{right}..{right}z3...{up}z4;	% stroke
labels(1,2,3,4); endchar;

% sqrt48 was changed (AH) to 6.5 since the Delta symbol in APL has 
% a narrower base than the original triangle symbol
cmchar "Delta";
beginchar(oct"003",16u#,asc_height#,0);
adjust_fit(0,0); pickup light_rule.nib;
bot y1=0; y2=y1; top y3=h+2o;
.5[x1,x2]=x3=good.x .5w; w:=r:=2x3; lft x1=hround(.5w-u*6.25);
draw z1--z2--z3--cycle;	% stroke
labels(1,2,3); endchar;

% sqrt48 was changed to 6.25 since the Del symbol in APL has 
% a narrower top than the original reversed triangle symbol
% Moreover, Del must be lifted up to the same line as Delta,
cmchar "Del";
beginchar(oct"002",16u#,asc_height#,0);
adjust_fit(0,0); pickup light_rule.nib;
top y1=h+2o; y2=y1; bot y3=0;
.5[x1,x2]=x3=good.x .5w; w:=r:=2x3; lft x1=hround(.5w-u*6.25);
draw z1--z2--z3--cycle;	% stroke
labels(1,2,3); endchar;

cmchar "Lattice top";
beginchar(oct"030",14u#,asc_height#,0);
adjust_fit(0,0); pickup light_rule.nib;
x1=x2=good.x .5w; w:=r:=2x1; lft x3=hround u; x4=r-x3;
bot y1=0; y2-y1=x4-x3;
if top y2>h: y2:=bot h; fi
y3=y4=y2;
draw z1--z2;	% stem
draw z3--z4;	% bar
labels(1,2,3,4); endchar;

cmchar "Perpendicular sign or lattice bottom";
beginchar(oct"031",14u#,asc_height#,0);
adjust_fit(0,0); pickup light_rule.nib;
x1=x2=good.x .5w; w:=r:=2x1; lft x3=hround u; x4=r-x3;
bot y1=0; y2-y1=x4-x3;
if top y2>h: y2:=bot h; fi
y3=y4=y1;
draw z1--z2;	% stem
draw z3--z4;	% bar
labels(1,2,3,4); endchar;

cmchar "Left turnstile";
beginchar(oct"033",11u#,asc_height#,0);
adjust_fit(0,0); pickup light_rule.nib;
.5[y1,y2]=y3=y4; x1=x2=x3;
lft x3=hround u; x4=w-x3; top y1=h; bot y2=0;
draw z1--z2;	% stem
draw z3--z4;	% bar
labels(1,2,3,4); endchar;

cmchar "Right turnstile";
beginchar(oct"032",11u#,asc_height#,0);
adjust_fit(0,0); pickup light_rule.nib;
.5[y1,y2]=y3=y4; x1=x2=x4;
lft x3=hround u; x4=w-x3; top y1=h; bot y2=0;
draw z1--z2;	% stem
draw z3--z4;	% bar
labels(1,2,3,4); endchar;

cmchar "Left floor bracket";
beginchar(oct"034",8u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup light_rule.nib;
x1=x2=good.x 3.5u; x3=x1+3.75u+eps;
top y1=h; .5[y1,y2]=math_axis; y3=y2;
draw z1--z2--z3;	% stem and bar
labels(1,2,3); endchar;

cmchar "Left ceiling bracket";
beginchar(oct"035",8u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup light_rule.nib;
x1=x2=good.x 3.5u; x3=x1+3.75u+eps;
top y1=h; .5[y1,y2]=math_axis; y3=y1;
draw z3--z1--z2;	% stem and bar
labels(1,2,3); endchar;

%================================================================

% The quad symbol is created by using the definition of Del

cmchar "Quad";
beginchar(oct"001",16u#,body_height#,0);	%@ body or asc
adjust_fit(0,0); pickup light_rule.nib;
bot y1=0; y2=y1; top y3=h+2o; y4=y3;
.5[x1,x2]=x5=good.x .5w; w:=r:=2x5;
% The quad box is slightly wider than Del
lft x1=hround(.5w-u*7);				%@ -u*7 or -5/14*h
x3=x1; x4=x2;
draw z1--z2--z4--z3--cycle;	% box
labels(1,2,3,4); endchar;

%% The divide quad is built as a primary character
%          NOT AFTER ALL

%cmchar "Divide quad";
%beginchar(oct"001",16u#,body_height#,paren_depth#);
%adjust_fit(0,0); pickup light_rule.nib;
%bot y1=0; y2=y1; top y3=h+2o;top y4=h+2o;
%.5[x1,x2]=x5=good.x .5w; w:=r:=2x5; 
% the quad box is slightly wider than Del
%lft x1=hround(.5w-u*7);
%x3=x1;x4=x2;
%draw z1--z2--z4--z3--cycle;	% box
%pickup rule.nib;
%x8-.5dot_size=hround(.5w-.5dot_size); w:=r:=2x8;
%
%y8=vround(.5y3+1.75dot_size);                         %@   1 by 1.75
%lft x6=x1; x7=x2; y6=y7=.5y3;      
%draw z6--z7;	% bar
%pos8(dot_size,0); pos9(dot_size,90); z8=z9;
%pos10(dot_size,0); pos11(dot_size,90);z10=z11; 
%x10=x8; .5[y8,y10]=.5y3;                           %@   +rule_thickness#;    
%dot(8,9); dot(10,11);	% dots     
%penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;


                 
% (AH)
% Before loading in the definitions of the upper case Roman letters,
% we have to load in the preamble for the slanted typewriter font
% since that is the style of letters in APL.
%


%=====================================================================
%         This material comes from  C M S L T T 1 0
%=====================================================================


u#:=21/36pt#;			% unit width
width_adj#:=0pt#;		% width adjustment for certain characters
serif_fit#:=0pt#;		% extra sidebar near lowercase serifs
cap_serif_fit#:=0pt#;		% extra sidebar near uppercase serifs
letter_fit#:=0pt#;		% extra space added to all sidebars

body_height#:=250/36pt#;	% height of tallest characters
asc_height#:=220/36pt#;		% height of lowercase ascenders
cap_height#:=220/36pt#;		% height of caps
fig_height#:=220/36pt#;		% height of numerals
x_height#:=155/36pt#;		% height of lowercase without ascenders
math_axis#:=110/36pt#;		% axis of symmetry for math symbols
bar_height#:=79/36pt#;		% height of crossbar in lowercase e
comma_depth#:=50/36pt#;		% depth of comma below baseline
desc_depth#:=80/36pt#;		% depth of lowercase descenders

crisp#:=22/36pt#;		% diameter of serif corners
tiny#:=22/36pt#;		% diameter of rounded corners
fine#:=21/36pt#;		% diameter of sharply rounded corners
thin_join#:=21/36pt#;		% width of extrafine details
hair#:=25/36pt#;		% lowercase hairline breadth
stem#:=25/36pt#;		% lowercase stem breadth
curve#:=25/36pt#;		% lowercase curve breadth
ess#:=22/36pt#;			% breadth in middle of lowercase s
flare#:=32/36pt#;		% diameter of bulbs or breadth of terminals
dot_size#:=36/36pt#;		% diameter of dots
cap_hair#:=25/36pt#;		% uppercase hairline breadth
cap_stem#:=25/36pt#;		% uppercase stem breadth
cap_curve#:=25/36pt#;		% uppercase curve breadth
cap_ess#:=25/36pt#;		% breadth in middle of uppercase s
rule_thickness#:=25/36pt#;	% thickness of lines in math symbols

dish#:=0pt#;			% amount erased at top or bottom of serifs
bracket#:=0pt#;			% vertical distance from serif base to tangent
jut#:=34/36pt#;			% protrusion of lowercase serifs
cap_jut#:=34/36pt#;		% protrusion of uppercase serifs
beak_jut#:=0pt#;		% horizontal protrusion of beak serifs
beak#:=34/36pt#;		% vertical protrusion of beak serifs
vair#:=22/36pt#;		% vertical diameter of hairlines
notch_cut#:=25/36pt#;		% maximum breadth above or below notches
bar#:=22/36pt#;			% lowercase bar thickness
slab#:=22/36pt#;		% serif and arm thickness
cap_bar#:=22/36pt#;		% uppercase bar thickness
cap_band#:=22/36pt#;		% uppercase thickness above/below lobes
cap_notch_cut#:=25/36pt#;	% max breadth above/below uppercase notches
serif_drop#:=0pt#;		% vertical drop of sloped serifs
stem_corr#:=0pt#;		% for small refinements of stem breadth
vair_corr#:=0pt#;		% for small refinements of hairline height
apex_corr#:=10/36pt#;		% extra width at diagonal junctions

o#:=4/36pt#;			% amount of overshoot for curves
apex_o#:=3/36pt#;		% amount of overshoot for diagonal junctions

slant:=1/5;			% tilt ratio $(\Delta x/\Delta y)$
fudge:=0.81;			% factor applied to weights of heavy characters
math_spread:=-1;		% extra openness of math symbols
superness:=1/sqrt2;		% parameter for superellipses
superpull:=0;			% extra openness inside bowls
beak_darkness:=0;		% fraction of triangle inside beak serifs
ligs:=0;			% level of ligatures to be included

square_dots:=false;		% should dots be square?
hefty:=true;			% should we try hard not to be overweight?
serifs:=true;			% should serifs and bulbs be attached?
monospace:=true;		% should all characters have the same width?
variant_g:=false;		% should an italic-style g be used?
low_asterisk:=true;		% should the asterisk be centered at the axis?
math_fitting:=false;		% should math-mode spacing be used?

                    %========================
                      mode_setup;font_setup;
                    %========================

%====================================================================
%             input romanu;	% upper case (majuscules)
%====================================================================

% Computer Modern Roman upper case:
% These letters were originally coded by D. E. Knuth in November, 1979,
% inspired by the Monotype faces used in {\sl The Art of Computer Programming}.
% Sans serif designs by Richard Southall were added in April, 1982.
% The programs were revised for the new \MF\ conventions in 1985.

% Character codes \0101 through \0132 are generated.

cmchar "The letter A";
beginchar("A",13u#,cap_height#,0);
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric left_stem,right_stem,outer_jut,alpha;
right_stem=cap_stem-stem_corr;
left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem);
outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0;
x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+apex_o+apex_oo;
alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
z0=whatever[z1r,z2r]=whatever[z3l,z4l];
if y0<h-cap_notch_cut: y0:=h-cap_notch_cut;
 fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
  --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
  ...{up}z0+.5left--cycle; % left and right diagonals
else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
  --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
if hefty: y5r else: y5 fi =5/12y0;
y5r-y5l=y6r-y6l=cap_band; penstroke z5e--z6e; % bar line
if serifs: numeric inner_jut; pickup tiny.nib;
 prime_points_inside(1,2); prime_points_inside(4,3);
 if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
 else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
 dish_serif(1',2,a,1/2,outer_jut,b,.6,inner_jut)(dark);	% left serif
 dish_serif(4',3,c,1/2,inner_jut,d,1/3,outer_jut); fi	% right serif
penlabels(0,1,2,3,4,5,6); endchar;

cmchar "The letter B";
beginchar("B",12.5u#,cap_height#,0);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,0);
numeric left_stem,right_curve,middle_weight;
left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5;
pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5left_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
penpos3(cap_band,90); penpos4(cap_band,90);
penpos6(middle_weight,-90); penpos7(middle_weight,-90);
penpos8(middle_weight,90); penpos9(middle_weight,90);
penpos5(right_curve-stem_corr,0); penpos10(right_curve,0);
penpos11(cap_band,-90); penpos12(cap_band,-90);
z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair;
z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h;
x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u;
x5r=hround(w-1.5u); x10r=hround(w-u);
if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u];
else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u];
 x4l:=x4l-.5u; x9l:=x9l-.5u; fi
x6l:=x6l-.5u; x11l:=x11l-.5u;
fill stroke z3e..super_arc.e(4,5) & super_arc.e(5,6)..z7e;	% upper lobe
fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e;	% lower lobe
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);	% upper serif
 nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi	% lower serif
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;

cmchar "The letter C";
if serifs: beginchar("C",13u#,cap_height#,0);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90);
 pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360);
 rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1];
 top y2r=h+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps);
 y5=max(good.y .95(h-y1),y4l+eps);
 (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
 (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
 filldraw stroke z1e{x2-x1,10(y2-y1)}
  ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{up}z5e; % arc
 pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o;
 x1r-x1'=2cap_curve-fine; y1'=y1;
 path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
 numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
 filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
else: beginchar("C",11.5u#,cap_height#,0);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
 rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u;
 lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u);
 top y1r=vround .95h+o; top y2r=h+o; y3=.5h;
 bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals
math_fit(-.3cap_height#*slant-.5u#,.5ic#);
penlabels(1,1',2,3,4,5,6); endchar;

cmchar "The letter D";
beginchar("D",13.5u#,cap_height#,0);
italcorr .7cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,0);
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
penpos3(cap_band,90); penpos4(cap_band,90);
penpos5(cap_curve-stem_corr,0);
penpos6(cap_band,-90); penpos7(cap_band,-90);
z3r=top z1; y4=y3; y5=.51[y4,y6]; y6=y7;
z7r=bot z2; x4=x6=.5w+.25u; x5r=hround(w-u);
x4l:=x6l:=x4-.25cap_curve;
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e;	% lobe
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);	% upper serif
 nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi	% lower serif
math_fit(0,ic#-.5u#); penlabels(1,2,3,4,5,6,7); endchar;

cmchar "The letter E";
beginchar("E",12u#-width_adj#,cap_height#,0);
italcorr cap_height#*slant-beak_jut#-.5u#;
adjust_fit(cap_serif_fit#,0);
h:=vround(h-stem_corr);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps;
arm(3,4,e,beak_darkness,beak_jut);	% upper arm and beak
pos5(cap_bar,-90); pos6(hair,0);
top y5l=vround(.52[y2,y1]+.5cap_bar); x5=x1;
pos0(cap_bar,90); pos7(hair,0);
z0=z5; x6=x7; y6-y5l=y0l-y7;
if serifs: rt x6r=hround(w-4.4u+.5hair); y6=good.y(y5l+.6beak)+eps;
 rt x9r=hround(w-.5u);
else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);	% middle arm and serif
pos8(slab if not serifs:+2stem_corr fi,-90); pos9(hair,0);
bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps;
arm(8,9,h,beak_darkness,1.5beak_jut);	% lower arm and beak
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);	% upper serif
 nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi	% lower serif
math_fit(0,.5ic#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar;

cmchar "The letter F";
beginchar("F",11.5u#-width_adj#,cap_height#,0);
italcorr cap_height#*slant-beak_jut#-.25u#;
adjust_fit(cap_serif_fit#,0);
h:=vround(h-stem_corr);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w-.75u); y4=good.y(y3l-beak)-eps;
arm(3,4,e,beak_darkness,beak_jut);	% upper arm and beak
pos5(cap_bar,-90); pos6(hair,0);
top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1;
pos0(cap_bar,90); pos7(hair,0);
z0=z5; x6=x7; y6-y5l=y0l-y7;
if serifs: rt x6r=hround(w-4u+.5hair); y6=good.y(y5l+.6beak)+eps;
 rt x9r=hround(w-.5u);
else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi
arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0);	% middle arm and serif
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);	% upper serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi	% lower serif
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9); endchar;

cmchar "The letter G";
if serifs: beginchar("G",14u#,cap_height#,0);
 italcorr cap_height#*slant-1.5u#-.5cap_serif_fit#;
 adjust_fit(0,.5cap_serif_fit#);
 pickup tiny.nib; pos0(cap_stem,0); pos7(cap_stem,0);
 rt x0r=hround(w-2u); y0=good.y(.1[bar_height,x_height]+1); x7=x0;
 pickup fine.nib;
 if hefty: bot y7=0; pos5(cap_stem,0); x5=x0; top y5=tiny.top y0;
 else: pos5(cap_hair,0); pos8(cap_stem,0);
  y7=.5bar_height; z5l=z8l; z8=z7; x9=x8r; bot y9=0;
  filldraw z8l{down}..{4(x9-x8),y9-y8}z9--z8r--cycle; fi % spur
 pos1(cap_hair,0); pos2(cap_band,90);
 pos3(cap_curve,180); pos4(cap_band,270);
 rt x1r=hround(w-2u); lft x3r=hround u; x2=x4=.55[x3,x1];
 top y2r=h+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6h,x_height-.5vair),bot y2l-eps);
 (x2l',y2l)=whatever[z2r,z1l]; x2l:=min(x2l',x2l+.5u);
 (x4l',y4l)=whatever[z4r,z5l]; x4l:=min(x4l',x4l+.5u);
 filldraw stroke z1e{x2-x1,10(y2-y1)}
  ...pulled_arc.e(2,3) & pulled_arc.e(3,4)...z5e{up}; % arc
 pos6(.3[fine.breadth,cap_hair],0); x6r=x1r; top y6=h+o;
 x1r-x1'=2cap_curve-fine; y1'=y1;
 path upper_arc; upper_arc=z1{x2-x1,10(y2-y1)}..z2{left};
 numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
 filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
 pickup tiny.nib; filldraw stroke z0e--z7e;	% stem
 dish_serif(0,7,a,1/3,max(cap_jut,2.25u),b,1/3,1.25u);	% serif
 math_fit(-.3cap_height#*slant-.5u#,ic#);
else: beginchar("G",12u#,cap_height#,0);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,270);
 rt x1r=hround(w-1.35u); x2=x4=.5w+u;
 lft x3r=hround max(u,2u-.5cap_curve); rt x5l=hround(w-1.2u);
 top y1r=vround .93h+o; top y2r=h+o; y3=.5h;
 bot y4r=-o; bot y5r=vround .07h-o;
 filldraw stroke rterm.e(2,1,right,.9,4)&super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,1,4); % arc and terminals
 pos0(stem,0); pos7(stem,0);
 z7r=z5r; x0=x7; top y0=1+vround .35[bar_height,x_height];
 filldraw stroke z0e--z7e;	% stem
 pos8(cap_bar,90); pos9(cap_bar,90);
 z0r=z9r; y8=y9; lft x8=hround x4;
 filldraw stroke z8e--z9e;	% bar
 math_fit(-.3cap_height#*slant-.5u#,.5ic#); fi
penlabels(0,1,1',2,3,4,5,6,7,8,9); endchar;

cmchar "The letter H";
beginchar("H",13u#+width_adj#,cap_height#,0);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
adjust_fit(cap_serif_fit#,cap_serif_fit#);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
pos3(cap_stem,0); pos4(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); x3=x4=w-x1;
top y1=top y3=h; bot y2=bot y4=0;
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
penpos5(cap_bar,90); penpos6(cap_bar,90);
x5=x1; x6=x3; y5=y6=.52h;
fill stroke z5e--z6e;	% bar
if serifs: numeric inner_jut;
 if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut;
 else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi
 dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut);	% upper left serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif
 dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut);	% upper left serif
 dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi	% lower left serif
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar;

cmchar "The letter I";
beginchar("I",max(6u#,4u#+cap_stem#),cap_height#,0);
italcorr cap_height#*slant-.25u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
if serifs: dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut);	% upper serif
 dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut);  fi % lower serif
math_fit(0,.5ic#); penlabels(1,2); endchar;

cmchar "The letter J";
beginchar("J",9u#,cap_height#,0);
italcorr cap_height#*slant-cap_serif_fit#
 +.75cap_jut#-2.5u#+min(.5cap_stem#,u#);
adjust_fit(0,cap_serif_fit#);
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
top y1=h; rt x1r=hround(w-2u); x2=x1; y2=.21h;
if serifs: pos3(vair,-90); pos4(cap_hair,-180);
 pos5(flare+(cap_stem-stem),-180);
 bot y3r=-o; x3=.5[x4,x2]; y5=1/6h; rt x5l=hround 2.75u; z5r=z4r;
 filldraw stroke z1e--z2e&super_arc.e(2,3);	% stem and arc
 dish_serif(1,2,a,1/3,1.3cap_jut,b,1/3,.75cap_jut);	% serif
 bulb(3,4,5);	% bulb
else: filldraw stroke z1e--z2e;	% stem
 pickup fine.nib; pos3(cap_stem',0); z3=z2;
 pos4(flare,angle(6.5u,-h)); pos5(1.1flare,-100);
 bot y4r=-o; x4r=.5[x5r,x3r]; lft x5r=hround.75u; bot y5r=vround.06h-o;
 filldraw stroke z3e{down}....term.e(4,5,left,1,4); fi % arc and terminal
math_fit(0,.5ic#-.5u#); penlabels(1,2,3,4,5); endchar;

cmchar "The letter K";
beginchar("K",13.5u#,cap_height#,0);
italcorr cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric right_jut,stem[],alpha[];
if serifs: right_jut=.6cap_jut;
else: right_jut=.4tiny; fi
pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr);
stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi);
top y3=h; rt x3r=hround(r-letter_fit-u-right_jut);
bot y6=0; rt x6r=hround(r-letter_fit-.75u-right_jut);
x4=x1; y4=1/3h;
alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4);
penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90);
alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1);
penpos6(alpha2*(stem2-tiny),0);
forsuffixes $=l,r: y3'$=h; y6'$=0; z4$=z3'$+whatever*(z3-z4);
 z5$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor
z5=.5[z5l,z5r];
z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4);
% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\]
z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6);
z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6);
fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle;	% upper diagonal
fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle;	% lower diagonal
if serifs: numeric inner_jut;
 if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut;
 else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi
 dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut);	% lower stem serif
 dish_serif(3,4,e,2/3,1.2cap_jut,f,1/2,right_jut)(dark); % upper diagonal serif
 dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark);fi % lower diagonal serif
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar;

cmchar "The letter L";
beginchar("L",11u#-width_adj#,cap_height#,0);
adjust_fit(cap_serif_fit#,0);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,-90); pos4(hair,0);
bot y3r=0; x3=x2; y4=y3l+7/6beak+eps; rt x4r=hround(w-.75u);
arm(3,4,e,1.2beak_darkness,beak_jut);	% lower arm and beak
if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,1.25cap_jut);	% upper serif
 nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi	% lower serif
math_fit(0,u#); penlabels(1,2,3,4); endchar;

cmchar "The letter M";
beginchar("M",16u#+width_adj#,cap_height#,0);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric stem[]; % thicknesses of the four strokes
stem1=hround(fudged.hair+stem_corr);
stem2=hround(fudged.cap_stem-4stem_corr);
stem3=hround(fudged.hair-stem_corr);
stem4=hround(fudged.cap_stem-3stem_corr);
if stem4<stem1: stem4:=stem1; fi
pickup tiny.nib; pos1(stem1,0); pos2(stem1,0);
pos3(stem4,0); pos4(stem4,0);
x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround min(w-2u,w-3u+.5stem4);
top y1=top y3=h; bot y2=bot y4=0;
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
penpos5(stem2,0); penpos6(stem2,0); penpos7(stem3,0); penpos8(stem3,0);
x5l=x1; x6l=x7l; x8=lft x3l; x6-x5=x8-x7; y5=y8=h; y6=y7;
if hefty: y6=if monospace: vround 1/3h else: o fi;
 numeric upper_notch,lower_notch;
 upper_notch=h-cap_notch_cut; lower_notch=y6+cap_notch_cut;
 x1'=rt x1r; z1'=whatever[z5l,z6l]; x3'=lft x3l; z3'=whatever[z7r,z8r];
 z0=whatever[z5r,z6r]=whatever[z7l,z8l];
 fill z5l..
  if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi
  {z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7}
  if y3'<upper_notch: ...{up}(x3'-1,upper_notch){right} fi
  ..z8r--diag_out(8r,1,8l,7l){z7-z8}
  if y0<=lower_notch: ..{z7-z8}z0{z5-z6}..
  else: ...{down}(x0+.5,lower_notch)--(x0-.5,lower_notch){up}... fi
  {z5-z6}diag_in(6r,5r,1,5l)--cycle;	% diagonals
else: y6=0; z0=whatever[z5r,z6r]=whatever[z7l,z8l];
 fill z5l..{z6-z5}diag_in(5l,6l,1,6r)..diag_out(7l,1,7r,8r){z8-z7}
  ..z8r--diag_out(8r,1,8l,7l){z7-z8}..{z7-z8}z0{z5-z6}
  ..{z5-z6}diag_in(6r,5r,1,5l)--cycle; fi	% diagonals
if serifs: serif(1,2,a,1/3,-cap_jut);	% upper left serif
 dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif
 serif(3,4,d,1/3,cap_jut); %  upper right serif
 dish_serif(4,3,e,1/3,cap_jut,f,1/3,cap_jut); fi	% lower right serif
math_fit(0,max(.5ic#-.5u#,0));
penlabels(0,1,1',2,3,3',4,5,6,7,8); endchar;

cmchar "The letter N";
beginchar("N",13u#+width_adj#,cap_height#,0);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric thin_stem; thin_stem=hround(fudged.hair+stem_corr);
pickup tiny.nib; pos1(thin_stem,0); pos2(thin_stem,0);
pos3(thin_stem,0); pos4(thin_stem,0);
pickup tiny.nib; top y1=top y3=h; bot y2=bot y4=0;
x1=x2; x3=x4; x1l=w-x3r;
rt x3r=hround min(w-2u,w-3u+.5fudged.cap_stem);
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
if hefty: penpos5(fudged.cap_stem,0); penpos6(fudged.cap_stem,0);
 x5l=x1; x6r=x4; y5=h; y6=0;
 numeric upper_notch,lower_notch;
 upper_notch=h-cap_notch_cut; lower_notch=cap_notch_cut;
 x1'=rt x1r; z1'=whatever[z5l,z6l]; x4'=lft x4l; z4'=whatever[z5r,z6r];
 fill z5l..
  if y1'<upper_notch: {right}(x1'+1,upper_notch){down}... fi
  {z6-z5}diag_in(5l,6l,1,6r)--z6r..
  if y4'>lower_notch: {left}(x4'-1,lower_notch){up}... fi
  {z5-z6}diag_in(6r,5r,1,5l)--cycle;	% diagonal
else: penpos5(whatever,0); penpos6(whatever,90);
 z5l=z1l; z6l=z4l;
 z7=z6l+(max(eps,cap_stem-3stem_corr-tiny),0) rotated (angle(z5l-z6l)-90);
 z5r=z7+whatever*(z5l-z6l); z6r=z7+whatever*(z5l-z6l);
 filldraw stroke z5e..z6e; fi	% diagonal
if serifs: if hefty: serif(1,2,a,1/3,-cap_jut); % upper left serif
 else: serif(5,6,a,1/3,-cap_jut); fi	% upper left serif
 dish_serif(2,1,b,1/2,cap_jut,c,1/2,cap_jut)(dark); % lower left serif
 dish_serif(3,4,e,1/2,cap_jut,f,1/2,cap_jut)(dark); fi	% upper right serif
math_fit(0,max(.5ic#-.5u#,0)); penlabels(1,1',2,3,4,4',5,6,7); endchar;

cmchar "The letter O";
beginchar("O",14u#-width_adj#,cap_height#,0);
italcorr .7cap_height#*slant-.5u#;
adjust_fit(0,0);
penpos1(vair',90); penpos3(vround(vair+1.5vair_corr),-90);
penpos2(cap_curve,180); penpos4(cap_curve,0);
if monospace: x2r=hround 1.5u;
 interim superness:=sqrt superness;	% make |"O"|, not |"0"|
else: x2r=hround u; fi
x4r=w-x2r; x1=x3=.5w; y1r=h+o; y3r=-o;
y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
penstroke pulled_super_arc.e(1,2)(.5superpull)
 & pulled_super_arc.e(2,3)(.5superpull)
 & pulled_super_arc.e(3,4)(.5superpull)
 & pulled_super_arc.e(4,1)(.5superpull) & cycle;	% bowl
math_fit(-.3cap_height#*slant-.5u#,ic#-.5u#); penlabels(1,2,3,4); endchar;

cmchar "The letter P";
beginchar("P",12u#,cap_height#,0);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,0);
pickup tiny.nib; penpos1(cap_stem'-tiny,0); penpos2(cap_stem-tiny,0);
pos0(cap_stem',0); pos0'(cap_stem,0);
lft x1l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0;
x1l=x2l=x0l=x0'l; y0=y0'=y7;
penpos3(cap_band,90); penpos4(cap_band,90);
penpos5(cap_curve if hefty:-3stem_corr fi,0);
penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90);
z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7;
x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u);
x4l:=x6l:=x4-.25cap_curve;
filldraw stroke z1e--z0e--z0'e--z2e; % stem
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e;	% lobe
if serifs: nodish_serif(1,0,a,1/3,cap_jut,b,1/3,.5cap_jut);	% upper serif
 dish_serif(2,0',c,1/3,cap_jut,d,1/3,cap_jut); fi	% lower serif
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7); endchar;

cmchar "The letter Q";
beginchar("Q",14u#-width_adj#,cap_height#,comma_depth#);
italcorr .7cap_height#*slant-.5u#;
adjust_fit(0,0);
numeric light_curve; light_curve=cap_curve-hround stem_corr;
penpos1(vair',90); penpos3(vair',-90);
penpos2(light_curve,180); penpos4(light_curve,0);
if monospace: x2r=hround 1.5u;
 interim superness:=sqrt superness;	% make |"Q"| like |"O"|
else: x2r=hround u; fi
x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o;
penstroke pulled_super_arc.e(1,2)(.5superpull)
 & pulled_super_arc.e(2,3)(.5superpull)
 & pulled_super_arc.e(3,4)(.5superpull)
 & pulled_super_arc.e(4,1)(.5superpull) & cycle;	% bowl
pickup tiny.nib;
if hefty: penpos5(1.2(.5[cap_bar,light_curve]),0); penpos6(1.2light_curve,0);
 x5=.5w; x6r=hround(w-1.5u);
 y5=vround .28h; y6=-d;
 fill diag_end(6r,5r,.25,1,5l,6l)--diag_end(5l,6l,.5,1,6r,5r)--cycle;	% tail
else: pos3'(vair,270); pos5(vair,180); pos6(vair,90);
 pos7(cap_curve,85); penpos8(eps,180);
 z3'=z3; x6=x3; top y6r=vround(.2h+.5vair);
 lft x5r=hround(.5w-1.25u-.5vair); y5=.5[y3,y6];
 bot y7l=-d; x7l=2/3[x6,x8]; y8=0; rt x8=hround(x4r+.1u);
 filldraw stroke z3'e{left}...z5e{up}...z6e{right}
  ..z7e{right}...z8e{up}; fi % tail
math_fit(-.3cap_height#*slant-.5u#,ic#); penlabels(1,2,3,4,5,6,7); endchar;

cmchar "The letter R";
beginchar("R",if serifs: 12u#+.5max(2u#,cap_curve#)
 else:12.5u#-.5width_adj# fi,cap_height#,0);
italcorr .75cap_height#*slant- if serifs: 1.75 else: .5 fi\\ u#;
adjust_fit(cap_serif_fit#,0);
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
penpos3(cap_band,90); penpos4(cap_band,90);
penpos5(cap_curve if hefty:-3stem_corr fi,0);
penpos6(vair,-90); penpos7(vair,-90);
z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7;
x7=x2; y7l=vround(.5h+.5vair); x4=x6;
if serifs: x4=.5w-.5u; x5r=hround(w-2.25u);
else: x4=.5w+.5u; x5r=hround(w-u); fi
x4l:=x6l:=x4-.125cap_curve;
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e;	% lobe
if serifs: pos6'(vair,-90); pos0(cap_stem,180);
 pos8(cap_curve,180); pos9(vair,-90); pos10(hair,0);
 z6'=z6; lft x0r=lft x8r=hround(x5-2/3u-.5cap_curve);
 y8=1/3[y2,y7]; y0=3/5[y2,y7]; x9=.5[x8l,x10r];
 bot y9r=-o; rt x10r=hround(w-.05u); y10=1/4[y2,y7];
 filldraw stroke z6'e{right}..z0e---z8e....z9e{right}..z10e{up};	% tail
 nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);	% upper serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut);	% lower serif
else: penpos8(cap_stem-2stem_corr,0); penpos9(cap_stem,0);
 x8=x6+.5u; y8=y6; x9r=hround(w-.5u); y9=0;
 fill z8l--diag_end(8l,9l,.5,1,9r,8r)--z8r--cycle; fi	% tail
math_fit(0,.75ic#); penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

cmchar "The letter S";
beginchar("S",10u#,cap_height#,0);
italcorr cap_height#*slant-u#;
adjust_fit(0,0);
numeric theta; theta=90-angle(50u,h); slope:=-h/50u;	% angle at middle
numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi;
numeric ess'; ess'=max(fine.breadth,cap_ess);
pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-90);
pos0(ess',theta); pos7(s_slab,-90);
x2+x7=2x0=w; x7-x2=if serifs: u else: 0 fi; top y2l=h+o; bot y7r=-o;
y0=.52h; lft x3l=hround u; rt x6r=hround(w-u);
x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine;
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
filldraw stroke super_arc.e(2,3) & z3e{down}
 ..z4e---z5e..z6e{down} & super_arc.e(6,7);	% main stroke
if serifs: pos1(hair,180); pos8(hair,180);
 rt x1l=hround(w-1.5u); lft x8r=hround u;
 bot y1=vround 2/3h+1; top y8=vround 1/3h-1;
 filldraw stroke z1e{x2-x1,10(y2-y1)}....{left}z2e;	% upper arc
 filldraw stroke z7e{left}....{up}z8e;	% lower arc
 path upper_arc, lower_arc;
 upper_arc=z1{x2-x1,10(y2-y1)}....{left}z2;
 lower_arc=z7{left}....{up}z8;
 pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0);
 x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r;
 x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8;
 numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1'));
 filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle;	% upper barb
 t:=xpart(lower_arc intersectiontimes(z9r--z8'));
 filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle;	% lower barb
else: pos1(1.2flare,-100); pos8(1.2flare,-100);
 x1l=good.x(x1l+w-1.75u-rt x1); lft x8r=hround .8u;
 top y1l=vround .93h+o; bot y8r=vround .1h-o;
 filldraw stroke term.e(2,1,right,.9,4);	% upper arc and terminal
 filldraw stroke term.e(7,8,left,1,4); fi	% lower arc and terminal
math_fit(0,.5ic#); penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar;

cmchar "The letter T";
beginchar("T",13u#-width_adj#,cap_height#,0);
italcorr cap_height#*slant-beak_jut#-.25u#;
adjust_fit(0,0);
h:=vround(h-2stem_corr);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w-.65u); y4=good.y(y3l-beak)-eps;
arm(3,4,e,beak_darkness,.7beak_jut);	% right arm and beak
pos5(hair,180); x5=w-x4; y5=y4;
arm(3,5,f,beak_darkness,-.7beak_jut);	% left arm and beak
if serifs: dish_serif(2,1,c,1/3,1.414cap_jut,d,1/3,1.414cap_jut);	% lower serif
 nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); fi	% upper bracketing
math_fit(-.75cap_height#*slant,ic#-2.5u#); penlabels(1,2,3,4,5,6); endchar;

cmchar "The letter U";
beginchar("U",13u#+.5width_adj#,cap_height#,0);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
if monospace: adjust_fit(cap_serif_fit#-.5u#,cap_serif_fit#-.5u#)
else: adjust_fit(cap_serif_fit#,cap_serif_fit#) fi;
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
pos2'(cap_stem,180); z2'=z2;
pos3(cap_band,-90);
pos4(cap_hair,0); pos5(cap_hair,0);
x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r;
top y1=top y5=h; y2=y4=1/3h; bot y3r=-o;
lft x1l=hround max(2u,3u-.5cap_stem);
filldraw stroke z1e--z2e; % left stem
filldraw stroke pulled_arc.e(2',3)
 & pulled_arc.e(3,4)&z4e--z5e; % arc and right stem
if serifs: dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % left serif
 dish_serif(5,4,c,1/2,cap_jut,d,1/2,cap_jut)(dark); fi	% right serif
math_fit(-cap_serif_fit#-.3cap_height#*slant-min(cap_height#*slant,u#),
 max(.5ic#-.5u#,0)); penlabels(1,2,3,4,5); endchar;

cmchar "The letter V";
beginchar("V",13u#,cap_height#,0);
italcorr cap_height#*slant+.25u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric left_stem,right_stem,outer_jut,alpha;
left_stem=cap_stem-stem_corr;
right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem);
outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4=h;
x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o;
alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr);
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
z0=whatever[z1r,z2r]=whatever[z3l,z4l];
if y0>cap_notch_cut: y0:=cap_notch_cut;
  fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
    --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
    ...{down}z0+.5left--cycle; % left and right diagonals
else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
    --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
if serifs: numeric inner_jut; pickup tiny.nib;
 prime_points_inside(1,2); prime_points_inside(4,3);
 if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
 else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut);	% left serif
 dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); fi	% right serif
math_fit(.75u#-cap_height#*slant,ic#-4u#); penlabels(0,1,2,3,4); endchar;

cmchar "The letter W";
beginchar("W",18u#,cap_height#,0);
italcorr cap_height#*slant+.25u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric stem[],outer_jut,upper_notch,alpha,mid_corr;
outer_jut=.7cap_jut; x1l=w-x8r=l+letter_fit+outer_jut+.25u;
stem1=fudged.cap_stem-stem_corr;
stem4=min(fudged.hair if hefty:-2stem_corr fi,stem1);
stem2=stem4 if hefty:-2stem_corr fi;
stem3=stem1 if hefty:-2stem_corr fi;
x2-x1=x4-x3=x6-x5=x8-x7; x2l+apex_corr=x3l; x6l+apex_corr=x7l;
y1=y8=h; y2=y3=y6=y7=-apex_o; y4=y5=if monospace: vround .6 fi\\ h;
mid_corr=if monospace or hefty:-apex_corr else: 1/3jut fi;
alpha=diag_ratio(4,stem2-stem3+stem4,y1-y2,x8r-x1l+mid_corr-2apex_corr);
penpos1(alpha*stem1,0); penpos2(alpha*stem1,0);
penpos3(alpha*stem2,0); penpos4(alpha*stem2,0);
penpos5(alpha*stem3,0); penpos6(alpha*stem3,0);
penpos7(alpha*stem4,0); penpos8(alpha*stem4,0);
x4l-x1l=floor(x4l-x1l+.5(x5r+mid_corr-x4r)); % |x5r+mid_corr| $\approx$ |x4r|
z23=whatever[z1r,z2r]=whatever[z3l,z4l];
z45=whatever[z3r,z4r]=whatever[z5l,z6l];
z67=whatever[z5r,z6r]=whatever[z7l,z8l]; upper_notch=y4-cap_notch_cut;
fill diag_end(1l,2l,1,1,3r,4r){z4-z3}
 ...if y45<upper_notch:(x45,upper_notch)+.5left{up}
   --(x45,upper_notch)+.5right{down} else: z45&z45 fi
 ...{z6-z5}diag_end(5l,6l,1,1,7r,8r)--diag_end(7r,8r,1,1,8l,7l){z7-z8}
 ...if y67>cap_notch_cut:(x67,cap_notch_cut)+.5right{down}
   --(x67,cap_notch_cut)+.5left{up} else: z67&z67 fi
 ...{z5-z6}special_diag_end(6,5,4,3){z3-z4}
 ...if y23>cap_notch_cut:(x23,cap_notch_cut)+.5right{down}
   --(x23,cap_notch_cut)+.5left{up} else: z23&z23 fi
 ...{z1-z2}diag_end(2r,1r,1,1,1l,2l)--cycle;	% diagonals
if serifs: numeric inner_jut[]; pickup tiny.nib;
 prime_points_inside(1,2); prime_points_inside(5,6); prime_points_inside(8,7);
 if monospace: inner_jut1=inner_jut4=1.5cap_jut;
 elseif hefty: inner_jut1=inner_jut4=cap_jut;
 else: fill diag_end(6r,5r,1,1,5l,6l)
  --.5[z5l,z6l]--.5[z5r,z6r]--cycle; % middle stem
  inner_jut2=.7inner_jut1; inner_jut4=1.1inner_jut3;
  if rt x1'r+cap_jut+.5u+1<=lft x5'l-.7cap_jut: inner_jut1=cap_jut;
  else: rt x1'r+inner_jut1+.5u+1=lft x5'l-inner_jut2; fi
  if rt x5'r+cap_jut+.5u+1<=lft x8'l-1.1cap_jut: inner_jut3=cap_jut;
  else: rt x5'r+inner_jut3+.5u+1=lft x8'l-inner_jut4; fi
  dish_serif(5',6,e,1/3,inner_jut2,f,1/2,inner_jut3); fi	% middle serif
 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut1);	% left serif
 dish_serif(8',7,c,.6,inner_jut4,d,1/2,outer_jut)(dark); fi	% right serif
math_fit(.75u#-cap_height#*slant,ic#-2.5u#);
penlabels(0,1,2,3,4,5,6,7,8,23,45,67); endchar;

cmchar "The letter X";
beginchar("X",13u#,cap_height#,0);
italcorr cap_height#*slant-.25u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric stem[],outer_jut,xjut,alpha[];
stem1=cap_stem-2stem_corr; stem2=min(cap_hair,stem1);
outer_jut=.75cap_jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi;
x1l=l+letter_fit+.5u+outer_jut; x2r=r-letter_fit-u-outer_jut-xjut;
x3l=l+letter_fit+.25u+outer_jut+xjut; x4r=r-letter_fit-.25u-outer_jut;
y1=y2=h; y3=y4=0;
alpha1=diag_ratio(1,stem1,h,x4r-x1l);
alpha2=diag_ratio(1,stem2,h,x2r-x3l);
penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0);
penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0);
if hefty: z0=whatever[z1,z4]=whatever[z2,z3];
 x12=x34=x0; y13=y24=y0;
 z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l];
 z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r];
 forsuffixes $=13,24,34: z$'=.1[z$,z0]; endfor
 fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34'
  --diag_end(34',4l,.5,1,4r,24')--z24'
  --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals
else: fill diag_end(4r,1r,.5,1,1l,4l)
  --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal
 fill diag_end(2l,3l,.5,1,3r,2r)
  --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi	% right diagonal
if serifs: numeric inner_jut[]; pickup tiny.nib;
 prime_points_inside(1,4); prime_points_inside(2,3);
 prime_points_inside(3,2); prime_points_inside(4,1);
 if rt x1'r+cap_jut+.5u+1<=lft x2'l-cap_jut-xjut: inner_jut1=cap_jut;
 else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi
 if rt x3'r+cap_jut+.5u+1<=lft x4'l-cap_jut-xjut: inner_jut2=cap_jut;
 else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi
 dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1);	% upper left serif
 dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut);	% lowers right serif
 dish_serif(2',3,e,2/3,inner_jut1+xjut,
  f,1/2,outer_jut+xjut)(dark);	% upper right serif
 dish_serif(3',2,g,1/2,outer_jut+xjut,
  h,2/3,inner_jut2+xjut)(dark); fi	% lower left serif
math_fit(0,.5ic#); penlabels(0,1,2,3,4,12,13,24,34); endchar;

cmchar "The letter Y";
beginchar("Y",13u#,cap_height#,0);
italcorr cap_height#*slant+.45u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric left_stem,right_stem,outer_jut,dy,alpha;
left_stem=cap_stem-stem_corr;
right_stem=min(cap_hair if hefty:-2stem_corr fi,left_stem);
outer_jut=.75cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.05u;
x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; y2=y3=y5=.4h;
dy=y1-y2; alpha=((x2l-x1l)++dy)/dy;
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=0;
z0=whatever[z1r,z2r]=whatever[z3l,z4l];
if y0>y2+cap_notch_cut: y0:=y2+cap_notch_cut;
  fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r
    --diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1}
    ...{down}z0+.5left--cycle; % diagonals and stem
else: fill z0--diag_end(0,4l,1,1,4r,3r)--z5r
    --diag_end(5r,6r,1,1,6l,5l)--z5l
    --diag_end(2l,1l,1,1,1r,0)--cycle; fi	% diagonals and stem
if serifs: numeric inner_jut; pickup tiny.nib;
 prime_points_inside(1,2); prime_points_inside(4,3); prime_points_inside(6,5);
 if rt x1'r+cap_jut+.5u+1<=lft x4'l-cap_jut: inner_jut=cap_jut;
 else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut);	% upper left serif
 dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark);	% upper right serif
 dish_serif(6',5,e,1/3,cap_jut,f,1/3,cap_jut); fi	% lower serif
math_fit(.5u#-cap_height#*slant,ic#-4u#);
penlabels(0,1,2,3,4,5,6); endchar;

cmchar "The letter Z";
beginchar("Z",11u#,cap_height#,0);
italcorr cap_height#*slant-.5u#;
adjust_fit(0,0);
numeric arm_thickness[],z_stem;
if hefty: arm_thickness1=Vround(slab-vair_corr); arm_thickness2=slab;
 z_stem=.8[vair,cap_stem];
else: arm_thickness1=slab; arm_thickness2=vround(slab+vair_corr);
 z_stem=.9[vair,cap_stem]; fi
pickup tiny.nib; x3l=x4l=w-x1r=w-x2r; lft x3l=hround u;
top y1=h; y2=min(y1,h-2/3arm_thickness1);
bot y4=0; y3=max(y4,2/3arm_thickness2);
numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l);
penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0);
penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0);
pair delta; delta=penoffset z3-z2 of currentpen;
fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l
 ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r
 ---cycle;	% diagonal
pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180);
top y5r=h; x5=x1; lft x6r=hround 1.25u; y6=good.y(y5l-beak)-eps;
arm(5,6,a,beak_darkness**.8,-.4beak_jut);	% upper arm and beak
pos7(arm_thickness2,-90); pos8(hair,0);
bot y7r=0; x7=x4; rt x8r=hround(w-.9u); y8=good.y(y7l+1.2beak)+eps;
arm(7,8,b,beak_darkness**.9,.6beak_jut);	% lower arm and beak
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8); endchar;

                       % R O M A N U  ends %



             %=============================================%
             %  The last characters are from  R O M A N L  %
             %=============================================%



% Computer Modern Roman lower case:
% These letters were originally coded by D. E. Knuth in November, 1979,
% inspired by the Monotype faces used in {\sl The Art of Computer Programming}.
% Sans serif designs by Richard Southall were added in April, 1982.
% The programs were revised for the new \MF\ conventions in 1985.

% Character codes \0141 through \0172 are generated.

cmchar "The letter a";
beginchar("a",9u#,x_height#,0);
bh#:=min(bar_height#,1.14x_height#-bar_height#); define_pixels(bh);
italcorr 1/3[bh#,x_height#]*slant+.5stem#-serif_fit#-2u#;
adjust_fit(0,serif_fit# if serifs: if hair#+.5stem#>1.5u#:-.25u# fi\\fi);
pickup fine.nib; top y3r=h+vround 1.5oo;
if serifs: pos1(flare,180); pos2(hair,180);
 pos3(vair,90);  lft x1r=hround max(u,2.1u-.5flare); x3=.5w-.5u;
 y1=min(bh+.5flare+2vair+2,.9[bh,h]-.5flare);
 bulb(3,2,1);	% bulb
else: pos1(5/7[vair,flare],95); x1l=good.x 1.5u; x1r:=good.x x1r;
 pos3(1/8[vair,thin_join],90);
 x3=.5w-.2u; top y1r=vround .82[bh,top y3r];
 filldraw stroke term.e(3,1,left,.9,4); fi	% terminal
pos4(stem,0); rt x4r=hround(w-2.5u+.5stem); y4=1/3[bh,h];
pos5(stem,0); x5=x4; y5=max(.55bh,2vair);
filldraw stroke super_arc.e(3,4)&z4e..z5e;	% arc and stem
pos6(.3[thin_join,vair],90); x6=x4; bot y6=bh;
pos7(hround(curve-2stem_corr),180);
lft x7r=hround max(.5u,1.5u-.5curve); y7=1/3[top y8l,top y6r];
pos8(vair,270); x8l=.5w-.75u; bot y8r=-oo;
pos9(thin_join,360); z9l=z5l;
(x,y8r)=whatever[z8l,z9l]; x8r:=max(x,x8-u);
{{interim superness:=more_super;
 filldraw stroke z9e{down}...z8e{left}...{up}z7e&super_arc.e(7,6)}}; % bowl
if serifs: numeric shaved_stem; shaved_stem=hround(stem-3stem_corr);
 if hair#+.5stem#>1.5u#: pickup tiny.nib;
  pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
  pos10(shaved_stem,0); x10=x5'; y10=.2[.5tiny,bh];
  pos11(shaved_stem,0); rt x11r=hround(w-.25u); bot y11=0;
  pos12(shaved_stem,0); x11=x12; top y12=slab+eps;
  filldraw z5'l---z10l...z11l{right}--z11r
   --z12r{left}...z10r+.75(z12-z11)---z5'r--cycle;	% foot
 else: pickup crisp.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
  pos10(shaved_stem,0); x10=x5'; y10=1/3bh;
  pos11(.2[vair,stem],90); x11r=.5[x10r,x12r]; bot y11l=-vround .5oo;
  pos12(hair,180); rt x12l=hround(w-.1u); y12=max(y10,y11+vair);
  pos13(hair,180); x13=x12; top y13=max(vround .6bh,top y12);
  (x',y11l)=whatever[z11r,z12r]; x11l:=max(x',x10);
  filldraw stroke z5'e---z10e...z11e{right}...z12e---z13e; fi	% hook
else: numeric shaved_stem; shaved_stem=hround(stem-stem_corr);
 pickup tiny.nib; pos5'(shaved_stem,0); rt x5'r=fine.rt x5r; y5'=y5;
 pos10(shaved_stem,0); x10=x5'; bot y10=0;
 filldraw stroke z5'e--z10e; fi	% base of stem
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;

cmchar "The letter b";
beginchar("b",10u#+serif_fit#,asc_height#,0);
italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#);
adjust_fit(serif_fit#,0);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
lft x1l=hround(2.5u-.5stem'); top y1=h;
numeric edge; edge=rt x2r;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
pos4(vair,90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180);
rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l),1/3[rt x2,edge]);
y3=1/8[bar_height,x_height];
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x4,x5r]);
(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x6,x5r]);
filldraw stroke z3e{up}...pulled_arc.e(4,5)&pulled_arc.e(5,6)...{up}z7e; % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
y2=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{left}...{up}z7l));
pickup tiny.nib; filldraw stroke z1e--z0'e--z0e--z2e;	% stem
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
z7'=z2; x8l=x7'l; bot y8=0;
filldraw stroke z7'e--z8e;	% point
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); fi	% upper serif
penlabels(0,1,2,3,4,5,6,7,8); endchar;

cmchar "The letter c";
beginchar("c",8u#,x_height#,0);
italcorr x_height#*slant-.2u#;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
pickup fine.nib; pos2(vair',90); pos4(vair',270);
x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo;
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h;
if serifs: pos1(hair,0); pos0(flare,0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare);
 rt x1r=hround(w-.7u); bulb(2,1,0);	% bulb
 pos5(hair,0); rt x5r=hround(w-.5u);
 y5=max(good.y(.5bar_height-.9),y4l+vair');
 (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u);
 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
  & pulled_super_arc.e(3,4)(.5superpull)
  ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e;	% arc and lower terminal
else: pos1(4/7[vair',flare],80);
 rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r];
 filldraw stroke term.e(2,1,right,.8,4);	% upper terminal
 pos5(.6[vair',flare],275); rt x5r=hround(w-.5u);
 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
 forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e;
  if angle direction 1 of p.e>75:
   p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor
 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
  & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi	% arc and lower terminal
penlabels(0,1,2,3,4,5); endchar;

cmchar "The letter d";
beginchar("d",10u#+serif_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem'); top y1=h;
numeric edge; edge=lft x2l;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),1/3[lft x2,edge]);
y3=1/8[bar_height,x_height];
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...pulled_arc.e(4,5)
 & pulled_arc.e(5,6)...{up}z7e; % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
pickup tiny.nib; bot y2=if serifs:-min(oo,serif_drop) else: 0 fi;
filldraw stroke z1e--z0'e--z0e--z2e;	% stem
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop);	% upper serif
 sloped_serif.r(2,0,b,1/3,jut,min(oo,serif_drop)); fi	% lower serif
penlabels(0,1,2,3,4,5,6,7); endchar;

cmchar "The letter e";
beginchar("e",7.25u#+max(.75u#,.5curve#),x_height#,0);
italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0);
adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi);
numeric left_curve,right_curve;
left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi;
if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi
if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi
pickup tiny.nib; pos1(right_curve,0);
pos2(vair,90); pos3(left_curve,180);
y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1;
rt x1r=hround min(w-.5u,w-u+.5right_curve);
lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u;
{{interim superness:=more_super;
 filldraw stroke super_arc.e(1,2)}};	% right bowl
y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u;
if serifs: pos4(vair',270); pos5(hair,360);
 y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r;
 (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u);
 filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4)
  ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal
else: pos4(vair,270);
 filldraw stroke super_arc.e(2,3) & super_arc.e(3,4);	% left bowl and arc
 pickup fine.nib; pos4'(vair,270); z4=z4';
 pos5(.5[vair,flare],275); rt x5r=hround(w-.6u);
 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke term.e(4',5,right,1,4); fi	% terminal
path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4);
y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1;
forsuffixes $=l,r:
 x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor
fill stroke z0e--z1'e;	% crossbar
penlabels(0,1,2,3,4,5); endchar;

cmchar "The letter f";
beginchar("f",5.5u#,asc_height#,0);
italcorr asc_height#*slant+if serifs:flare#-.25u# else: 1.25u# fi;
adjust_fit(stem_shift#,if monospace: .5u# else:-stem_shift# fi);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pickup fine.nib; numeric bulb_diam;
if serifs: bulb_diam=hround .8[stem,flare];
 pos2(bulb_diam,0); y2+.5bulb_diam=.9[x_height,h+oo];
 if monospace: rt x2r=hround(w-.5u)+1 else: lft x2l=hround(w-.75u+.5) fi;
else: pos2(5/7[vair,flare],90); top y2r=h;
 rt x2=hround(if monospace:w-.5u else:w+.75u fi); fi
f_stroke(1,2,a,b,c,jut,if not monospace:1.25fi\\ jut); % stem, terminal, serif
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
pos3(bar,90); pos4(bar,90);
rt x4=hround(w-if monospace:.75u+1 else:1/3u fi);
filldraw stroke z3e--z4e;	% bar
penlabels(1,2,3,4); endchar;

iff not variant_g: cmchar "The letter g";
beginchar("g",9u#,x_height#,desc_depth#);
italcorr x_height#*slant+.25u#;
adjust_fit(0,0);
numeric light_vair,light_curve,loop_top,loop_side;
light_vair=Vround(.5[thin_join,vair]+vair_corr);
light_curve=max(fine.breadth,hround(curve-3stem_corr));
loop_top=Vround .77[vair,fudged.stem];
loop_side=hround .64[vair,fudged.stem];
pickup fine.nib; pos1(light_vair,90);
pos2(light_curve,180); pos3(light_vair,270);
pos4(light_curve,360); pos11(loop_top,90);
y11r=good.y(y11r+.15bar_height-y11); x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3];
lft x2r=hround(1.75u-.5light_curve); rt x4r=hround(w-2.75u+.5light_curve);
top y1r=h+oo; y3r=good.y(y3r+.27[top y11r,bot y1l]-y3);
filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3);	% left half of bowl
filldraw stroke pulled_arc.e(3,4) & pulled_arc.e(4,1);	% right half of bowl
x0=superness[x1r,x4r]; y0=superness[y4r,y1r];	% NE point on the super bowl
x8'=superness[x3r,x2r]; y8'=superness[y2r,y3r];	% SW point on the super bowl
x8''=superness[x3,x2]; y8''=superness[y2,y3];
pos0(thin_join,angle(z0-z8')+90);
pos8(thin_join,angle(z0-z8')-90); z8=.618[z8',z8''];
if serifs: pos5(vair,90);
 pos6(hair,0); pos7(.5[hair,flare],0); x5=.75[x0,x6]; top y5r=h+o;
 rt x6r=hround(w-.25u); y6+(.5[hair,flare])/2=.95[bar_height,h]+oo;
 filldraw stroke z0e..{right}z5e; bulb(5,6,7);	% ear
else: pos5(vair',100); top y5r=h+oo;
 rt x5l=hround(w-.25u); y5l:=good.y y5l;
 filldraw z0l{z5-z0}..z5l--z5r{left}..{curl 1}z0r--cycle; fi	% ear
pos10(loop_top,90); x10=x8+.75u; y10=y11;
pos12(loop_side,0); pos13(light_vair,-90);
pos14(loop_side,-180); pos10'(.5[thin_join,vair],-270);
rt x12r=hround max(w-1.25u+.5loop_side,w-.5u); y12=y14=.5[y11,y13];
x11=x13=max(.5w,x10+eps); bot y13r=-d-oo-1; x14=w-x12; z10'l=z10l;
filldraw stroke z8e{z8-z0}..z10e---z11e;	% link
filldraw stroke {{interim superness:=hein_super; super_arc.e(11,12)}}
 & super_arc.e(12,13) & super_arc.e(13,14) & super_arc.e(14,10');	% loop
penlabels(0,1,2,3,4,5,6,7,8,10,11,12,13,14); labels(8',8''); endchar;

iff variant_g: cmchar "Variant letter g";
beginchar("g",10u#+serif_fit#,x_height#,desc_depth#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
adjust_fit(0,serif_fit# if serifs: -.5u# fi);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem');
numeric edge; edge=lft x2l;
path edge_path; edge_path=(edge,h)--(edge,0);
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),2/3[lft x2,edge]); y3=bar_height;
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=vround 1/3vair;
lft x7l=edge; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
 &super_arc.e(5,6)&z6e{right}...{up}z7e;	% bowl
y1=ypart(edge_path intersectionpoint(z3l{up}...{left}z4l));
y0=ypart(edge_path intersectionpoint(z7l{down}...{left}z6l));
pickup tiny.nib; bot y2=if serifs: -.25d else: 0 fi;
filldraw stroke z1e--z0'e--z0e--z2e;	% stem
pickup crisp.nib;
pos8(hround(hair-stem_corr),0); pos7'(stem',0);
z7'=z1; x8r=x7'r; top y8=h+oo;
filldraw stroke z7'e--z8e;	% point
if serifs: pickup tiny.nib;
 pos9(vair,-90); x9=.5[x2,x10]; bot y9r=-d-o-1;
 pos10(hair,-180); lft x10r=hround u; y10=-.75d+.5flare;
 pos11(flare,-180); z11r=z10r;
 bulb(9,10,11); filldraw stroke super_arc.e(2,9);	% tail
else: pickup fine.nib; pos2'(stem,0); z2'=z2;
 z2''r=z2'r; z2''=z2'; z2''l=(x2'l,0);
 pos9(vair,-90); x9=4.5u; bot y9r=-d-o-1;
 pos10(.5[vair,flare],-90); lft x10=hround 1.25u;
 y10r=good.y -5/6d; y10l:=good.y y10l;
 filldraw stroke z2'e..z2''e&super_arc.e(2'',9)
  & term.e(9,10,left,.9,4); fi	% tail
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;

cmchar "The letter h";
beginchar("h",10u#,asc_height#,0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
pos1'(stem',0); pos2'(stem',0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h; bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;	% left stem
h_stroke(2,a,3,4);	% arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
penlabels(1,2,3,4); endchar;

cmchar "The letter i";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("i",5u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit# + .5dot_diam# -2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0;
filldraw stroke z1e--z2e;	% stem
pos3(dot_diam,0); pos4(dot_diam,90);
if serifs: x3r=max(x1r,x1+.5(dot_diam-tiny)-.2jut) else: x3=x1-.5 fi;
top y4r=h+1;
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi
x3=x4; y3=.5[y4l,y4r]; dot(3,4);	% dot
if serifs: sloped_serif.l(1,2,a,1/3,.95jut,serif_drop);	% upper serif
 dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi	% lower serif
penlabels(1,2,3,4); endchar;

cmchar "The letter j";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("j",5.5u#,min(asc_height#,10/7x_height#+.5dot_diam#),desc_depth#);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+2stem_shift# if monospace:+\\.5u# fi,
 serif_fit#-2stem_shift# if monospace:-.5u# fi);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
rt x1r=hround(.5w+.25u+.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d;
filldraw stroke z1e--z2e;	% stem
pos3(dot_diam,0); pos4(dot_diam,90);
x3r=x1r; top y4r=h+1;
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi
x3=x4; y3=.5[y4l,y4r]; dot(3,4);	% dot
if serifs: sloped_serif.l(1,2,a,1/3,1.1jut,serif_drop);	% upper serif
 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
 x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
 if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi;
 (x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]);
 filldraw stroke z2e{down}...z5e{left};  bulb(5,6,7); % arc and bulb
else: pickup fine.nib; pos2'(stem',0); z2'=z2;
 pos6(.2[vair,stem'],-90); pos7(vair,-90);
 lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo);
 (x,y7l)=whatever[z7r,z3]; x7l:=x;
 z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r;
 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
 filldraw stroke z2'e..{down}z5e & super_arc.e(5,6)
  & z6e{left}..z7e; fi	% arc and terminal
penlabels(1,2,3,4,5,6,7); endchar;

cmchar "The letter k";
beginchar("k",9.5u#,asc_height#,0);
italcorr x_height#*slant-.2u#;
adjust_fit(serif_fit#,serif_fit#); pickup tiny.nib;
numeric right_jut,stem[],alpha[];
stem1=max(tiny.breadth,hround(fudged.stem-stem_corr));
stem2=max(tiny.breadth,hround(fudged.stem-2stem_corr));
stem3=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi));
stem4=max(tiny.breadth,hround(fudged.stem-3stem_corr));
if serifs: right_jut=.6jut; else: right_jut=.4tiny; fi
pos1(stem1,0); pos2(stem2,0); top y1=h; bot y2=0;
lft x1l=lft x2l=hround(2.5u-.5stem1);
top y3=x_height; rt x3r=hround(r-letter_fit-.7u-right_jut)+eps;
bot y6=0; rt x6r=hround(r-letter_fit-.3u-right_jut)+eps;
x4=x11=x1; y4=.7bar_height; y11=y3;
alpha1=diag_ratio(1,.5(stem3-tiny),y3-y4,x3r-x4);
alpha2=diag_ratio(1,.5(stem4-tiny),y11-y6,x6r-x1);
penpos3(alpha1*(stem3-tiny),0); penpos4(whatever,-90);
z5=.5[z5l,z5r]; penpos6(alpha2*(stem4-tiny),0);
forsuffixes $=l,r: y3'$=x_height; y6'$=0; z4$=z3'$+whatever*(z3-z4);
 z5$=z6'$+whatever*(z11-z6)=whatever[z3,z4]; endfor
z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4);
% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\]
z6'r=z6r+penoffset z11-z6 of currentpen+whatever*(z11-z6);
z6'l=z6l+penoffset z6-z11 of currentpen+whatever*(z11-z6);
fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle;	% upper diagonal
fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle;	% lower diagonal
pos0(stem1,0); pos0'(stem2,0); y0=y0'; x0=x1; x0'=x2;
rt z0r=whatever[z3,z4]; filldraw stroke z1e..z0e--z0'e..z2e; % stem
if serifs: numeric inner_jut;
 if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut;
 else: rt x2r+inner_jut+.5u+1=lft x6l-inner_jut; fi
 sloped_serif.l(1,0,a,1/3,jut,serif_drop); % upper stem serif
 dish_serif(2,0',b,1/3,jut,c,1/3,inner_jut);	% lower stem serif
 dish_serif(3,4,d,2/3,1.4jut,e,1/2,right_jut)(dark); % upper diagonal serif
 dish_serif(6,5,f,1/2,inner_jut,g,1/3,right_jut)(dark);fi % lower diagonal serif
penlabels(0,1,2,3,4,5,6,11); endchar;

cmchar "The letter l";
beginchar("l",5u#,asc_height#,0); l_width#:=5u#+2serif_fit#;
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2; top y1=h; bot y2=0;
filldraw stroke z1e--z2e;	% stem
if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop);	% upper serif
 dish_serif(2,1,b,1/3,jut,c,1/3,jut); fi	% lower serif
penlabels(1,2); endchar;

cmchar "The letter m";
beginchar("m",15u#,x_height#,0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
numeric shaved_stem; shaved_stem=hround(mfudged.stem-2stem_corr);
pickup tiny.nib; pos1(mfudged.stem,0); pos2(mfudged.stem,0);
pos1'(shaved_stem,0); pos2'(shaved_stem,0);
pos3(mfudged.stem,0); pos5(mfudged.stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l;
lft x3l=hround(.5w-.5stem); x5-x3=x3-x1;
if not monospace: r:=hround(x5+x1)-l; fi	% change width for better fit
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;	% left stem
h_stroke(2,a,3,4);	% left arch and middle stem
h_stroke(4,b,5,6);	% right arch and right stem
if serifs: sloped_serif.l(1',2',c,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,d,1/3,jut,e,1/3,jut); % lower left serif
 dish_serif(4,3,f,1/3,inner_jut,g,1/3,jut); % lower middle serif
 dish_serif(6,5,h,1/3,inner_jut,i,1/3,jut); fi % lower right serif
penlabels(1,2,3,4,5,6); endchar;

cmchar "The letter n";
beginchar("n",10u#,x_height#,0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;	% left stem
h_stroke(2,a,3,4);	% arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
penlabels(1,2,3,4); endchar;

cmchar "The letter o";
beginchar("o",9u#,x_height#,0);
italcorr .7x_height#*slant;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
penpos1(vair,90); penpos3(vair',-90);
penpos2(curve,180); penpos4(curve,0);
x2r=hround max(.5u,1.25u-.5curve);
x4r=w-x2r; x1=x3=.5w; y1r=h+vround 1.5oo; y3r=-oo;
y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;	% bowl
penlabels(1,2,3,4); endchar;

cmchar "The letter p";
beginchar("p",10u#+serif_fit#,x_height#,desc_depth#);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
adjust_fit(serif_fit#,0);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
lft x1l=hround(2.5u-.5stem'); top y1=h if serifs: +min(oo,serif_drop) fi;
numeric edge; edge=rt x2r;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180);
rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l), 1/3[rt x2,edge]);
y3=1/8[bar_height,x_height];
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]);
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
 &super_arc.e(5,6)&z6e{left}...{up}z7e;	% bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
pickup tiny.nib; bot y2=-d;
filldraw stroke z1e--z0'e--z0e--z2e;	% stem
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
z7'=z2; x8l=x7'l; bot y8=0;
filldraw stroke z7'e--z8e;	% point
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop);	% upper serif
 dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi	% lower serif
penlabels(0,1,2,3,4,5,6,7,8); endchar;

cmchar "The letter q";
beginchar("q",10u#+serif_fit#,x_height#,desc_depth#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
adjust_fit(0,serif_fit# if serifs: -.5u# fi);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem');
numeric edge; edge=lft x2l;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair',90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),2/3[lft x2,edge]); y3=bar_height;
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo; y7=min(y3,y6+y4-y3+.6vair);
lft x7l=min(lft x7l-(rt x7r-tiny.rt x2r),1/3[lft x2,edge]);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
 &super_arc.e(5,6)&z6e{right}...{up}z7e;	% bowl
y1=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{right}...{up}z7l));
pickup tiny.nib; bot y2=-d;
filldraw stroke z1e--z0'e--z0e--z2e;	% stem
pickup crisp.nib;
pos8(hround(hair-stem_corr),0); pos7'(stem',0);
z7'=z1; x8r=x7'r; top y8=h+oo;
filldraw stroke z7'e--z8e;	% point
if serifs: dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi	% lower serif
penlabels(0,1,2,3,4,5,6,7,8); endchar;

cmchar "The letter r";
numeric r_flare#; r_flare#=.75[if serifs: stem# else: vair# fi,flare#];
define_whole_blacker_pixels(r_flare);
beginchar("r",if serifs:max(7u#,5.5u#+r_flare#) else:6.5u# fi,x_height#,0);
italcorr x_height#*slant if not serifs: +.25u# fi;
adjust_fit(serif_fit#,0);
pickup fine.nib; top y4r=h+oo;
if serifs: pos4(vair,90); pos5(hair,0);
 x4=w-max(1.75u,.25u+r_flare);
 rt x5r=hround(w-.5u+.5); y5+.5r_flare=.9[bar_height,h]+oo;
 pos6(r_flare,0); bulb(4,5,6);	% bulb
else: pos4(r_flare,90); rt x4=hround(w-.25u); fi
pos3(thin_join,180); rt x3l=hround(2.5u-.5stem')+stem'; top y3=bar_height;
filldraw stroke z3e{up}...{right}z4e;	% arc
pickup tiny.nib; pos0(stem',0); pos2(stem',0);
pos1(hround(stem-3stem_corr),0); top y1=h+min(oo,serif_drop);
pos0'(hround(stem-3stem_corr),0); y0=y0'=y3; x1l=x0l=x0'l=x2l;
lft x1l=hround(2.5u-.5stem'); bot y2=0;
filldraw stroke z1e--z0'e--z0e--z2e;	% stem
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop);	% upper serif
 dish_serif(2,0,b,1/3,jut,c,1/3,1.25jut); fi	% lower serif
penlabels(1,2,3,4,5,6); endchar;

cmchar "The letter s";
beginchar("s",7.1u#,x_height#,0);
italcorr x_height#*slant-if serifs:.55u# else:.3u# fi;
adjust_fit(if monospace: .5u#,.4u# else: 0,if serifs:0 else:-.2u# fi fi);
numeric theta; theta=90-angle(40u,h); slope:=-h/40u;	% angle at middle
numeric s_slab; s_slab=if serifs:vair else:Vround .1[vair,stem] fi;
numeric ess'; ess'=max(fine.breadth,ess);
pickup fine.nib; pos2(max(fine.breadth,s_slab-vround vair_corr),-100);
pos0(ess',theta); pos7(s_slab,-90); x2l=x0=x7=.5w;
top y2l=h+vround 1.5oo; bot y7r=-oo;
y0-.5ess'=y7l+if serifs:.54 else: .52 fi\\(y2r-y7l-ess');
lft x3l=hround .6u; rt x6r=hround(w-.6u);
x3r-x3l=x6r-x6l=hround .5[s_slab,ess']-fine;
ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
interim superness:=more_super;
filldraw stroke super_arc.e(2,3) & z3e{down}
 ..z4e---z5e..z6e{down} & super_arc.e(6,7);	% main stroke
if serifs: pos1(hair,180); pos8(hair,180);
 rt x1l=hround(w-1.05u); lft x8r=hround .6u;
 bot y1=min(bot y2r,vround 1/5[top y5r,h]);
 top y8=max(top y7l,vround 5/6 bot y4l);
 filldraw stroke z1e{up}....{left}z2e;	% upper arc
 filldraw stroke z7e{left}....{x8-x7,5(y8-y7)}z8e;	% lower arc
 path upper_arc, lower_arc;
 upper_arc=z1{up}....{left}z2; lower_arc=z7{left}....{x8-x7,5(y8-y7)}z8;
 pos10(.3[fine.breadth,cap_hair],0); pos9(.3[fine.breadth,cap_hair],0);
 x10r=x1l; top y10=top y2l; x9l=x8r; bot y9=bot y7r;
 x1l-x1'=x8'-x8r=1.6cap_curve-fine; y1'=y1; y8'=y8;
 numeric t; t=xpart(upper_arc intersectiontimes(z10l--z1'));
 filldraw z1l--z10r--z10l--subpath(t,0) of upper_arc--cycle;	% upper barb
 t:=xpart(lower_arc intersectiontimes(z9r--z8'));
 filldraw z8r--z9l--z9r--subpath(t,1) of lower_arc--cycle;	% lower barb
else: pos1(4/7[s_slab,flare],-100); pos8(flare,-100);
 x1l=good.x(x1l+w-u-rt x1); lft x8r=hround .5u;
 top y1l=vround(.93h+1.5oo); bot y8r=vround .1h-oo;
 filldraw stroke term.e(2,1,right,.9,4);	% upper arc and terminal
 filldraw stroke term.e(7,8,left,1,4); fi	% lower arc and terminal
penlabels(0,1,1',2,3,4,5,6,7,8,8',9,10); endchar;

cmchar "The letter t";
beginchar("t",6u#+max(u#,.5stem#),
 min(asc_height#,if hefty:9/7 else:10/7 fi\\ x_height#),0);
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
adjust_fit(0,if serifs: 0 else: -.5u# fi);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2.5u-.5shaved_stem);
y2=y8; y3=max(.5bar_height,2vair);
pickup crisp.nib; pos8(bar,90);
rt x8=hround(w-1.3u); top y8r=x_height; lft x7=hround 1/3u; y7l=y8l;
if hefty: pos7(bar,90);
 filldraw stroke z7e--z8e;	% crossbar
 pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2;
 filldraw stroke z1e--z2'e;	% upper terminal
else: pos7(vair,90); pos1(hair,0);
 rt x1r=fine.rt x2l; top y1=h;
 filldraw z1l{down}...{left}z7r--z7l--z8l
  --z8r--(x1r,y8r)--z1r--cycle; fi	% upper terminal and crossbar
pickup fine.nib; interim superness:=more_super;
pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u);
if serifs: pos5(hair,0); y5=y3; x4l=.5[x3l,x5l];
 (x,y4r)=whatever[z4l,z5l]; x4r:=max(x,.5[x3r,x4]);
 filldraw stroke z2e..super_arc.e(3,4)...{up}z5e;	% stem and hook
 pickup crisp.nib; pos6(hair,0); pos5'(hair,0);
 x6=x5=x5'; top y6=max(vround .75bar_height,top y5); y5=y5';
 filldraw stroke z5'e--z6e;	% terminal
else: pos5(vair,-75); top y5l=vround .2[top y4l,bar_height];
 x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair;
 filldraw stroke z2e..super_arc.e(3,4);	% stem and hook
 path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e;	% terminal
 if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0):
  filldraw stroke z4e{right}...{up}z5e;
 else: filldraw p; fi fi;
penlabels(1,2,3,4,5,6,7,8); endchar;

cmchar "The letter u";
beginchar("u",10u#,x_height#,0);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi;
if light_vair<fine.breadth: light_vair:=fine.breadth; fi
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
pos3(stem,0); pos4(stem',0);
lft x1l=hround(2.5u-.5stem); x1=x2; x3=w-x1; x3r=x4r;
if serifs: top y1=h+min(oo,serif_drop); bot y4=-min(oo,serif_drop);
else: top y1=h; bot y4=0; fi
pos0(stem,0); pos0'(stem',0); x0=x3; x0'=x4; y0=y0';
penpos2'(stem-fine,-180); z2'=z2; y3=y1; y2=.5bar_height;
penpos5(max(eps,light_vair-fine),-90); penpos6(thin_join-fine,0);
y6=y0=2/3bar_height;
filldraw stroke z1e--z2e;	% left stem
filldraw stroke z3e..z0e--z0'e..z4e;	% right stem
pickup fine.nib; bot y5r=-oo; x5l=.5w-.25u; lft x6l=tiny.lft x0l;
(x,y5r)=whatever[z5l,z6l]; x5r:=max(x,.5[x5,x2'r]);
filldraw stroke {{interim superness:=hein_super;
  pulled_arc.e(2',5)}} & z5e{right}...{up}z6e;	% arc
if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper left serif
 sloped_serif.l(3,0,b,1/3,jut,serif_drop); % upper right serif
 sloped_serif.r(4,0',c,1/3,jut,min(oo,serif_drop)); fi % lower right serif
penlabels(1,2,3,4,5); labels(6); endchar;

cmchar "The letter v";
beginchar("v",if serifs: 9.5u# else:9u# fi,x_height#,0);
italcorr x_height#*slant+.25u#;
adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
numeric left_stem,right_stem,outer_jut,alpha;
left_stem=fudged.stem-stem_corr;
right_stem=min(fudged.hair if hefty:-2stem_corr fi,left_stem);
outer_jut=.75jut; x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4=h;
x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_oo;
alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr);
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
z0=whatever[z1r,z2r]=whatever[z3l,z4l];
if y0>notch_cut: y0:=notch_cut;
  fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
    --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
    ...{down}z0+.5left--cycle; % left and right diagonals
else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
    --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
if serifs: numeric inner_jut; pickup tiny.nib;
 prime_points_inside(1,2); prime_points_inside(4,3);
 if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut;
 else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut);	% left serif
 dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); fi	% right serif
penlabels(0,1,2,3,4); endchar;

cmchar "The letter w";
beginchar("w",13u#,x_height#,0);
italcorr x_height#*slant+.25u#;
adjust_fit(serif_fit#,serif_fit#);
numeric stem[],outer_jut,upper_notch,alpha,mid_corr;
outer_jut=.7jut; x1l=w-x8r=l+letter_fit+outer_jut+.25u;
stem1=fudged.stem-stem_corr;
stem4=min(fudged.hair if hefty:-2stem_corr fi,stem1);
stem2=if hefty:.1[vair,stem4] else: stem4 fi;
stem3=max(stem2,stem1-3stem_corr);
x2-x1=x4-x3=x6-x5=x8-x7; x2l+apex_corr=x3l; x6l+apex_corr=x7l;
y1=y8=h; y2=y3=y6=y7=-apex_oo;
y4=y5=if monospace: vround .6 fi\\ h; upper_notch=y4-notch_cut;
mid_corr=if monospace or hefty:-.3apex_corr else: .5jut fi;
alpha=diag_ratio(4,stem2-stem3+stem4,y1-y2,x8r-x1l+mid_corr-2apex_corr);
penpos1(alpha*stem1,0); penpos2(alpha*stem1,0);
penpos3(alpha*stem2,0); penpos4(alpha*stem2,0);
penpos5(alpha*stem3,0); penpos6(alpha*stem3,0);
penpos7(alpha*stem4,0); penpos8(alpha*stem4,0);
x4l-x1l=floor(x4l-x1l+.5(x5r+mid_corr-x4r)); % |x5r| $\approx$ |x4r+mid_corr|
z23=whatever[z1r,z2r]=whatever[z3l,z4l];
z45=whatever[z3r,z4r]=whatever[z5l,z6l];
z67=whatever[z5r,z6r]=whatever[z7l,z8l];
fill diag_end(1l,2l,1,1,3r,4r){z4-z3}
 ...if y45<upper_notch:(x45,upper_notch)+.5left{up}
   --(x45,upper_notch)+.5right{down} else: z45&z45 fi
 ...{z6-z5}diag_end(5l,6l,1,1,7r,8r)--diag_end(7r,8r,1,1,8l,7l){z7-z8}
 ...if y67>notch_cut:(x67,notch_cut)+.5right{down}
   --(x67,notch_cut)+.5left{up} else: z67&z67 fi
 ...{z5-z6}special_diag_end(6,5,4,3){z3-z4}
 ...if y23>notch_cut:(x23,notch_cut)+.5right{down}
   --(x23,notch_cut)+.5left{up} else: z23&z23 fi
 ...{z1-z2}diag_end(2r,1r,1,1,1l,2l)--cycle;	% diagonals
if serifs: numeric inner_jut[]; pickup tiny.nib;
 prime_points_inside(1,2); prime_points_inside(5,6); prime_points_inside(8,7);
 if monospace: inner_jut1=inner_jut4=1.5jut;
 elseif hefty: inner_jut1=inner_jut4=jut;
 else: fill diag_end(6r,5r,1,1,5l,6l)--.5[z5l,z6l]
   --.5[z5r,z6r]--cycle;% middle stem
  inner_jut2=.7inner_jut1; inner_jut4=1.1inner_jut3;
  if rt x1'r+jut+.5u+1<=lft x5'l-.7jut: inner_jut1=jut;
  else: rt x1'r+inner_jut1+.5u+1=lft x5'l-inner_jut2; fi
  if rt x5'r+jut+.5u+1<=lft x8'l-1.1jut: inner_jut3=jut;
  else: rt x5'r+inner_jut3+.5u+1=lft x8'l-inner_jut4; fi
  dish_serif(5',6,e,1/3,inner_jut2,f,1/2,inner_jut3); fi	% middle serif
 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut1);	% left serif
 dish_serif(8',7,c,.6,inner_jut4,d,1/2,outer_jut)(dark); fi	% right serif
penlabels(0,1,2,3,4,5,6,7,8,23,45,67); endchar;

cmchar "The letter x";
beginchar("x",if serifs:9.5u# else:9u# fi,x_height#,0);
italcorr x_height#*slant-.05u#;
adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
numeric stem[],outer_jut,xjut,alpha[];
stem1=fudged.stem-4stem_corr; stem2=min(fudged.hair,stem1);
outer_jut=.75jut; xjut= if serifs: (stem1-stem2)/4 else: 0 fi;
x1l=l+letter_fit+.1u+outer_jut; x2r=r-letter_fit-.3u-outer_jut-xjut;
x3l=l+letter_fit+outer_jut+xjut; x4r=r-letter_fit-outer_jut;
y1=y2=h; y3=y4=0;
alpha1=diag_ratio(1,stem1,h,x4r-x1l);
alpha2=diag_ratio(1,stem2,h,x2r-x3l);
penpos1(alpha1*stem1,0); penpos2(alpha2*stem2,0);
penpos3(alpha2*stem2,0); penpos4(alpha1*stem1,0);
if hefty: z0=whatever[z1,z4]=whatever[z2,z3];
 x12=x34=x0; y13=y24=y0;
 z12=whatever[z2l,z3l]; z13=whatever[z2l,z3l];
 z24=whatever[z2r,z3r]; z34=whatever[z2r,z3r];
 forsuffixes $=13,24,34: z$'=.2[z$,z0]; endfor
 fill diag_end(12,1r,.5,1,1l,13')--z13'--diag_end(13',3l,1,.5,3r,34')--z34'
  --diag_end(34',4l,.5,1,4r,24')--z24'
  --diag_end(24',2r,1,.5,2l,12)--z12--cycle; % diagonals
else: fill diag_end(4r,1r,.5,1,1l,4l)
  --diag_end(1l,4l,.5,1,4r,1r)--cycle; % left diagonal
 fill diag_end(2l,3l,.5,1,3r,2r)
  --diag_end(3r,2r,.5,1,2l,3l)--cycle; fi	% right diagonal
if serifs: numeric inner_jut[]; pickup tiny.nib;
 prime_points_inside(1,4); prime_points_inside(2,3);
 prime_points_inside(3,2); prime_points_inside(4,1);
 if rt x1'r+jut+.5u+1<=lft x2'l-jut-xjut: inner_jut1=jut;
 else: rt x1'r+inner_jut1+.5u+1=lft x2'l-inner_jut1-xjut; fi
 if rt x3'r+jut+.5u+1<=lft x4'l-jut-xjut: inner_jut2=jut;
 else: rt x3'r+inner_jut2+.5u+1=lft x4'l-inner_jut2-xjut; fi
 dish_serif(1',4,a,1/3,outer_jut,b,2/3,inner_jut1);	% upper left serif
 dish_serif(4',1,c,2/3,inner_jut2,d,1/3,outer_jut);	% lower right serif
 dish_serif(2',3,e,2/3,inner_jut1+xjut,
  f,1/2,outer_jut+xjut)(dark);	% upper right serif
 dish_serif(3',2,g,1/2,outer_jut+xjut,
  h,2/3,inner_jut2+xjut)(dark); fi	% lower left serif
penlabels(0,1,2,3,4,12,13,24,34); endchar;

cmchar "The letter y";
beginchar("y",if serifs:9.5u# else:9u# fi,x_height#,desc_depth#);
italcorr x_height#*slant+.25u#;
adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut;
left_stem=fudged.stem-stem_corr;
right_stem=fudged.hair if hefty:-2stem_corr fi;
bot_stem=fudged.hair if hefty:-8stem_corr fi;
bot_vair=Vround(if serifs: vair else:.5[vair,bot_stem] fi);
outer_jut=.75jut;
x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4r=h; y2=y3=0; x2l=x3l;
numeric alpha,alpha[]; x9=3u; y9=bot_vair-d-oo;
alpha1=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-apex_corr);
alpha2=diag_ratio(1,bot_stem,y1-y9,x4r-x9);
if alpha1<alpha2: x2l-x1l=x4r-x3r+apex_corr; alpha=alpha1;
else: alpha=alpha2; z3l=whatever[z9,z4r-(alpha*bot_stem,0)]; fi
penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0);
alpha3=(y1++(x2l-x1l))/y1;
penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0);
z0=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r);
if y0>notch_cut: y0:=notch_cut;
  fill z0+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r)
    --z3r--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1}
    ...{down}z0+.5left--cycle; % left and right diagonals
else: fill z0--diag_end(0,4l,1,1,4r,3r)--z3r--z2l
    --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
penpos5(alpha*bot_stem,0); z5r=whatever[z3r,z4r]; y5-.5vair=-.5d;
if serifs: numeric light_bulb; light_bulb=hround 7/8[hair,flare]; clearpen;
 penpos6(vair,-90); penpos7(hair,-180); penpos8(light_bulb,-180);
 x6=2u; y6r=-d-oo; y8-.5light_bulb=-.85d; x8r=hround .35u;
 fill stroke z3e---z5e...{left}z6e; bulb(6,7,8);	% arc and bulb
 numeric inner_jut; pickup tiny.nib;
 prime_points_inside(1,2); prime_points_inside(4,3);
 if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut;
 else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut);	% left serif
 dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark);	% right serif
else: penpos6(bot_vair,-90); x6=2.5u; y6r=-d-oo;
 fill stroke z3e---z5e...{left}z6e;	% arc
 pickup fine.nib; pos6'(bot_vair,-90); z6'=z6;
 pos7(2/3[bot_vair,flare],-85);
 lft x7l=hround u; bot y7r=vround-.96d-oo; y7l:=good.y y7l;
 filldraw stroke term.e(6',7,left,1,4); fi % arc and terminal
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;

cmchar "The letter z";
beginchar("z",8u#,x_height#,0);
italcorr x_height#*slant-.5serif_fit#-.3u#;
adjust_fit(0,.5serif_fit#);
numeric arm_thickness[],z_stem;
if hefty: arm_thickness1=Vround(vair-vair_corr); arm_thickness2=vair;
 z_stem=.6[vair,stem];
else: arm_thickness1=vair; arm_thickness2=vair'; z_stem=.9[vair,stem]; fi
pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u); lft x3l=lft x4l=hround .5u;
top y1=h; y2=min(y1,h-2/3arm_thickness1);
bot y4=0; y3=max(y4,2/3arm_thickness2);
numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3));
penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0);
penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0);
pair delta; delta=penoffset z3-z2 of currentpen;
fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l
 ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r
 ---cycle;	% diagonal
pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180);
top y5r=h; x5=x1; lft x6r=hround .75u; y6=good.y(y5l-beak/1.4)-eps;
arm(5,6,a,beak_darkness,-.4beak_jut);	% upper arm and beak
pos7(arm_thickness2,-90); pos8(hair,0);
bot y7r=0; x7=x4; rt x8r=hround(w-.75u); y8=good.y(y7l+beak/1.2)+eps;
arm(7,8,b,beak_darkness,.6beak_jut);	% lower arm and beak
penlabels(1,2,3,4,5,6,7,8); endchar;

                        % R O M A N L  ends %


font_x_height x_height#;
if monospace: font_normal_space 9u#; % no stretching or shrinking
 font_quad 18u#;
 font_extra_space 9u#;
else: font_normal_space 6u#+2letter_fit#;
 font_normal_stretch 3u#; font_normal_shrink 2u#;
 font_quad 18u#+4letter_fit#;
 font_extra_space 2u#;
 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
 ligtable "k": if serifs: "v": "a" kern -u#, fi\\"w": "e" kern k#,
  "a" kern k#, "o" kern k#, "c" kern k#;
 ligtable "P": "A" kern kk#,
  "y": "o" kern k#, "e" kern k#, "a" kern k#, "." kern kk#, "," kern kk#;
 ligtable "F": "V": "W": if serifs: "o" kern kk#, "e" kern kk#, "u" kern kk#,
    "r" kern kk#, "a" kern kk#, "A" kern kkk#,
   else: "o" kern k#, "e" kern k#, "u" kern k#,
    "r" kern k#, "a" kern k#, "A" kern kk#, fi
  "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#;
 ligtable "T": "y" kern if serifs: k# else: kk# fi,
  "Y": "e" kern kk#, "o" kern kk#,
   "r" kern kk#, "a" kern kk#, "A" kern kk#, "u" kern kk#;
 ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#,
   "V" kern k#, "Y" kern k#;
 if serifs: ligtable "h": "m": "n":
   "t" kern k#, "u" kern k#, "b" kern k#, "y" kern k#, "v" kern k#, "w" kern k#;
  ligtable "c": "h" kern k#, "k" kern k#; fi
 ligtable "o": "b": "p": "e" kern -k#, "o" kern -k#, "x" kern k#,
   "d" kern -k#, "c" kern -k#, "q" kern -k#,
  "a": if serifs: "v" kern k#, "j" kern u#, else: "r" kern k#, fi
  "t": "y" kern k#,
  "u": "w" kern k#;
 ligtable "A": if serifs: "R": fi\\ "t" kern k#,
  "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#,
  "L": "T" kern kk#, "Y" kern kk#, "V" kern kkk#, "W" kern kkk#;
 ligtable "g": "j" kern -k#; % logjam
 ligtable "I": "I" kern -k#; % Richard III
fi;
bye.