summaryrefslogtreecommitdiff
path: root/usergrps/uktug/baskervi/5_5/txsymbol.mf
blob: baf5fefdd775187178a5406c4e1e82232c0cb830 (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
% txsymbol.mf
%
% (c) Copyright 1995 J"org Knappen
%
% This file is part of dcfonts version 1.2
%
% Please read the files 00readme.txt, 00inst.txt, 00error.txt, and
% copyrite.txt for further information
%
% You find some documentation in dcdoc.tex (needs LaTeX2e)
%
% Version 1.0
% 31-AUG-1995
%
% Miscellaneous symbols for the TS1 encoding
%
% Heavily borrowing from existent fonts, like Computer Modern, AMS symbols
% and wasy symbols

dcchar"Single straight base quote"; % jk
beginchar(oct"015",7u#,asc_height#,0); 
 numeric shifth_down;
 adjust_fit(0,0);
 x1=x2=.5w; 
 y2=max(.5[bar_height,x_height]+.5vair,h-x_height)-the_shift;
 if serifs:
  y1=flare/2; the_shift=h-.5stem-y1;
  pickup crisp.nib;
  pos1(flare,0); pos2(vair,0); 
  filldraw circ_stroke (z1e--z2e); % stem and bulb
 else:
  top y1=stem; the_shift=h-y1;
  pickup fine.nib;
  pos1(stem,0); pos2(vair,0); 
  filldraw stroke z1e--z2e; % stem
 fi
 charht:=dot_size#; chardp:=desc_depth#;
 penlabels(1,2,3,4);
endchar;

dcchar"Double straight base quotes"; % from pl_cud (plfonts)
beginchar(oct"022",9u#,asc_height#,0); 
 numeric top_width#,spread#,shifth_down;
 top_width#=if serifs: flare# else: stem# fi;
 spread#=max(3u#,top_width#+.5u#); define_pixels(spread);
 adjust_fit(0,0);
 numeric the_shift;
 x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3;
 y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height)-the_shift;
 if serifs:
  y1=flare/2; the_shift=h-.5stem-y1;
  pickup crisp.nib;
  pos1(flare,0); pos2(vair,0); pos3(flare,0); pos4(vair,0);
  filldraw circ_stroke (z1e--z2e); % left stem and bulb
  filldraw circ_stroke (z3e--z4e); % right stem and bulb
 else:
  top y1=stem; the_shift=h-y1;
  pickup fine.nib;
  pos1(stem,0); pos2(vair,0); pos3(stem,0); pos4(vair,0);
  filldraw stroke z1e--z2e; % left stem
  filldraw stroke z3e--z4e; % right stem
 fi
 charht:=dot_size#; chardp:=desc_depth#;
 penlabels(1,2,3,4);
endchar;

dcchar "twelve u dash";
beginchar(oct"025",12u#,x_height#,0);
italcorr .61803x_height#*slant+.5u#;
adjust_fit(letter_fit#,letter_fit#);
pickup crisp.nib; pos1(vair,90); pos2(vair,90);
top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
filldraw stroke z1e--z2e;  % bar
penlabels(1,2); endchar;

dcchar "three quarters em dash";
beginchar(oct"026",13.5u#,x_height#,0);
italcorr .61803x_height#*slant+.5u#;
adjust_fit(letter_fit#,letter_fit#);
pickup crisp.nib; pos1(vair,90); pos2(vair,90);
top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
filldraw stroke z1e--z2e;  % bar
penlabels(1,2); endchar;

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

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

dcchar"Tie accent"; % from italms (cmfonts)
beginchar(oct"032",5u#,asc_height#,0);
italcorr 4/9[x_height#,asc_height#]*slant+4.5u#+2letter_fit#+.5hair#;
adjust_fit(if monospace:2u#,2u# else:serif_fit#,serif_fit# fi);
pickup fine.nib; pos1(hair,180); pos2(vround 1/5[vair,stem],90); 
pos3(hair,0);
lft x1r=hround(.5w-.5hair); x2=.5[x1,x3];
rt x3r=hround(w+4u+2letter_fit+.5hair);
y1=y3=4/9[x_height,asc_height]; top y2r=vround 8/9[x_height,asc_height];
filldraw stroke super_arc.e(1,2) & super_arc.e(2,3);  % arc
penlabels(1,2,3); endchar;

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

iff variant_g: % italic
dcchar"Blank symbol"; % jk
beginchar(oct"040",8u#,asc_height#,0);
italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi;
adjust_fit(0,0); pickup tiny.nib;
pos1(stem,0); pos2(stem,0); x1=x2;
lft x1l=hround(1.5u-.5stem); top y1=h; y2=.5x_height;
filldraw stroke z1e--z2e;  % stem
sloped_serif.l(1,2,a,1/3,jut,serif_drop);  % serif
pickup fine.nib; pos2'(stem,-180); pos3(vair,-90);
pos4(curve,0); pos5(vair,90); pos0(hair,180);
z0=z2=z2'; x3=x5=.5[x2,x4]; rt x4r=hround(w-1.5u+.5curve);
bot y3r=-oo; top y5r=x_height+oo; y4=y2;
filldraw stroke pulled_arc.e(2',3) & pulled_arc.e(3,4)
 & pulled_arc.e(4,5) & super_arc.e(5,0);  % bowl
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
put_cross(.5stem+if serifs: .9max(limit_dist,jut) else: 1.8u fi,.5stem+3u);
penlabels(0,1,2,3,4,5); endchar;

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


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

dcchar "Double hyphen or short equals sign"; % jk
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"055",6u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0);
numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
pos3(thickness,90); pos4(thickness,90);
y1=y2; y3=y4;
top y1=vround .5h+.5thickness+.5spread;
top y3=vround .5h+.5thickness-.5spread;
rt x2=hround(w-u)+eps;
if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
x3=x1; x4=x2;
filldraw stroke z1e--z2e;  % upper bar
filldraw stroke z3e--z4e;  % lower bar
penlabels(1,2,3,4); endchar;

dcchar "Asterisk at the axis";  % from mathsy
beginchar(oct"052",9u#,v_center(x_height#));
adjust_fit(0,0);
numeric ast_flare; ast_flare=hround .7[thin_join,stem];
x0=.5w; y0=h-.5x_height;
for d=-150 step 60 until 150: z[d]=z0+.5dir d xscaled 7.5u yscaled x_height;
 numeric theta; theta=angle(z[d]-z0);
 fill z0+.5(0,-thin_join)rotated theta
  ---z[d]+.5(-ast_flare,-ast_flare)rotated theta
  ..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta
  ---z0+.5(0,thin_join)rotated theta--cycle; endfor  % diagonal at angle |d|
labels(0,[-150],[-90],[-30],30,90,150); endchar;

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

dcchar"Mho sign (turned Omega)"; % from lasy
beginchar(oct"115",13u#,cap_height#,0);
italcorr cap_height#*slant-.35u#;  %italcorr .75cap_height#*slant-.5u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(vair,-90); pos2(cap_curve,0);
pos3(vair,0); pos4(cap_curve,180); pos5(vair,180);
x1=.5w; bot y1r=0-o; lft x4r=hround u; y2=y4=1/3h; x2=w-x4;
rt x5l=hround(1/3(w+.5u)+.5hair); top y3=top y5=h; x3=w-x5;
filldraw stroke z3e{down}...{down}z2e
 & pulled_super_arc.e(2,1)(.5superpull)
 & pulled_super_arc.e(1,4)(.5superpull)
 & z4e{up}...{up}z5e;        % bowl
numeric arm_thickness; path p; p=z3{down}...{down}z2;
arm_thickness=Vround(if hefty:slab+2stem_corr else:.75[slab,cap_vstem] fi);
pickup crisp.nib; pos6(arm_thickness,90); pos7(fudged.hair,0);
top y6r=h; x6=x3; rt x7r=hround (w-.8u); y7=good.y(y6l-.5beak)+eps;
(x,y)=p intersectionpoint((0,y6l)--(w+h,y6l)); x6l:=x;
arm(6,7,a,.5beak_darkness,1.2beak_jut);    % right arm and beak
pos8(arm_thickness,90); pos9(fudged.hair,180);
y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
arm(8,9,b,.5beak_darkness,-1.2beak_jut);  % left arm and beak
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9); endchar;

dcchar"Big circle for copyright, etc";
beginchar("O",20u#,body_height#,max(paren_depth#,desc_depth#)); autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); endchar;

dcchar"Ohm sign (ISO 6937)"; % from greeku (cmfonts)
beginchar(oct"127",13u#,cap_height#,0);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(vair,90); pos2(cap_curve,180);
pos3(vair,180); pos4(cap_curve,0); pos5(vair,0);
x1=.5w; top y1r=h+o; lft x2r=hround u; y2=y4=2/3h; x4=w-x2;
rt x3l=hround(1/3(w+.5u)+.5hair); bot y3=bot y5=0; x5=w-x3;
filldraw stroke z3e{up}...{up}z2e
 & pulled_super_arc.e(2,1)(.5superpull)
 & pulled_super_arc.e(1,4)(.5superpull)
 & z4e{down}...{down}z5e;  % bowl
numeric arm_thickness; path p; p=z3{up}...{up}z2;
arm_thickness=Vround(if hefty:slab+2stem_corr else:.75[slab,cap_vstem] fi);
pickup crisp.nib; pos6(arm_thickness,-90); pos7(fudged.hair,-180);
bot y6r=0; x6=x3; lft x7r=hround .8u; y7=good.y(y6l+.5beak)+eps;
(x,y)=p intersectionpoint((0,y6l)--(w,y6l)); x6l:=x;
arm(6,7,a,.5beak_darkness,-1.2beak_jut);  % left arm and beak
pos8(arm_thickness,-90); pos9(fudged.hair,0);
y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
arm(8,9,b,.5beak_darkness,1.2beak_jut);  % right arm and beak
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9); endchar;

dcchar"Musical note (one eigth note)"; % jk
beginchar("n",11u#,asc_height#,0);
pickup rule.nib;
x1=3/5w; x2=x1; top y1=h; bot y2=.5bar_height;
lft x3=u; x5= x2; x4=x6=.5[x3,x5];
y3=y5=vround(.5bar_height); y4=y6-bar_height=-oo;
x7=x1; rt x9=w-u; x8=.5[x7,x9];
y7=y1; bot y9=vround(.5bar_height); y8=.5[y7,y9];
draw z1--z2; % stem
filldraw z3{down}...z4{right}...z5{up}...z6{left}...cycle; % body
draw z7{down}...z8...{down}z9; % flag
endchar;


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

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

dcchar"Backwards tick mark"; % from accent (cmfonts, grave accent)
beginchar(oct"140",9u#,min(asc_height#,2x_height#),0);
adjust_fit(0,0);
if serifs: pickup crisp.nib; x1-.5stem=hround 2u; x2=2/3[x1,w-x1];
 y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 filldraw circ_stroke z1e--z2e;  % diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 lft x1l=hround 1.5u; rt x2r=hround(.5w+.25u+.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e; fi  % diagonal
penlabels(1,2); endchar;

dcchar "Low lying tilde (squiggle)"; 
beginchar(oct"176",11u#,min(bar_height#,2/7x_height#),0);
italcorr h#*slant-u#;
adjust_fit(0,0);
if serifs: numeric theta; theta=angle(1/6(6u-vair),1/4h);
 pickup crisp.nib; numeric mid_width; mid_width=.4[vair,stem];
 pos1(vair,theta+90); pos2(vair,theta+90);
 pos3(vair,theta+90); pos4(vair,theta+90);
 z2-z1=z4-z3=(mid_width-crisp)*dir theta;
 lft x1r=w-rt x4l=hround 1.5u; top y4r=h;
 bot y1l=0;
 pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta;
 filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l
  --z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle;  % stroke
else: pickup fine.nib; pos1(vair,180); pos2(vair,90);
 pos3(.5[vair,slab],90); pos4(vair,90); pos5(vair,180);
 lft x1r=w-rt x5l=hround 1.5u; x2-x1=x3-x2=x4-x3=x5-x4;
 bot y1=bot y4l=0;
 top y2r=top y5=h; y3=.5[y2,y4];
 filldraw stroke z1e{up}...z2e{right}..z3e..{right}z4e...{up}z5e; fi % stroke
penlabels(1,2,3,4,5); endchar;

iff not monospace:
dcchar "Double hyphen-hyphenchar"; % jk
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"177",3u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0);
numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
pos3(thickness,90); pos4(thickness,90);
y1=y2; y3=y4;
top y1=vround .5h+.5thickness+.5spread;
top y3=vround .5h+.5thickness-.5spread;
rt x2=hround(2w-u)+eps;
lft x1=hround .2u-eps;
x3=x1; x4=x2;
filldraw stroke z1e--z2e;  % upper bar
filldraw stroke z3e--z4e;  % lower bar
penlabels(1,2,3,4); endchar;

iff monospace:
dcchar "Double hyphen-hyphenchar"; % jk
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"177",6u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0);
numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
pos3(thickness,90); pos4(thickness,90);
y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
rt x2=hround(w-u)+eps;
if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
x3=x1; x4=x2;
filldraw stroke z1e--z2e;  % upper bar
filldraw stroke z3e--z4e;  % lower bar
penlabels(1,2,3,4); endchar;

dcchar"Breve";
beginchar(oct"200",11u#,min(asc_height#,2x_height#),0);
italcorr h#*slant+.5vair#-1.5u#;
adjust_fit(0,0);
pickup crisp.nib; pos1(vair,-180); pos3(vair,0);
top y1=top y3=h; lft x1r=w-rt x3r=hround(2u-.5vair);
numeric mid_thickness; mid_thickness=vround 1/3[vair,stem];
pos2(mid_thickness,-90); x2=.5w;
bot y2r=vround max(x_height+o+tiny,1/3[x_height,h]+o-.5mid_thickness);
filldraw stroke z1e{down}...z2e{right}...{up}z3e;  % stroke
penlabels(1,2,3); endchar;

dcchar "Hachek (Caron)"; 
beginchar(oct"201",11u#,min(asc_height#,2x_height#),0);
h':=vround min(asc_height,2x_height); % height of circumflex being inverted
if serifs: italcorr h#*slant+.5hair#-1.75u#;
 adjust_fit(0,0);
 pickup crisp.nib; pos2'(.5[vair,curve],90); top y2'r=h;
 pos2(.5[vair,curve],90); x2=.5w;
 x1=w-x3=good.x 2.25u; top y1=top y3=h; y1-y2=.5(y2'-x_height);
 pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90);
 filldraw stroke z1e--z2e--z3e;  % diagonals
else: italcorr h#*slant-.5stem#+.5vair#-.75u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3;
 pos2(stem,0); bot y2=vround(1/12[x_height,h']+o); x2=.5w;
 top y1=top y3=h+o; lft x1l=hround(rt x2r-3.25u-.5vair);
 z0=whatever[z1r,z2r]=whatever[z2l,z3l];
 y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l;
 filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi  % diagonals
penlabels(0,1,2,3,4); endchar;

dcchar"Double tick mark (inch sign)"; % from accent (hungarian long umlaut)
beginchar(oct"202",9u#,min(asc_height#,2x_height#),0);
italcorr h#*slant-u#;
adjust_fit(0,0);
x3-x1=x4-x2=hround 3u; y3=y1; y4=y2;
if serifs: pickup crisp.nib; x3+.5stem=hround(w-1.5u); x2=2.5u;
 y1+.5stem=h; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 pos3(stem,theta); pos4(hair,theta);
 filldraw circ_stroke z1e--z2e;  % left diagonal
 filldraw circ_stroke z3e--z4e;  % right diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 pos3(stem,0); pos4(vair,0);
 rt x3r=hround(w-1.5u); lft x4l=hround(.5w+u-.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e;  % left diagonal
 filldraw stroke z3e--z4e; fi  % right diagonal
penlabels(1,2,3,4); endchar;

dcchar"Double backwards tick mark"; % jk
beginchar(oct"203",9u#,min(asc_height#,2x_height#),0);
adjust_fit(0,0);
x3-x1=x4-x2=hround 3u; y3=y1; y4=y2;
if serifs: pickup crisp.nib; x1-.5stem=hround 1.5u; x2=3.5u;
 y1+.5stem=h; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 pos3(stem,theta); pos4(hair,theta);
 filldraw circ_stroke z1e--z2e;  % left diagonal
 filldraw circ_stroke z3e--z4e;  % right diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 pos3(stem,0); pos4(vair,0);
 lft x1l=hround 1.5u; rt x2r=hround(.5w-u+.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e;  % left diagonal
 filldraw stroke z3e--z4e; fi  % right diagonal
penlabels(1,2,3,4); endchar;


dcchar "Dagger mark"; % from mathsy
beginchar(oct"204",8u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup fine.nib;
pos1(stem,0); pos2(thin_join,0); pos3(stem,0); pos4(hair,0);
pos5(stem,90); pos2'(thin_join,90); pos6(stem,90); z2'=z2;
x1=x2=x3=x4; x1-.5stem=hround(.5w-.5stem); center_on(x1);
x5-.5stem=hround u; x6=w-x5;
y1+.5stem=h+oo; y2=y5=y6; y3=.57y2; bot y4=-d-o;
y5+.5stem=floor(x_height+.5stem);
filldraw circ_stroke z1e{down}..z2e{down}..z3e{down}..z4e;  % stem
filldraw circ_stroke z5e{right}..{right}z2'e;  % left bulb
filldraw circ_stroke z6e{left}..{left}z2'e;  % right bulb
penlabels(1,2,3,4,5,6); endchar;

dcchar "Double dagger mark"; % from mathsy
beginchar(oct"205",8u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup fine.nib;
pos1(stem,0); pos2(thin_join,0); pos3(stem,0);
pos4(stem,90); pos2'(thin_join,90); pos5(stem,90); z2'=z2;
x1=x2=x3; x1-.5stem=hround(.5w-.5stem); center_on(x1);
x4-.5stem=hround u; x5=w-x4;
y1+.5stem=h+oo; y2=y4=y5=.5[y1,y3]; y3-.5stem=ceiling(.5[-d,h]);
filldraw circ_stroke z1e{down}..{down}z2e;  % top stem
filldraw circ_stroke z3e{up}..{up}z2e;    % upper middle stem
filldraw circ_stroke z4e{right}..{right}z2'e;  % top left bulb
filldraw circ_stroke z5e{left}..{left}z2'e;  % top right bulb
pos6(stem,0); pos7(thin_join,0); pos8(stem,0);
pos9(stem,90); pos7'(thin_join,90); pos0(stem,90); z7'=z7;
x6=x7=x8=x1; x9=x4; x0=x5;
y6=y3-stem-1; y7=y9=y0=.5[y6,y8]; y8-.5stem=-d-oo;
filldraw circ_stroke z6e{down}..{down}z7e;  % lower middle stem
filldraw circ_stroke z8e{up}..{up}z7e;    % bottom stem
filldraw circ_stroke z9e{right}..{right}z7'e;  % bottom left bulb
filldraw circ_stroke z0e{left}..{left}z7'e;  % bottom right bulb
penlabels(1,2,3,4,5,6,7,8,9,0); endchar;

dcchar "Double vertical line (norm or cardinality)"; % from mathsy
% Change (jk): Made the two lines as close as in \P
beginchar(oct"206",9u#,body_height#,paren_depth#);
adjust_fit(0,0); pickup rule.nib;
x1=x2; top y1=h; .5[y1,y2]=math_axis;
x3=x4=w-x1; y3=y1; y4=y2;
x3-x1=ceiling(rule_thickness+1.25u);
draw z1--z2; draw z3--z4;  % stems
labels(1,2,3,4); endchar;

dcchar "Per mill sign"; % by Emma Pease
beginchar(oct"207",15u#+max(6u#,2fudge*(hair#+stem#)),
  body_height#,body_height#-asc_height#);
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi;
adjust_fit(0,0); pickup fine.nib;
numeric left_curve,right_curve;
left_curve=hround 5/6[fudged.hair,fudged.stem];
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360);
top y1r=h; lft x2r=hround u; rt x4r=hround(.5(w-6u)-1.5u);
bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height);
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3];
filldraw stroke pulled_super_arc.e(1,2)(superpull)
 & pulled_super_arc.e(2,3)(superpull);  % left half of upper bowl
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl
%
pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360);
bot y7r=-d; rt x8r=hround(w-7u); lft x6r=hround(.5(w-6u)+1.5u);
top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height);
x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7];
filldraw stroke pulled_super_arc.e(5,6)(superpull)
 & pulled_super_arc.e(6,7)(superpull);  % left half of lower bowl
filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl
%
pos13(vair,90); pos14(left_curve,180); pos15(vair,270); 
pos16(right_curve,360);
bot y15r=-d; rt x16r=hround(w-u); lft x14r=hround(.5(w-6u)+1.5u+6u);
top y13r=vround(if monospace: .3 else: .5 fi\\ asc_height);
x13=x15=.5[x14,x16]; y14=y16=.5[y13,y15];
filldraw stroke pulled_super_arc.e(13,14)(superpull)
 & pulled_super_arc.e(14,15)(superpull);  % left half of lower bowl
filldraw stroke super_arc.e(15,16) & super_arc.e(16,13); % right half of lower bowl
%
pickup rule.nib; top y9=h; bot y10=-d;
if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps);
 draw z9--z10;  % diagonal
else: rt x9=hround(w-6u-2.5u); lft x10=hround 2.5u; draw z9--z10;  % diagonal
 pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90);
 pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90);
 path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r;
 filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi  % link
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar;

dcchar "Bullet"; % from mathsy
beginchar(oct"210",9u#,v_center(7u#));
adjust_fit(0,0); pickup rule.nib; autorounded;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h; y2=math_axis; circle_points;
filldraw z8{right}...z1{z2-z8}...z2{down}...z3{z4-z2}...z4{left}
  ...z5{z6-z4}...z6{up}...z7{z8-z6}...cycle;  % circle and interior
labels(1,2,3,4,5,6,7,8); endchar;

dcchar"Centigrade sign";
if serifs: beginchar(oct"211",13u#,cap_height#,0);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(4u#,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(oct"211",11.5u#,cap_height#,0);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(4u#,0);
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
 rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u;
 lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u);
 top y1r=vround .95h+o; top y2r=h+o; y3=.5h;
 bot y4r=-o; bot y5r=vround .08h-o; y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals
penlabels(1,1',2,3,4,5,6);
clearxy;
pickup rule.nib; autorounded;
lft x6=-4u; rt x2=0; top y8=h; y8-y2=x2-x8;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8);
math_fit(-.3cap_height#*slant-.5u#,.5ic#);
endchar;

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

dcchar "Oldstyle cent sign"; % jk, based on cm `c'
beginchar(oct"213",9u#,x_height#+.5desc_depth#,.5desc_depth#);
italcorr x_height#*slant-.2u#;
adjust_fit(0,0);
pickup fine.nib; pos2(vair',90); pos4(vair',270);
x2=x4=.5(w+u); top y2r=vround(x_height+1.5oo); bot y4r=-oo;
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5x_height;
if serifs: pos1(hair,0); pos0(flare,0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,x_height]-.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
pickup crisp.nib; 
x7=x3; x6=w-x7; y6=h; y7=-d;
numeric theta; theta=angle(z7-z6)-90;
pos6(vair,theta); pos7(vair,theta);
filldraw stroke z6e--z7e; % diagonal
penlabels(0,1,2,3,4,5,6,7); endchar;

iff variant_g: % I use this as marker for italic fonts
dcchar "Italic florin sign (italic letter f)"; % from itall (cm)
beginchar(oct"214",max(1.5u#,stem#)+max(3.5u#,2flare#),
  asc_height#,desc_depth#);
italcorr asc_height#*slant+.75u#;
adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib;
numeric theta; z88=(.5w-.5u,h); z89=(.5w+.5u,-d); theta=angle(z88-z89);
pos0(flare,0); pos1(hair,0); pos2(vair,90);
pos3(.5[hair,stem],180); pos4(stem,theta+90);
pos5(stem,theta-90); pos6(.5[hair,stem],0);
pos7(vair,-90); pos8(hair,-180); pos9(flare,-180);
rt x1r=hround(w+.25u); lft x8r=hround-.35u; x2=.6[x1,x4]; x7=.6[x8,x5];
y9-.5flare=vround -.85d; y2-y0=y9-y7; top y2r=h+oo; bot y7r=-d-oo;
y4=.25[x_height,h]; y5=.5[-d,y4];
z4=whatever[z88,z89]; z5=whatever[z88,z89];
x3=.8[x2+x4-x88,x88]; x6=.8[x7+x5-x89,x89]; y3=.8[y4,y2]; y6=.8[y5,y7];
bulb(2,1,0); bulb(7,8,9);  % bulbs
filldraw stroke z2e{left}...z3e...{z89-z88}z4e;  % upper arc
filldraw z4r--z5l--z5r--z4l--cycle;  % stem
filldraw stroke z5e{z89-z88}...z6e...{left}z7e;  % lower arc
pickup crisp.nib; pos20(bar,90); pos21(bar,90);
top y20r=top y21r=x_height;
lft x20=lft x4r-.5stem-u; rt x21=rt x4l+.5stem+1.5u;
filldraw stroke z20e--z21e;  %  crossbar
math_fit(desc_depth#*slant+u#,x_height#*slant);
penlabels(0,1,2,3,4,5,6,7,8,9,20,21,88,89); endchar;


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

dcchar"Colon sign or Cedi sign"; % Panamese or Ghanese currency
if serifs: beginchar(oct"215",13u#,body_height#,body_height#-asc_height#); 
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(cap_hair,0); pos2(cap_band,90);
 pos3(cap_curve,180); pos4(cap_band,270); pos5(hair,360);
 rt x1r=rt x5r=hround(w-u); lft x3r=hround u; x2=x4=.55[x3,x1];
 numeric hh; hh=cap_height;
 top y2r=hh+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6hh,x_height-.5vair),bot y2l-eps);
 y5=max(good.y .95(hh-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=hh+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 crisp.nib; pos12(bar,0); pos11(bar,0);
 lft x12l=lft x11l=hround(x2-.5bar); top y12=h; bot y11=-d;
 filldraw stroke z12e--z11e;  % vertical crossbar
else: beginchar(oct"215",11.5u#,body_height#,body_height#-asc_height#);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
 rt x1r=hround(w-1.1u); x2=x4=.5w+1.25u;
 lft x3r=hround max(u,2u-.5cap_curve); rt x5r=hround(w-.9u);
 numeric hh; hh=cap_height;
 top y1r=vround .95hh+o; top y2r=hh+o; y3=.5hh;
 bot y4r=-o; bot y5r=vround .08hh-o; y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,.8,4); % arc and terminals
 pickup crisp.nib; pos12(bar,0); pos11(bar,0);
 lft x12l=lft x11l=hround(x2-.5bar); top y12=h; bot y11=-d;
 filldraw stroke z12e--z11e;  % vertical crossbar
fi
math_fit(-.3cap_height#*slant-.5u#,.5ic#);
penlabels(1,1',2,3,4,5,6,11,12); endchar;

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

dcchar"Naira sign"; % Nigerian currency
beginchar(oct"217",13u#+width_adj#,cap_height#,0);
italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+
min(.5cap_stem#,u#);
adjust_fit(cap_serif_fit#+.25u#,cap_serif_fit#+.25u#);
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
pickup extra_rule.nib;  
x8=x10=0; x9=x11=w; y10=y11; 
top y8=bar_height; y8=y9; draw z8--z9; 
y10-y8=spread; draw z10--z11; % crossing bars
math_fit(0,max(.5ic#-.5u#,0));
penlabels(1,1',2,3,4,4',5,6,7,8,9,10,11); endchar;

dcchar"Guarani sign"; % Currency of Paraguay
if serifs: beginchar(oct"220",14u#,body_height#,body_height#-asc_height#);
 italcorr cap_height#*slant-1.5u#-.5cap_serif_fit#;
 adjust_fit(0,.5cap_serif_fit#);
 numeric hh; hh=cap_height;
 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=hh+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6hh,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=hh+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
 pickup crisp.nib; pos12(bar,0); pos11(bar,0);
 lft x12l=lft x11l=hround(x2-.5bar); top y12=h; bot y11=-d;
 filldraw stroke z12e--z11e;  % vertical crossbar
 math_fit(-.3cap_height#*slant-.5u#,ic#);
else: beginchar(oct"220",14u#,body_height#,body_height#-asc_height#);
 italcorr cap_height#*slant-.5u#;
 adjust_fit(0,0);
 numeric hh; hh=cap_height;
 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 .93hh+o; top y2r=hh+o; y3=.5hh;
 bot y4r=-o; bot y5r=vround .07hh-o;
 filldraw stroke rterm.e(2,1,right,.9,4)&super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,1,4); % arc and terminals
 pos0(stem,0); pos7(stem,0);
 z7r=z5r; x0=x7; top y0=1+vround .35[bar_height,x_height];
 filldraw stroke z0e--z7e;  % stem
 pos8(cap_bar,90); pos9(cap_bar,90);
 z0r=z9r; y8=y9; lft x8=hround x4;
 filldraw stroke z8e--z9e;  % bar
 pickup crisp.nib; pos12(bar,0); pos11(bar,0);
 lft x12l=lft x11l=hround(x2-.5bar); top y12=h; bot y11=-d;
 filldraw stroke z12e--z11e;  % vertical crossbar
 math_fit(-.3cap_height#*slant-.5u#,.5ic#); fi
penlabels(0,1,1',2,3,4,5,6,7,8,9,11,12); endchar;

dcchar"Peso sign";
beginchar(oct"221",12u#,cap_height#,0);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#+.25u#,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
pickup extra_rule.nib;
x8=0; x9=.5[x1r,x5r]; top y8=bar_height; y8=y9; draw z8--z9;
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7); labels(8,9);
endchar;

dcchar "Lira sign"; % 
compute_spread(.35x_height#,.45x_height#);
beginchar(oct"222",12u#,asc_height#,0);
adjust_fit(0,.75asc_height#*slant-.5u#); pickup fine.nib;
pos0(flare,0); pos1(hair,0); pos2(vair,90); pos3(stem,180);
pos4(stem,180); pos4'(stem,0); pos5(vair,-90); z4'=z4;
x2=2/3w-.5u; rt x3l=rt x4l=hround(.5w-u+.5stem); x5=2.5u;
y1=y3=.75h; top y2=h+oo; y4=.25h; bot y5r=-oo;
rt x1r=hround(w-1.5u); bulb(2,1,0);  % bulb
filldraw stroke pulled_arc.e(2,3)..z4e;  % stem
numeric light_stem; light_stem=2/3[vair,vstem];
pos6(.5[hair,light_stem],-180); pos7(light_stem,-300);
pos8(light_stem,-300); pos9(hair,-180);
lft x6r=hround u; x7=3u; x8=w-3.5u; rt x9l=hround(w-u);
y6=.4[y5,y7]; top y7r=vround .2h; bot y8l=-oo; y9=good.y .2h;
filldraw stroke pulled_arc.e(4',5)...z6e{up}...z7e{right}
 ..{right}z8e...{up}z9e;  % loop and arm
pickup extra_rule.nib;
x10=3u; x11=w-4.5u; x12=3u; x13=w-4.5u;
top y12=bar_height;
y11=y10; y13=y12; y10-y12=spread; 
draw z10--z11;  % upper bar
draw z12--z13;  % lower bar
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;

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

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

iff not variant_g: % not italic
dcchar"Gnaborretni";
beginchar(oct"225",8.5u#,asc_height#-desc_depth#,desc_depth#);
adjust_fit(0,0);
pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
lft x7l=hround(.5w-.25u-.5dot_size); top y8r=h; z7=z8; % dot(7,8);  % dot
numeric top_width;
top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos2(vair,270); pos3(curve,180);
pos4(vair,90); pos5(top_width,180); pos6(top_width,180);
x2=x4=x5=x6=x7; lft x3r=hround u; top y6=.25[bot y8l,h-x_height]-1;
bot y2r=hround .1asc_height-d-oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
{{interim superness:=more_super;
filldraw stroke pulled_super_arc.e(2,3)(superpull)
 & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}};  % arc and stem
if serifs: pos1(hair,0); pos0(flare,0);
 rt x1r=hround(w-u); y1=y3; bulb(2,1,0);  % bulb
else: pos1(Vround 5/7[vair,flare],-70);
 rt x1r=hround(w-u); bot y1r=vround .9[y6,bot y2r];
 filldraw stroke term.e(2,1,right,1,4); fi  % terminal
penlabels(0,1,2,3,4,5,6,7,8);
clearxy;
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
lft x3l=hround(.5w-.5dot_size); top y4r=h; z3=z4; dot(3,4);  % dot
numeric top_width;
top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos1(dot_size,0); pos2(top_width,0);
x1=x2=x3; top y2=.25[bot y4l,h-x_height]-1;
if square_dots: bot y1=-d;
 filldraw stroke z1e--z2e;  % stem
else: bot z0=(x1,-d-o); y1-.5dot_size=-d-o;
 filldraw z1l...z0...z1r---z2r--z2l---cycle; fi  % stem and bulb
penlabels(0,1,2,3,4); endchar;

iff variant_g: % italic
dcchar"Interrobang";
beginchar(oct"224",9u#,asc_height#,0);
italcorr asc_height#*slant-u#;
adjust_fit(0,0);
adjust_fit(0,0); pickup tiny.nib; pos10(dot_size,0); pos11(dot_size,90);
lft x10l=hround(.5w-.5dot_size); bot y11l=0; z10=z11; % dot(10,11);  % dot
pickup fine.nib; pos1(flare,180); pos2(hair,180); pos3(vair,90);
lft x1r=hround u; x3=.5w;
y1-.5flare=x_height; top y3r=hround .9h+o; bulb(3,2,1); % bulb
pos8(vair,-90); x8=.5w; bot y8r=.25[top y11r,x_height]+1;
numeric theta; theta=90+angle(10u,y3-y8); slope:=(y3-y8)/10u;
pos3'(vair,-90); z3'=z3; pos0(vstem,theta); x0=x3; y0=1/3[y8,y3];
rt x4l=hround(w-1.5u); lft x7r=hround 1/3w;
x4l-x4r=x7l-x7r=hround .5[vair,vstem]-fine;
ellipse_set(3'l,4l,5l,0l); ellipse_set(3'r,4r,5r,0r); y4=y4r;
ellipse_set(8l,7l,6l,0l); ellipse_set(8r,7r,6r,0r); y7=y7r;
pos9(hair,0); rt x9r=hround(2/3w+.5hair); y9=good.y .5[y8,y0];
filldraw stroke super_arc.e(3',4) & z4e{down}
 ..z5e---z6e..z7e{down} & super_arc.e(7,8)...{up}z9e;  % main stroke
penlabels(0,1,2,3,4,5,6,7,8,9,10,11);
clearxy;
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
lft x3l=hround(.5w-.5dot_size); bot y4l=0; z3=z4; dot(3,4);  % dot
numeric bot_width;
bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos1(dot_size,0); pos2(bot_width,0);
x1=x2=x3; bot y2=.25[top y4r,x_height]+1;
if square_dots: top y1=h;
 filldraw stroke z1e--z2e;  % stem
else: top z0=(x1,h+o); y1+.5dot_size=h+o;
 filldraw z1r...z0...z1l---z2l--z2r---cycle; fi  % stem and bulb
penlabels(0,1,2,3,4); endchar;

iff variant_g: % italic
dcchar"Gnaborretni";
beginchar(oct"225",9u#,asc_height#-desc_depth#,desc_depth#);
adjust_fit(0,0);
pickup tiny.nib; pos10(dot_size,0); pos11(dot_size,90);
lft x10l=hround(.5w-.5dot_size); top y11r=h; z10=z11; % dot(10,11);  % dot
pickup fine.nib; pos1(flare,0); pos2(hair,0); pos3(vair,-90);
rt x1r=hround(w-u); x3=.5w; y1+.5flare=asc_height-x_height-d;
bot y3r=hround .1asc_height-d-o; bulb(3,2,1); % bulb
pos8(vair,90); x8=.5w; top y8r=.25[bot y11l,y1+.5flare]-1;
numeric theta; theta=angle(10u,y8-y3)-90; slope:=(y8-y3)/10u;
pos3'(vair,90); z3'=z3; pos0(vstem,theta); x0=x3; y0=1/3[y8,y3];
lft x4l=hround 1.5u; rt x7r=hround 2/3w;
x4r-x4l=x7r-x7l=hround .5[vair,vstem]-fine;
ellipse_set(3'l,4l,5l,0l); ellipse_set(3'r,4r,5r,0r); y4=y4r;
ellipse_set(8l,7l,6l,0l); ellipse_set(8r,7r,6r,0r); y7=y7r;
pos9(hair,180); lft x9r=hround(1/3w-.5hair); y9=good.y .5[y8,y0];
filldraw stroke super_arc.e(3',4) & z4e{up}
 ..z5e---z6e..z7e{up} & super_arc.e(7,8)...{down}z9e;  % main stroke
penlabels(0,1,2,3,4,5,6,7,8,9,10,11);
clearxy;
pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
lft x3l=hround(.5w-.5dot_size); top y4r=h; z3=z4; dot(3,4);  % dot
numeric top_width;
top_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
pickup fine.nib; pos1(dot_size,0); pos2(top_width,0);
x1=x2=x3; top y2=.25[bot y4l,h-x_height]-1;
if square_dots: bot y1=-d;
 filldraw stroke z1e--z2e;  % stem
else: bot z0=(x1,-d-o); y1-.5dot_size=-d-o;
 filldraw z1l...z0...z1r---z2r--z2l---cycle; fi  % stem and bulb
penlabels(0,1,2,3,4); endchar;

iff not variant_g: % not italic
dcchar"Dong sign"; % Vietnamese currency
beginchar(oct"226",10u#+serif_fit#,body_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
numeric hh; hh=asc_height;
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=hh;
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 if monospace: -hair fi;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height if monospace: -.5hair fi;
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
%
  pos8(bar,90); pos9(bar,90);
  x8=.5[x4,x5];
  if serifs: x9=x2r+jut; else: x9=w; fi
  if serifs: y8=y9=.5[y.a2-.5slab,y4+.5vair];
  else: y8=y9=.5[x_height,asc_height-serif_drop]; fi
  filldraw stroke z8e--z9e;
currentpicture:=currentpicture shifted (0,body_height-asc_height);
pickup rule.nib;
x10=x5; x11=x9; top y10=0; y10=y11;
draw z10--z11;
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;

iff variant_g: %italic
dcchar"Italic Dong sign"; % Vietnamese currency
beginchar(oct"226",9u#,body_height#,0);
italcorr max(1/3x_height#*slant+.5hair#+.5u#,
  h#*slant+.5stem#-2u#) if math_fitting:-.5u# fi;
adjust_fit(0,0); pickup fine.nib;
pos0(hair,0); pos1(vair,90); pos2(curve,180); pos3(vair,270);
x0=x4; x1=x3=.5[x0,x2]; lft x2r=hround(1.5u-.5curve);
x4+.5stem=hround(w-2.5u+.5stem);
top y1r=x_height+oo; bot y3r=-oo; y0=y2=.5[y1,y3];
filldraw stroke super_arc.e(0,1) & pulled_arc.e(1,2)
 & pulled_arc.e(2,3) & super_arc.e(3,0);  % bowl
x5=x0; x7=w; hook_out(5,6,7);  % closing hook
pickup tiny.nib; pos5'(stem,0); pos4(stem,0);
z5'=z5; top y4=h; filldraw stroke z4e--z5'e;  % stem
sloped_serif.l(4,5',a,1/3,jut,serif_drop);  % serif
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
% the bar
  pos8(bar,90); pos9(bar,90);
  x8=x1; % .5[x1,x4];
  x9=x6;
  y8=y9=.5[y.a2-.5slab,y1+.5vair];
  filldraw stroke z8e--z9e;
currentpicture:=currentpicture shifted (0,body_height-asc_height);
pickup rule.nib;
x10=x2; x11=x9; top y10=0; y10=y11;
draw z10--z11;
penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;

dcchar"Trademark"; % jk, design based on logo font
beginchar(oct"227",12u#,body_height#,0);
italcorr .7body_height#;
adjust_fit(0,0);
numeric ww, hh; ww=.5w; hh=vround .5body_height;
pickup pencircle xscaled hair yscaled vair;
lft x1=-eps; x2=ww-x1; x3=x4=.5ww;
y1=y2=y3; top y1=hh; bot y4=-o;
draw z1--z2; draw z3--z4;
labels(1,2,3,4); 
clearxy;
x1=x2=hround(ww+u); x4=x5=hround(w-u); x3=hround .5[x1,x4];
y1=y5; y2=y4; bot y1=-o;
top y2=hh+o; y3=vround (y1+.5bar_height);
draw z1--z2--z3--z4--z5;
labels(1,2,3,4,5);
currentpicture:=currentpicture shifted (0,hh);
endchar;

dcchar"Per ten thousand sign"; % Yannis, Unicode Computer Modern
beginchar(oct"230",9u#+max(6u#,2fudge*(hair#+stem#)),
  body_height#,body_height#-asc_height#);
italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi;
adjust_fit(0,
 2*(.5*(9u#+max(6u#,2fudge*(hair#+stem#)))
    -2.5u#+5/6[fudged.hair#,fudged.stem#])); 
pickup fine.nib;
numeric left_curve,right_curve;
left_curve=hround 5/6[fudged.hair,fudged.stem];
right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360);
top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u);
bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height);
x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3];
pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360);
bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u);
top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height);
x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7];
filldraw stroke pulled_super_arc.e(5,6)(superpull)
 & pulled_super_arc.e(6,7)(superpull);  % left half of lower bowl
filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl
hihi:=(.5*(9u#+max(6u#,2fudge*(hair#+stem#)))
      -2.5u#+5/6[fudged.hair#,fudged.stem#])
if monospace: *expansion_factor fi *hppp;
picture petit_zero; petit_zero := currentpicture;
pickup rule.nib; top y9=h; bot y10=-d;
if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps);
 draw z9--z10;  % diagonal
else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10;  % diagonal
 pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90);
 pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90);
 path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r;
 filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi  % link
pickup fine.nib;
filldraw stroke pulled_super_arc.e(1,2)(superpull)
 & pulled_super_arc.e(2,3)(superpull);  % left half of upper bowl
filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl
addto currentpicture also (petit_zero shifted (hihi,0));
addto currentpicture also (petit_zero shifted (2hihi,0));
picture petit_zero; % Release resources allocated to the picture variable
penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;

dcchar "Alternate pilcrow sign"; % one vertical bar only
beginchar(oct"231",8.5u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup rule.nib; autorounded;
top y1=h; bot y6=-d-eps; y4=y9=y1;
y3=y5=good.y .5[y1,y6];
lft x2=hround u; y2=.5[y1,y3]; rt x9=hround(w-.5u); x4=x5=x6=good.x(x9-1.5u);
x1=x3=min(.5w,x4);
filldraw z4..z1{left}...z2{down}...{right}z5--cycle;  % filled bowl
draw z9--z4--z6;  % left stem and upper serif
if serifs:
 x11=x9; x10-x6=x4-x9;
 bot y10=-d-eps; y10=y11;
 draw z10--z11; % lower serif
fi
labels(1,2,3,4,5,6,9,10,11); endchar;

dcchar"Baht sign"; % currency of Thailand
beginchar(oct"232",12.5u#,body_height#,body_height#-asc_height#);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,0);
numeric hh; hh=cap_height;
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=hh; 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]=.52hh;
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
pickup crisp.nib; pos13(bar,0); pos14(bar,0);
rt x13r=rt x14r=rt x4; top y13=h; bot y14=-d;
filldraw stroke z13e--z14e;  % vertical crossbar
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;


dcchar "Cent sign"; % from wasychr (wasy)
% Modified height and depth (jk)
beginchar(oct"242",9u#,x_height#+.5desc_depth#,.5desc_depth#);
italcorr x_height#*slant-.2u#;
adjust_fit(0,0);
pickup fine.nib; pos2(vair',90); pos4(vair',270);
x2=x4=.5(w+u); top y2r=vround(x_height+1.5oo); bot y4r=-oo;
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5x_height;
if serifs: pos1(hair,0); pos0(flare,0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,x_height]-.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
pickup crisp.nib; 
x6=x7=x8=x9=x2; y7=y2; y8=y4; bot y9=-d; y6-y7 = y8-y9;
pos6(bar,0); pos7(bar,0);
pos8(bar,0); pos9(bar,0);
filldraw stroke z6e--z7e; % upper bar
filldraw stroke z8e--z9e; % lower bar
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;

dcchar "Sterling sign"; % from italp (cm)
% already contains bug fix found by Yannis Haralambous
beginchar(oct"243",12u#,asc_height#,0);
adjust_fit(0,.75asc_height#*slant-.5u#); pickup fine.nib;
pos0(flare,0); pos1(hair,0); pos2(vair,90); pos3(stem,180);
pos4(stem,180); pos4'(stem,0); pos5(vair,-90); z4'=z4;
x2=2/3w-.5u; rt x3l=rt x4l=hround(.5w-u+.5stem); x5=2.5u;
y1=y3=.75h; top y2=h+oo; y4=.25h; bot y5r=-oo;
rt x1r=hround(w-1.5u); bulb(2,1,0);  % bulb
filldraw stroke pulled_arc.e(2,3)..z4e;  % stem
numeric light_stem; light_stem=2/3[vair,vstem];
pos6(.5[hair,light_stem],-180); pos7(light_stem,-300);
pos8(light_stem,-300); pos9(hair,-180);
lft x6r=hround u; x7=3u; x8=w-3.5u; rt x9l=hround(w-u);
y6=.4[y5,y7]; top y7r=vround .2h; bot y8l=-oo; y9=good.y .2h;
filldraw stroke pulled_arc.e(4',5)...z6e{up}...z7e{right}
 ..{right}z8e...{up}z9e;  % loop and arm
pos10(bar,90); pos11(bar,90); x10=3u; x11=w-4.5u;
top y10r=top y11r=vround(.5h+.5bar); filldraw stroke z10e--z11e;  % bar
penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;

dcchar "Currency sign"; % from rsym (wasy)
beginchar(oct"244",1.13 min(asc_height#,9/7x_height#)+2u#,
 min(asc_height#,9/7x_height#),0);
italcorr x_height#*slant;
adjust_fit(if monospace: u#,u# else: 0,0 fi);
pickup rule.nib; autorounded;
x4 = good.x .5w; x2-x6=y8-y4; y2=good.y .5h; bot y4=-oo;
circle_points;
z9 = 1.30[z5,z1];
z10 = 1.30[z7,z3];
z11 = 1.30[z1,z5];
z12 = 1.30[z3,z7];
draw_circle;
draw z1--z9;
draw z3--z10;
draw z5--z11;
draw z7--z12;
labels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;


dcchar "Yen symbol"; % from asymbols (msam) 
% Change (jk): Use correct pen for horizontal bars
compute_spread(.45x_height#, .55x_height#); 
beginchar(oct"245",13u#,cap_height#,0); %% adapted from "Y" 
italcorr cap_height#*slant+.45u#; 
adjust_fit(cap_serif_fit#,cap_serif_fit#); numeric 
left_stem,right_stem,outer_jut,dy,alpha; 
left_stem=cap_stem-stem_corr; right_stem=min(cap_hair if 
hefty:-2stem_corr fi,left_stem); outer_jut=.75cap_jut; 
x1l=w-x4r=l+letter_fit+outer_jut+.05u; 
x2l=x5l=hround(.5w-.5left_stem); x3r=x5r; y1=y4=h; 
y2=y3=y5=.4h; dy=y1-y2; alpha=((x2l-x1l)++dy)/dy; 
penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0); 
penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0); 
penpos5(left_stem,0); penpos6(left_stem,0); x5=x6; y6=0; 
z0=whatever[z1r,z2r]=whatever[z3l,z4l]; if 
y0>y2+cap_notch_cut: y0:=y2+cap_notch_cut; 
  fill z0+.5right{up}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)--z5r 
--diag_end(5r,6r,1,1,6l,5l)--z5l--diag_end(2l,1l,1,1,1r,2r){z2-z1} 
    ...{down}z0+.5left--cycle; % diagonals and stem 
else: fill z0--diag_end(0,4l,1,1,4r,3r)--z5r 
    --diag_end(5r,6r,1,1,6l,5l)--z5l 
    --diag_end(2l,1l,1,1,1r,0)--cycle; fi % diagonals & 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 
pickup extra_rule.nib;  
x7=x9=x1l; x8=x10=x4r; y9=y10; 
top y7=bar_height; y7=y8; draw z7--z8; 
y9-y7=spread; draw z9--z10; % crossing bars
penlabels(0,1,2,3,4,5,6,1',2',3',4',5',6',7,8,9,10); endchar;  

dcchar "Broken vertical bar"; % jk
beginchar(oct"246",3u#,body_height#,paren_depth#);
italcorr body_height#*slant - u#;
adjust_fit(0,0); pickup rule.nib;
top y1=h; .5[y1,y4]=math_axis;
compute_spread(.45x_height#,.55x_height#); y2-y3=spread;
.5[y2,y3]=math_axis;
x1=x2=x3=x4=good.x .5w;
draw z1--z2; draw z3--z4;
labels(1,2,3,4); endchar;

dcchar "Section sign"; % from mathsy, renovated (jk)
beginchar(oct"247",6.5u#+max(1.5u#,stem#),asc_height#,desc_depth#);
adjust_fit(0,0); pickup fine.nib;
numeric s_slab; s_slab=if serifs:slab else:vround .2[slab,cap_stem] fi;
numeric ess'; ess'=max(fine.breadth,cap_ess);
numeric sstem; sstem=hround .5[s_slab,ess']-fine;
if sstem < fine.breadth: sstem:=fine.breadth; fi
pos2(vair,90); pos3(sstem,180); 
pos4(ess',270); pos4'(vair,270);
pos5'(sstem,0); pos5(sstem,180);
pos6(ess',90); pos6'(vair,90); pos7(sstem,0); 
pos8(vair,-90);
top y2r=h+oo; bot y8r=-d-oo;
y3=.52[y4,y2]; y5=.52[y4,y6]; y7=.52[y6,y8]; y5'=.52[y6,y4];
y2-y4=y4-y6=y6-y8;
bot z4'=bot z4; top z6'=top z6;
lft x3r=hround 1.25u;
x2=x4=x6=x8=.5w; x5=x7=w-x3; x5'=x3;
if serifs:
 pos0(stem,0); pos1(hair,0); pos9(hair,-180); pos10(stem,-180);
 rt x1r=hround(w-1.5u); x9=w-x1; y2-y1=y9-y8=(y2-y8)/8;
 bulb(2,1,0); bulb(8,9,10);  % bulbs
else:
 pos1(.6[slab,flare],-100); pos9(flare,-100); pos2'(vair,-90);
 rt x1l=hround(w-1.3u); lft x9r=hround .8u; z2'=z2;
 top y1l=vround .92asc_height+oo; bot y9r=vround .1asc_height-d-oo;
 filldraw stroke term.e(2',1,right,.9,4);  % upper arc and terminal
 filldraw stroke term.e(8,9,left,.9,4);   % lower arc and terminal
fi
filldraw stroke z2e{left}...z3e{down}...z4e{3(x5-x3),y5-y3}
 ...z5e{down}...{left}z6'e;  % upper stroke
filldraw stroke z4'e{left}...z5'e{down}...z6e{3(x7-x5'),y7-y5'}
 ...z7e{down}...{left}z8e;  % upper stroke
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

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

dcchar"Copyright";
beginchar(oct"251",20u#,body_height#,max(paren_depth#,desc_depth#));
autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); 
clearxy; autorounding:=0;
numeric hh,ll,rr; hh=vround .7cap_height; ll=hround(.5w-6u);
rr=hround(.5w+5u);
if serifs:
 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(rr-u); lft x3r=hround(ll+u); x2=x4=.55[x3,x1];
 top y2r=hh+o; bot y4r=-o; y3=.5[y2,y4];
 bot y1=min(vround max(.6hh,.7x_height-.5vair),bot y2l-eps);
 y5=max(good.y .95(hh-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=hh+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:
 pickup fine.nib; pos1(1.2flare,80); pos2(slab,90);
 pos3(cap_curve,180); pos4(slab,270); pos5(flare,275);
 rt x1r=hround(rr-1.1u); x2=x4=.5w+1.25u;
 lft x3r=ll+hround max(u,2u-.5cap_curve); rt x5r=hround(rr-.9u);
 top y1r=vround .95hh+o; top y2r=hh+o; y3=.5hh;
 bot y4r=-o; bot y5r=vround .08hh-o; y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke rterm.e(2,1,right,.9,4) & super_arc.e(2,3)
  & super_arc.e(3,4) & term.e(4,5,right,.8,4); fi % arc and terminals
penlabels(1,1',2,3,4,5,6); endchar;

dcchar "Logical not sign"; % from sym
beginchar(oct"254",12u#,x_height#,0);
italcorr x_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround u-eps; x2=x3=w-x1;
y1=y2=good.y .5[bar_height,h]; y2-y3=1.2(h-bar_height);
draw z1--z2--z3;  % bar and stem
labels(1,2,3); endchar;

dcchar"Registered";
beginchar(oct"256",20u#,body_height#,max(paren_depth#,desc_depth#));
autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
if .5w <> good.x .5w: change_width; fi
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); 
clearxy; autorounding:=0;
numeric hh,ll,rr; hh=vround .7cap_height; ll=hround(.5w-6u);
rr=hround(.5w+6u);
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
lft x1l=lft x2l=ll+hround max(2u,3u-.5cap_stem'); top y1=hh; 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(.5hh+.5vair); x4=x6;
if serifs: x4=.5w-.5u; x5r=hround(rr-2.25u);
else: x4=.5w+.5u; x5r=hround(rr-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(rr-.25u); y10=1/3[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(rr-.5u); y9=0;
 fill z8l--diag_end(8l,9l,.5,1,9r,8r)--z8r--cycle; fi  % tail
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

dcchar"High bar (Macron)"; % jk
beginchar(oct"257",14u#,min(asc_height#,2x_height#),0);
adjust_fit(0,0); pickup rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; top y1=top y2=h;
draw z1--z2;  % bar
labels(1,2); endchar;

dcchar "Plus-or-minus sign"; % from sym
beginarithchar(oct"261"); pickup rule.nib;
numeric shiftup; shiftup=vround 1.5u;
x1=x2=.5w; lft x3=lft x5=hround u-eps; x4=x6=w-x3;
.5[y1,y2]=y3=y4=math_axis+shiftup; top y1=h+shiftup; y5=y6=y2;
draw z1--z2;  % stem
draw z3--z4;  % plus bar
draw z5--z6;  % minus bar
labels(1,2,3,4,5,6); endchar;

dcchar"Degree sign"; % Yannis, Unicode Computer Modern
beginchar(oct"260",4u#,cap_height#,0);
adjust_fit(if monospace: 1.5u#,1.5u# else: u#,u# fi); 
pickup rule.nib; autorounded;
if .5w <> good.x .5w: change_width; fi
lft x6=0; x2=w-x6; top y8=h; y8-y2=x2-x8;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); endchar;

dcchar"Tick mark"; %from accent (cmfonts, acute accent)
beginchar(oct"264",9u#,min(asc_height#,2x_height#),0);
italcorr h#*slant-if serifs: 1.5 fi u#;
adjust_fit(0,0);
if serifs: pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1];
 y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 filldraw circ_stroke z1e--z2e;  % diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 rt x1r=hround(w-1.5u); lft x2l=hround(.5w-.25u-.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e; fi  % diagonal
penlabels(1,2); endchar;

iff not variant_g:
dcchar"Micro sign"; % jk, based on cm `u'
beginchar(oct"265",10u#,x_height#,desc_depth#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi;
if light_vair<fine.breadth: light_vair:=fine.breadth; fi
pickup tiny.nib; pos1(stem,0); pos2(stem,0); pos7(stem,0);
pos3(stem,0); pos4(stem',0);
lft x1l=hround(2.5u-.5stem); x1=x2=x7; 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'; bot y7=-d;
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--z7e;  % 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));  % lower right serif
 pickup crisp.nib;
 dish_serif(7,1,d,1/3,jut,e,1/3,jut); fi  % lower left serif
penlabels(1,2,3,4,5,7); labels(6); endchar;

iff variant_g: % This triggers italics
dcchar "Micro sign"; % from greekl (cm)
beginchar(oct"265",9u#,x_height#,desc_depth#);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); pickup fine.nib; interim superness:=more_super;
pos1(stem,-180); pos2(stem,-180); x1=x2=x3; lft x1r=hround(1.5u-.5stem);
y1+.5stem=h+oo; y2-.5stem=-d-o;
filldraw z1r---z2r..z2l---z1l..cycle;  % left stem
pos3(stem,-180); pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5];
pos6(stem,0); rt x6r=hround(w-2.5u+.5stem);
x5=x6=x7; x9=w; hook_out(7,8,9);  % closing hook
y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h;
filldraw stroke super_arc.e(3,4)...{up}z5e; % left stem and arc
filldraw circ_stroke z6e--z7e;  % right stem
math_fit(desc_depth#*slant+.5stem#-u#,ic#);
penlabels(1,2,3,4,5,6,7,8,9); endchar;

dcchar "Paragraph mark"; % from mathsy
beginchar(oct"266",11u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup rule.nib; autorounded;
top y1=h; bot y6=-d-eps; y4=y7=y9=y1;
y8=y6; y3=y5=good.y .5[y1,y6];
x7-x4=ceiling(rule_thickness+1.25u);
lft x2=hround u; y2=.5[y1,y3]; x4=x5=x6; rt x9=hround(w-.5u);
x7=x8=good.x(x9-1.5u); x1=x3=min(.5w,x4);
filldraw z4..z1{left}...z2{down}...{right}z5--cycle;  % filled bowl
draw z9--z4--z6;  % left stem and upper serif
draw z7--z8;  % right stem
if serifs:
 x11=x9; x10-x8=x4-x9;
 bot y10=-d-eps; y10=y11;
 draw z10--z11; % lower serif
fi
labels(1,2,3,4,5,6,7,8,9,10,11); endchar;

dcchar "Period raised to axis height"; % from sym
beginchar(oct"267",5u#,v_center(7u#));
adjust_fit(0,0); pickup fine.nib;
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
pos1(dot_diam,0); pos2(dot_diam,90);
lft x1l=hround(.5w-.5dot_diam); y1+.5dot_diam=vround(math_axis+.5dot_diam);
z1=z2; dot(1,2);  % dot
penlabels(1,2); endchar;

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

dcchar "Elementary division operator"; % from mathsy
beginarithchar(oct"366"); pickup fine.nib; pickup rule.nib;
numeric del; del=dot_size-currentbreadth;
x3-.5del=good.x(.5w-.5del); center_on(x3);
y3+.5del=good.y(math_axis+math_spread[.5x_height,.6x_height]+.5del);
lft x1=hround u-eps; x2=w-x1; y1=y2=math_axis;
draw z1--z2;  % bar
pos3(dot_size,0); pos4(dot_size,90); z3=z4;
pos5(dot_size,0); pos6(dot_size,90); z5=z6; x5=x3; .5[y3,y5]=math_axis;
dot(3,4); dot(5,6);  % dots
penlabels(1,2,3,4,5,6); endchar;


endinput;

% <-- circled R is problematic...

%% include these parameters to shrink R so it fits inside a circle 
%           


begingroup 

save u, width_adj, cap_serif_fit, letter_fit, 
 body_height, cap_height, x_height, bar_height, comma_depth, 
 flare, cap_hair, stem, cap_stem, cap_curve, cap_ess, 
 cap_jut, beak_jut, beak, slab, cap_bar, cap_band, cap_notch_cut, 
 o, apex_o;  
numeric radius;
old.u:=u; old.cap_curve:=cap_curve; old.cap_height:=cap_height; 
old.u#:=u#; old.cap_curve#:=cap_curve#; old.cap_height#:=cap_height#; 
forsuffixes $=u, width_adj, cap_serif_fit, letter_fit, 
 body_height, cap_height, x_height, bar_height, 
comma_depth, flare, cap_hair, 
stem, cap_stem, cap_curve, cap_ess, 
 cap_jut, beak_jut, beak, 
slab, cap_bar, 
cap_band, cap_notch_cut, 
 o, apex_o:  $.#:=lower.$.#; endfor 
fudge:=lower.fudge;   
font_setup; 
% Changed by Stefan Lindner 15.03.1991         -sl
% original: radius=.5(6u++cap_height)+3u; radius=radius#*hppp;
radius#=.5(6u#++cap_height#)+3u#; radius:=radius#*hppp;
% end of change

dcchar "Circle-R brand";  % from asymbols (msam) 
beginchar(oct"256",13u#, .52cap_height#+radius#,radius#-.52cap_height#); 
adjust_fit(4u#,4u#); 
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0); 
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem');  
top y1=cap_height; bot y2=0; 
filldraw stroke z1e--z2e; % stem 
penpos3(cap_band,90); penpos4(cap_band,90); 
penpos5(cap_curve,0); 
penpos6(vair,-90); penpos7(vair,-90); 
z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7; 
x7=x2; y7l=vround(.5cap_height+.5vair); x4=x6; 
x4=.5w-.5u; x5r=hround(w-2.25u); 
x4l:=x6l:=x4-.125cap_curve; 
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e;  % lobe 
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 
math_fit(0,.75ic#);   
pickup rule.nib; 
z100=(hround w/2,.52cap_height); z101=z100+(0,radius); z103=z100-(0,radius); 
z102=z100+(radius,0); z104=z100-(radius,0); 
draw z101...z102...z103...z104...cycle;
penlabels(0,1,2,3,4,5,6,7,8,9,10,100,101,102,103,104);  
endchar; 

endgroup;

cmchar "Circle for copyright, etc.";
beginchar(oct"015",18u#,asc_height#,desc_depth#); autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
labels(1,2,3,4,5,6,7,8); endchar;

endinput;