summaryrefslogtreecommitdiff
path: root/fonts/igo/fonts/igoroman.mf
blob: 71635690a38e4d804ef5dc1ae5a844f68435eaf5 (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

mode_setup;
font_setup;

%%%%%%%%%%%%%%%%%
%%% romand.mf %%%
%%%%%%%%%%%%%%%%%

cmchar "The numeral 0";
beginchar("0",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 1";
beginchar("1",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 2";
beginchar("2",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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}..{z5e-z4e}z4e--z5e--z6e;  % stroke
penlabels(0,1,2,3,4,5,6,7,8);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 3";
beginchar("3",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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*(15u,.1h);
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); 
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 4";
beginchar("4",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 5";
beginchar("5",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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); 
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 6";
beginchar("6",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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; {{interim superness:=more_super; 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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 7";
beginchar("7",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 8";
beginchar("8",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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);
 if lower_side>1.2upper_side: upper_side:=lower_side; fi
 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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The numeral 9";
beginchar("9",24/22size#,23/22size#,1/22size#);
italcorr fig_height#*slant-.5u#;
%adjust_fit(0,0);
w:=9u;
h:=fig_height;
d:=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; {{interim superness:=more_super; 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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

%%%%%%%%%%%%%%%%%
%%% romanu.mf %%%
%%%%%%%%%%%%%%%%%

cmchar "The letter A";
beginchar("A",24/22size#,23/22size#,1/22size#);
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=13u;
h:=cap_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter B";
beginchar("B",24/22size#,23/22size#,1/22size#);
italcorr .75cap_height#*slant-.5u#;
%adjust_fit(cap_serif_fit#,0);
w:=12.5u;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter C";
if serifs: 
beginchar("C",24/22size#,23/22size#,1/22size#);
 italcorr cap_height#*slant-.5u#;
 %adjust_fit(0,0);
w:=13u;
h:=cap_height;
d:=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",24/22size#,23/22size#,1/22size#);
 italcorr cap_height#*slant-.5u#;
 %adjust_fit(0,0);
w:=11.5u;
h:=cap_height;
d:=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+oo; top y2r=h+oo; y3=.5h;
 bot y4r=-oo; bot y5r=vround .08h-oo; 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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter D";
beginchar("D",24/22size#,23/22size#,1/22size#);
italcorr .7cap_height#*slant-.5u#;
%adjust_fit(cap_serif_fit#,0);
w:=13.5u;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter E";
beginchar("E",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-beak_jut#-.5u#;
%adjust_fit(cap_serif_fit#,0);
w:=12u-width_adj;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter F";
beginchar("F",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-beak_jut#-.25u#;
%adjust_fit(cap_serif_fit#,0);
w:=11.5u-width_adj;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter G";
if serifs: 
beginchar("G",24/22size#,23/22size#,1/22size#);
 italcorr cap_height#*slant-1.5u#-.5cap_serif_fit#;
 %adjust_fit(0,.5cap_serif_fit#);
w:=14u;
h:=cap_height;
d:=0;
 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",24/22size#,23/22size#,1/22size#);
 italcorr cap_height#*slant-.5u#;
 %adjust_fit(0,0);
w:=12u;
h:=cap_height;
d:=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+oo; top y2r=h+oo; y3=.5h;
 bot y4r=-oo; bot y5r=vround .07h-oo;
 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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter H";
beginchar("H",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=13u+width_adj;
h:=cap_height;
d:=0;
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); 
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter I";
beginchar("I",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-.25u#;
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=max(6u,4u+cap_stem);
h:=cap_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter J";
beginchar("J",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-cap_serif_fit#
 +.75cap_jut#-2.5u#+min(.5cap_stem#,u#);
%adjust_fit(0,cap_serif_fit#);
w:=9u;
h:=cap_height;
d:=0;
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
 pickup tiny.nib; 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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter K";
beginchar("K",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-.5u#;
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=13.5u;
h:=cap_height;
d:=0;
r:=w;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter L";
beginchar("L",24/22size#,23/22size#,1/22size#);
%adjust_fit(cap_serif_fit#,0);
w:=11u-width_adj;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter M";
beginchar("M",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=16u+width_adj;
h:=cap_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter N";
beginchar("N",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#);
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=13u+width_adj;
h:=cap_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter O";
beginchar("O",24/22size#,23/22size#,1/22size#);
italcorr .7cap_height#*slant-.5u#;
%adjust_fit(0,0);
w:=14u-width_adj;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter P";
beginchar("P",24/22size#,23/22size#,1/22size#);
italcorr .75cap_height#*slant-.5u#;
%adjust_fit(cap_serif_fit#,0);
w:=12u;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter Q";
beginchar("Q",24/22size#,23/22size#,1/22size#);
italcorr .7cap_height#*slant-.5u#;
%adjust_fit(0,0);
w:=14u-width_adj;
h:=cap_height;
d:=comma_depth;
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,8);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter R";
beginchar("R",24/22size#,23/22size#,1/22size#);
italcorr .75cap_height#*slant- if serifs: 1.75 else: .5 fi\\ u#;
%adjust_fit(cap_serif_fit#,0);
w:=if serifs: 12u+.5max(2u,cap_curve) else:12.5u-.5width_adj fi;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter S";
beginchar("S",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-u#;
%adjust_fit(0,0);
w:=10u;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter T";
beginchar("T",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-beak_jut#-.25u#;
%adjust_fit(0,0);
w:=13u-width_adj;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter U";
beginchar("U",24/22size#,23/22size#,1/22size#);
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;
w:=13u+.5width_adj;
h:=cap_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2); 
 endchar;

cmchar "The letter V";
beginchar("V",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant+.25u#;
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=13u;
h:=cap_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter W";
beginchar("W",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant+.25u#;
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=18u;
h:=cap_height;
d:=0;
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)--.9[z5l,z6l]
   ..{z5-z6}.1[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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter X";
beginchar("X",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-.25u#;
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=13u;
h:=cap_height;
d:=0;
r:=w;
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);  % 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
math_fit(0,.5ic#); penlabels(0,1,2,3,4,12,13,24,34);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter Y";
beginchar("Y",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant+.45u#;
%adjust_fit(cap_serif_fit#,cap_serif_fit#);
w:=13u;
h:=cap_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

cmchar "The letter Z";
beginchar("Z",24/22size#,23/22size#,1/22size#);
italcorr cap_height#*slant-.5u#;
%adjust_fit(0,0);
w:=11u;
h:=cap_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-h)/2);
endchar;

%%%%%%%%%%%%%%%%%
%%% romanl.mf %%%
%%%%%%%%%%%%%%%%%

cmchar "The letter a";
beginchar("a",24/22size#,23/22size#,1/22size#);
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);
w:=9u;
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter b";
beginchar("b",24/22size#,23/22size#,1/22size#);
italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#);
%adjust_fit(serif_fit#,0);
w:=10u+serif_fit;
h:=asc_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter c";
beginchar("c",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant-.2u#;
%adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
w:=8u;
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter d";
beginchar("d",24/22size#,23/22size#,1/22size#);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
%adjust_fit(0,serif_fit#);
w:=10u+serif_fit;
h:=asc_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter e";
beginchar("e",24/22size#,23/22size#,1/22size#);
italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0);
%adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi);
w:=7.25u+max(.75u,.5curve);
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter f";
beginchar("f",24/22size#,23/22size#,1/22size#);
italcorr asc_height#*slant+if serifs:flare#-.25u# else: 1.25u# fi;
%adjust_fit(stem_shift#,if monospace: .5u# else:-stem_shift# fi);
w:=5.5u;
h:=asc_height;
d:=0;
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); 
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

iff not variant_g: cmchar "The letter g";
beginchar("g",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant+.25u#;
%adjust_fit(0,0);
w:=9u;
h:=x_height;
d:=desc_depth;
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=if serifs: Vround .77[vair,fudged.stem] else: vair fi;
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'');
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

iff variant_g: cmchar "Variant letter g";
beginchar("g",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
%adjust_fit(0,serif_fit# if serifs: -.5u# fi);
w:=10u+serif_fit;
h:=x_height;
d:=desc_depth;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter h";
beginchar("h",24/22size#,23/22size#,1/22size#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
%adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
w:=10u;
h:=asc_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter i";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("i",24/22size#,23/22size#,1/22size#);
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#);
w:=5u;
h:=min(asc_height,10/7x_height+.5dot_diam);
d:=0;
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,hround(x1+.5dot_diam-.2jut)-.5tiny)
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter j";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("j",24/22size#,23/22size#,1/22size#);
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);
w:=5.5u;
h:=min(asc_height,10/7x_height+.5dot_diam);
d:=desc_depth;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter k";
beginchar("k",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant-.2u#;
%adjust_fit(serif_fit#,serif_fit#);
w:=9.5u;
h:=asc_height;
d:=0;
r:=w;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter l";
beginchar("l",24/22size#,23/22size#,1/22size#);
l_width#:=5u#+2serif_fit#;
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
%adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
w:=5u;
h:=asc_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter m";
beginchar("m",24/22size#,23/22size#,1/22size#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
%adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
w:=15u;
h:=x_height;
d:=0;
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; % stem, sic
lft x3l=hround(.5w-.5mfudged.stem); x5-x3=x3-x1;
if not monospace: r:=hround(x5+x1)+r-w; 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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter n";
beginchar("n",24/22size#,23/22size#,1/22size#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
%adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
w:=10u;
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter o";
beginchar("o",24/22size#,23/22size#,1/22size#);
italcorr .7x_height#*slant;
%adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
w:=9u;
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter p";
beginchar("p",24/22size#,23/22size#,1/22size#);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
%adjust_fit(serif_fit#,0);
w:=10u+serif_fit;
h:=x_height;
d:=desc_depth;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter q";
beginchar("q",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
%adjust_fit(0,serif_fit# if serifs: -.5u# fi);
w:=10u+serif_fit;
h:=x_height;
d:=desc_depth;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
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",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant if not serifs: +.25u# fi;
%adjust_fit(serif_fit#,0);
w:=if serifs:max(7u,5.5u+r_flare) else:6.5u fi;
h:=x_height;
d:=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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter s";
beginchar("s",24/22size#,23/22size#,1/22size#);
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);
w:=7.1u;
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter t";
beginchar("t",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
%adjust_fit(0,if serifs: 0 else: -.5u# fi);
w:=6u+max(u,.5stem);
h:=min(asc_height,if hefty:9/7 else:10/7 fi\\ x_height);
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter u";
beginchar("u",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
%adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
w:=10u;
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter v";
beginchar("v",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant+.25u#;
%adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
w:=if serifs: 9.5u else:9u fi;
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter w";
beginchar("w",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant+.25u#;
%adjust_fit(serif_fit#,serif_fit#);
w:=13u;
h:=x_height;
d:=0;
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)--.9[z5l,z6l]
   ..{z5-z6}.1[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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter x";
beginchar("x",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant-.05u#;
%adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
w:=if serifs:9.5u else:9u fi;
h:=x_height;
d:=0;
r:=w;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter y";
beginchar("y",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant+.25u#;
%adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
w:=if serifs:9.5u else:9u fi;
h:=x_height;
d:=desc_depth;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;

cmchar "The letter z";
beginchar("z",24/22size#,23/22size#,1/22size#);
italcorr x_height#*slant-.5serif_fit#-.3u#;
%adjust_fit(0,.5serif_fit#);
w:=8u;
h:=x_height;
d:=0;
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);
currentpicture := currentpicture shifted ((24/22*size-w)/2, (23/22*size-asc_height)/2);
endchar;