summaryrefslogtreecommitdiff
path: root/fonts/phonetic/phoitchar.mf
blob: c77359f91f099b279f6aebf67a6af2946108f891 (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

% the italic characters that correspond to those in phochar.
% created by Emma Pease.  In most cases these are modified forms of
% standard computer modern characters

cmchar "Italic letter rotated a";
beginchar("A",9u#,x_height#,0);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); pickup fine.nib;
pos0(hair,0); pos1(vair,90); pos2(curve,180); pos3(vair,270);
pos4(stem,0); x4=x0; y4+.5stem=vround .98h;
x1=x3=.5[x0,x2]; lft x2r=hround(1.5u-.5curve);
rt x4r=hround(w-2.5u+.5stem);
top y1r=h+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=x4; x7=w; hook_out(5,6,7);  % closing hook
filldraw circ_stroke z4e--z5e;  % stem
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
currentpicture:=currentpicture rotatedaround ((.5(w+slant*h),.5h),180);
penlabels(0,1,2,3,4,5,6,7); endchar;

cmchar "Italic letter rotated c";
beginchar("c",8u#,x_height#,0);
italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi;
adjust_fit(0,0); pickup fine.nib;
pos0(flare,180); pos1(hair,180); pos2(vair,90);
pos3(curve,0); pos4(vair,270); pos5(hair,220);
x2=x4=.5(w-u); lft x1r=min(lft x2,hround(u))-eps;
rt x3r=w-hround(1.5u-.5curve); x5r=good.x(eps); x6=x5;
y1=.5[bar_height,h]; top y2r=h+oo; bulb(2,1,0);  % bulb
bot y4r=-oo; y3=.5[y2,y4]; top y5l=vround .5bar_height; y6=bar_height;
path p; p=z4{left}..z5..z6;
filldraw stroke pulled_arc.e(2,3)
 & pulled_arc.e(3,4)...{direction 1 of p}z5e;  % arc
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
penlabels(0,1,2,3,4,5,6); endchar;



% need an eth (d)
cmchar "The letter eth";
beginchar("d",9u#,asc_height#,0);
italcorr .7x_height#*slant;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
penpos1(vair,90); penpos3(vair',-90);
penpos2(curve,180); penpos4(curve,0);
x2r=hround max(.5u,1.25u-.5curve);
x4r=w-x2r; x1=x3=.5w; y1r=x_height;  % +vround 1.5oo; 
y3r=-oo;
y2=y4=.5x_height-vair_corr; y2l:=y4l:=.52x_height;
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
penpos5(hair/(sind 45),45); penpos4'(stem,0);
x4r=x4'r; y4=y4';
top y5r=h+oo; x5=x2;
penstroke pulled_arc.e(4',5);
penpos6(bar+stem_corr,120); penpos7(bar+stem_corr,120);
y6=.35[y1,y5]; y7r=h+oo;
x7r=rt x4; x6l=rt x2l;
filldraw stroke z6e--z7e;
penlabels(1,2,3,4,5,6,7); endchar;

cmchar "Italic letter schwa";
beginchar("e",8u#,x_height#,0);
italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#);
adjust_fit(0,0); pickup fine.nib;
numeric heavy_hair; heavy_hair=hround .2[hair,stem];
pos0(vair,90); pos1(heavy_hair,180); pos2(vair,-90);
pos3(curve,0); pos4(vair,90); pos5(hair,140);
x0=lft x3l; lft x1r=hround(1.5u-.5heavy_hair); x2=x4=.5(w-u);
rt x3r=hround(w-1.5u+.5curve); x5r=good.x(eps); x6=x5;
y0=y3=y6=h-bar_height; y1=.5[y0,y2]; bot y2r=-oo; top y4r=h+oo;
bot y5l=vround(h-.5bar_height); path p; p=z4{left}..z5..z6;
filldraw stroke z0e{left}...z1e{down}...pulled_arc.e(2,3)
 & pulled_arc.e(3,4)...{direction 1 of p}z5e;  % arc
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
penlabels(0,1,2,3,4,5,6); endchar;

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

cmchar "Italic letter rotated g";
beginchar("g",8u#,x_height#+desc_depth#,0);
h:=vround(x_height#*hppp); d:=vround(desc_depth#*hppp); % vertical adj.
italcorr x_height#*slant+.5stem#-u#;
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-1.5u+.5stem);
top y1r=h+oo; bot y3r=0; 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
pos4(stem,0); y4+.5stem=vround .98h;
pos5(stem,0); x5=x4; y5=-1/3d;
pos6(vair,-90); pos7(hair,-180); pos8(flare,-180);
bot y6r=-d-oo; y8-.5flare=vround -.9d;
lft x8r=hround(2u-.5flare); x6=x1; bulb(6,7,8);  % bulb
filldraw circ_stroke z4e---z5e...{left}z6e;  % stem and arc
math_fit(-min(.3x_height#*slant+.5curve#-u#,1.5u#-desc_depth#*slant),
 ic#-1/3x_height#*slant); 
  currentpicture:=currentpicture rotatedaround ((.5(w+slant*h),.5h),180);
penlabels(0,1,2,3,4,5,6,7,8); endchar;

cmchar "letter variant i";
beginchar("i",4u#,x_height#,0); l_width#:=4u#;
italcorr max(1/3x_height#*slant+.5hair#+.5u#,
 x_height#*slant+.5stem#-2u#) if math_fitting:+.5u# fi;
adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib;
x2-.5stem=hround(1.5u-.5stem); x4=w; hook_out(2,3,4);  % closing hook
pickup tiny.nib; pos1(stem,0); pos2'(stem,0); z2'=z2;
top y1=h; x1=x2; filldraw stroke z1e--z2e;  % stem
sloped_serif.l(1,2,a,1/3,jut,serif_drop);  % serif
math_fit(-.5u#,1/3x_height#*slant+.5hair#+u#); penlabels(1,2,3,4); endchar;

cmchar "Dotless letter j barred";
beginchar("j",5.5u#,x_height#,desc_depth#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+2stem_shift# if monospace:+.5u# fi,
 serif_fit#-2stem_shift# if monospace:-.5u# fi);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
rt x1r=hround(.5w+.25u+.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d;
filldraw stroke z1e--z2e;  % stem
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);
 x3r=x1r; top y4r=min(2x_height,h+1);
 (x,y7l)=whatever[z7r,(x1,min(h,asc_height))]; 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)
  & term.e(6,7,left,1,4); fi  % arc and terminal
pickup crisp.nib; bot y3r=bot y4r=0; 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,5,6,7); endchar;

cmchar "Italic letter m";
beginchar("m",15u#,x_height#,0);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(if monospace:-1.5u#,-2u# else: 0,0 fi); pickup fine.nib;
numeric shaved_stem; shaved_stem=mfudged.stem;
save stem; stem=shaved_stem;
pos2(stem,0); x1=x2;
if monospace: pos1(stem,0); lft x1l=hround(2.5u-.5stem); top y1=h;
else: x0=0; lft x2l=hround(2.5u-.5stem);
 hook_in(0,a,1); fi  % opening hook
y2-.5stem=-oo; filldraw circ_stroke z2e--z1e;  % left stem
x4+.5stem=hround(.5w+.5stem); ital_arch(2,3,4);  % left arch
pos5(stem,0); y5=y2; x5=x4;
filldraw circ_stroke z5e--z4e;  % middle stem
x7+.5stem=hround(w-2.5u+.5stem);
x8=x7-.25u; ital_arch(5,6,7);  % right arch
if monospace: pos9(vair,90); x9=good.x .5[x8,w]; bot y9l=0; y8=1/3h;
 pos8(stem,0); filldraw stroke z8e{-u,-x_height}...{right}z9e; % terminal
else: x9=w; hook_out(8,b,9)(skewed); fi  % closing hook
filldraw stroke z7e{down}..{-u,-x_height}z8e;  % right stem
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#);
  currentpicture:=currentpicture rotatedaround ((.5(w+h*slant),.5h),180);
penlabels(0,a,1,2,3,4,5,6,7,8,9); endchar;

% letter italic engma


cmchar "Italic letter thorn";
beginchar("p",8u#,asc_height#,desc_depth#);
italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi;
adjust_fit(0,0); pickup tiny.nib;
pos1(stem,0); pos2(stem,0); pos6(stem,0);x1=x2=x6;
lft x1l=hround(1.5u-.5stem); top y1=h; y2=.5x_height;bot y6=-d;
filldraw stroke z1e--z6e;  % stem
sloped_serif.l(1,2,a,1/3,jut,serif_drop);  % top serif
dish_serif(6,2,b,1/3,.75jut,c,1/3,jut);  % bottom 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#);
penlabels(0,1,2,3,4,5,6); endchar;

cmchar "Italic letter rotated r";
beginchar("r",5.5u#+max(1.75u#,flare#),x_height#,0);
italcorr x_height#*slant;
adjust_fit(if monospace:.25u#,.5u# else: 0,0 fi); pickup fine.nib;
x0=0; x2=x3; pos3(stem,0); lft x3l=hround(2.5u-.5stem); y3-.5stem=-oo;
hook_in(0,1,2);  % opening hook
filldraw circ_stroke z3e--z2e;  % left stem
pos3'(hair,180); z3'=z3; pos4(vair,90); pos5(hair,0); pos6(flare,0);
x4=w-.5u-max(1.75u,flare); rt x5r=hround(r-.5u); top y4r=h+oo;
filldraw stroke z3'e{up}...z4e{right};  % link
y6+.5flare=vround(bot y4l-.03x_height); bulb(4,5,6);  % bulb
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#-.5u#);
  currentpicture:=currentpicture rotatedaround ((.5(w+h*slant),.5h),180);
penlabels(0,1,2,3,4,5,6); endchar;

% the letter esh

cmchar "Italic letter rotated h";
beginchar("u",9.5u#,x_height#,desc_depth#);
italcorr .7x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); pickup fine.nib; interim superness:=more_super;
x0=0; x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem);
hook_in(0,1,2)(skewed);  % opening hook
pos2'(stem,-180); z2'=z2;
pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5];
pos7(stem,0);pos6(stem,0); rt x6r=hround(w-2.5u+.5stem);
x5=x6=x7; bot y7=-d; 
y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h;
filldraw stroke z2'e{-u,-x_height}
 ...super_arc.e(3,4)...{up}z5e; % left stem and arc
filldraw circ_stroke z6e--z7e;  % right stem
dish_serif(7,6,a,1/3,jut,b,1/3,jut);  % serif
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#);
penlabels(0,1,2,3,4,5,6,7); endchar;

% the letter yogh

cmchar "Italic letter y";
beginchar("y",8.5u#,x_height#+desc_depth#,0);
h:=vround(x_height#*hppp); d:=vround(desc_depth#*hppp); %adj. vertical
italcorr x_height#*slant+.5stem#-u#;
adjust_fit(0,0); pickup fine.nib; interim superness:=more_super;
x0=0; x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem);
hook_in(0,1,2)(skewed);  % opening hook
pos2'(stem,-180); z2'=z2;
pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5];
pos6(stem,0); rt x6r=hround(w-1.5u+.5stem);
pos7(stem,0); pos8(vair,-90);
y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; y6+.5stem=h;
y7=0; bot y8r=-d-oo; x5=x6=x7; x8=.5w;
pos9(hair,-180); pos10(flare,-180); y9=-.5d;
lft x9r=hround(2.75u-.5flare); bulb(8,9,10);  % bulb
filldraw stroke z2'e{-u,-x_height}
 ...super_arc.e(3,4)...{up}z5e; % left stem and arc
filldraw circ_stroke z6e---z7e...{left}z8e;  % right stem and link
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#-1/3x_height#*slant);
  currentpicture:=currentpicture rotatedaround ((.5(w+h*slant),.5h),180);
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;


cmchar "The letter variant u";
beginchar(oct"012",10u#,x_height#,0);
italcorr .75x_height#*slant-.5u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(vair,90); pos2(curve,180);
pos3(vair,180); pos4(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,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+.3beak)+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#); 
  currentpicture:=currentpicture rotatedaround ((.5(w+h*slant),.5h),180);
penlabels(1,2,3,4,5,6,7,8,9); endchar;

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

cmchar "Glottal stop";
beginchar("?",8.5u#,asc_height#,0);
italcorr .8asc_height#*slant;
adjust_fit(0,0);
pickup tiny.nib; pos7(stem',0); bot y7=0; x7=.47w;
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(stem',0); pos6(stem',0);
x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.5[top y7r,x_height];
top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
{{interim superness:=more_super;
filldraw stroke pulled_super_arc.e(2,3)(superpull)
 & subpath (0,1) of super_arc.e(3,4) .. z5e---z7e\\}};  % arc and stem
if serifs: pos1(hair,180); pos0(flare,180);
 lft x1r=hround u; y1=y3; bulb(2,1,0);  % bulb
 dish_serif(7,5,e,1/3,jut,f,1/3,jut); %serif
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); endchar;

cmchar "Italic letter df";
beginchar("D",9.5u#,asc_height#,0);
italcorr .9[x_height#,asc_height#]*slant+.5u# 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-.5u);
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-.5u; hook_out(5,6,7);  % closing hook
pickup tiny.nib; pos5'(stem,0); pos4(stem,0); pos4'(stem,180);
z5'=z5; y4=.25[x_height,h]; filldraw stroke z4e--z5'e;  % stem
z4=z4'; pickup fine.nib;
pos11(.5[hair,stem],180);
pos8(vair,90);pos9(hair,0);pos10(flare,0);
top y8r=h+oo;y10+.5flare=vround .9[x_height,h];
rt x9r=hround(w+.25u); x8=.6[x9,x4']; x11r=x4'; y11=.8[y4',y8];
bulb(8,9,10);
filldraw stroke z8e{left}...z11e...{down}z4'e;
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
penlabels(0,1,2,3,4',5,6,7,8,9,10,11); endchar;


cmchar "Italic letter emgma";
beginchar("M",14u#,x_height#,desc_depth#);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(if monospace:-1.5u#,-2u# else: 0,0 fi); pickup fine.nib;
numeric shaved_stem; shaved_stem=mfudged.stem;
save stem; stem=shaved_stem;
pos2(stem,0); x1=x2;
if monospace: pos1(stem,0); lft x1l=hround(2.5u-.5stem); top y1=h;
else: x0=0; lft x2l=hround(2.5u-.5stem);
 hook_in(0,a,1); fi  % opening hook
y2-.5stem=-oo; filldraw circ_stroke z2e--z1e;  % left stem
x4+.5stem=hround(.5w+.5stem); ital_arch(2,3,4);  % left arch
pos5(stem,0); y5=y2; x5=x4;
filldraw circ_stroke z5e--z4e;  % middle stem
lft x7l=hround(w-1.5u-.5stem);
x8=x7; ital_arch(5,6,7);  % right arch
pos8(stem,0);bot y8=-1/3d;
pos9(vair,-90);pos10(hair,-180);pos11(flare,-180);
bot y9r=-d-oo; y11-.5flare=-vround.9d;
x9=w-3.5u; lft x10r=min(hround-.5u,lft x10r+x9-x10l-eps)+9u;
filldraw stroke z7e---z8e...{left}z9e;  % right stem and arc
bulb(9,10,11);
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#);
penlabels(0,a,1,2,3,4,5,6,7,8,9,10,11); endchar;


cmchar "Italic letter engma";
beginchar("n",9u#,x_height#,desc_depth#);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); pickup fine.nib;
x0=0; x1=x2; pos2(stem,0); lft x2l=hround(2.5u-.5stem); y2-.5stem=-oo;
hook_in(0,a,1);  % opening hook
filldraw circ_stroke z2e--z1e;  % left stem
lft x4l=hround(w-1.5u-.5stem); x5=x4; ital_arch(2,3,4);  % arch
pos5(stem,0);bot y5=-1/3d;
pos6(vair,-90);pos7(hair,-180);pos8(flare,-180);
bot y6r=-d-oo; y8-.5flare=-vround.9d;
x6=w-3.5u; lft x7r=min(hround-.5u,lft x7r+x6-x7l-eps)+4u;
filldraw stroke z4e---z5e...{left}z6e;  % right stem and arc
bulb(6,7,8);
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#);
penlabels(0,a,1,2,3,4,5,6,7,8); endchar;

% the following characters were borrowed without adjustment from the
% regular character set.

cmchar "The letter flap";
numeric r_flare#; r_flare#=.75[if serifs: stem# else: vair# fi,flare#];
define_whole_blacker_pixels(r_flare);
beginchar("f",if serifs:max(7u#,5.5u#+r_flare#) else:6.5u# fi,x_height#,0);
italcorr x_height#*slant if not serifs: +.25u# fi;
adjust_fit(serif_fit#,0);
pickup fine.nib; top y4r=h+oo;
if serifs: pos4(vair,90); pos5(hair,0);
 x4=w-max(1.75u,.25u+r_flare);
 rt x5r=hround(w-.5u+.5); y5+.5r_flare=.9[bar_height,h]+oo;
 pos6(r_flare,0); bulb(4,5,6);  % bulb
else: pos4(r_flare,90); rt x4=hround(w-.25u); fi
pos0'(hround(stem-3stem_corr),180); 
rt x0'l=hround(2.5u-.5stem')+stem'; top y0'=bar_height;
filldraw stroke z0'e{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'; x1l=x0l=x2l;
lft x1l=hround(2.5u-.5stem'); bot y2=0;
filldraw stroke z0e--z2e;  % stem
if serifs: dish_serif(2,0,b,1/3,jut,c,1/3,1.25jut); fi  % lower serif
penlabels(1,2,0',4,5,6); endchar;

cmchar "The letter voiced h";
beginchar("h",10u#,asc_height#,0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
pos1'(stem',0); pos2'(stem',0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=.25[x_height,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: pickup tiny.nib;
 pos9(vair,-270); pos9'(vair,-90);z9=z9';x9=.5[x1,x10]; top y9r=h;
 pos10(hair,-360); 
 rt x10r=min(w- hround u,rt x3r); 
 y10=.75[x_height,h]-.5flare;
 pos11(flare,-360); %z11l=z10l;
 bulb(9,10,11); filldraw stroke super_arc.e(1,9');  % tail
else: pickup fine.nib; pos1'(stem,0); z1'=z1;
 z1''r=z1'r; z1''=z1'; z1''l=(x1'l,0);
 pos9(vair,-270); x9=4.5u; top y9r=h;
 pos10(.5[vair,flare],90); rt x10=hround 1.25u;
 y10r=good.y 5/6[x_height,h]; y10l:=good.y y10l;
 filldraw stroke z1'e..z1''e&super_arc.e(1'',9)
  & term.e(9,10,left,.9,4); fi  % tail
if serifs: 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,9,10,11); endchar;

cmchar "The letter hook k";
beginchar("k",9.5u#,asc_height#,0);
italcorr x_height#*slant-.2u#;
adjust_fit(serif_fit#,serif_fit#); pickup tiny.nib;
numeric right_jut,stem[],alpha[];
stem1=max(tiny.breadth,hround(fudged.stem-stem_corr));
stem2=max(tiny.breadth,hround(fudged.stem-2stem_corr));
stem3=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi));
stem4=max(tiny.breadth,hround(fudged.stem-3stem_corr));
if serifs: right_jut=.6jut; else: right_jut=.4tiny; fi
pos1(stem1,0); pos2(stem2,0); top y1=.25[x_height,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
 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); % upperDiagonal serif
 dish_serif(6,5,f,1/2,inner_jut,g,1/3,right_jut)(dark);fi % lowerDiagonal serif
if serifs: pickup tiny.nib;
 pos7(vair,-270); pos7'(vair,-90);z7=z7';x7=.5[x1,x8]; top y7r=h;
 pos8(hair,-360); rt x8r=rt x3r; y8=.75[x_height,h]-.5flare;
 pos9(flare,-360); 
 bulb(7,8,9); filldraw stroke super_arc.e(1,7');  % hook
else: pickup fine.nib; pos1'(stem,0); z1'=z1;
 z1''r=z1'r; z1''=z1'; z1''l=(x1'l,0);
 pos7(vair,-90); x7=4.5u; top y7l=h;
 pos8(.5[vair,flare],90); rt x8=hround 1.25u;
 y8r=good.y 5/6[x_height,h]; y8l:=good.y y8l;
 filldraw stroke z1'e..z1''e&super_arc.e(1'',7)
  & term.e(7,8,left,.9,4); fi  % tail
penlabels(0,1,2,3,4,5,6,7,8,9,11); endchar;

cmchar "The letter esh";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("s",5.5u#,asc_height#,desc_depth#);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+2stem_shift# if monospace:+\\.5u# fi,
 serif_fit#-2stem_shift# if monospace:-.5u# fi);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pickup tiny.nib; pos0(stem',0); pos1(shaved_stem,0);
x0=x1;
x1=.5w;
top y0=x_height if serifs: +min(oo,serif_drop) fi; 
bot y1=-1/3d;
pickup fine.nib; numeric bulb_diam;
if serifs: 
 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
 x5=.5[x1,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,z1l]; x5r:=max(x,.5[x6r,x5]);
 filldraw stroke z1e{down}...z5e{left};  bulb(5,6,7); % lower arc and bulb
 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: pickup fine.nib; pos1'(stem',0); z1'=z1;
 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=z1'r; (x1'l,y5l)=whatever[z7l,z5r]; x5l=x1'l; y5=y5r;
 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
 filldraw stroke z1'e..{down}z5e & super_arc.e(5,6)
  & z6e{left}..z7e;   % arc and terminal
 pos2(5/7[vair,flare],90); top y2r=h;
 rt x2=hround(if monospace:w-.5u else:w+.75u fi); fi
pickup tiny.nib; 
penpos3(x1r-x1l,0); x3l=x1l; top y3=x_height;
filldraw stroke z1e--z3e;  % stem
pickup fine.nib; pos3'(x1r-x1l-(hround stem_corr)+tiny,180);
y3'=y3; lft x3'r=tiny.lft x1l;
penpos4(x3'l-x3'r,180); x4=x3'; y4+.5vair=.5[x_height,h];
pos8(vair,90); top y8r=h+oo;
if serifs: x8=.5[x4,x2r]; (xa,y8r)=whatever[z8l,z4l];
  x8r:=min(xa,.5[x8,x2r]); pos9(hair,0); bulb(8,9,2);  % bulb
  filldraw stroke z3'e--z4e & super_arc.e(4,8);  % arc
else: x8=.6[x4,x2]; y4l:=1/3[y4l,y8l];
  filldraw stroke z3'e--z4e & super_arc.e(4,8)
   & term.e(8,2,right,.9,4); fi  % arc and terminal
penlabels(1,2,3,4,5,6,7,8); endchar;

cmchar "The letter yogh";
beginchar("x",8u#,x_height#,desc_depth#);
italcorr x_height#*slant-.5serif_fit#-.3u#;
adjust_fit(0,.5serif_fit#);
numeric arm_thickness[],z_stem,stem[];
stem1=fudged.stem-4stem_corr;
if hefty: arm_thickness1=stem1; arm_thickness2=stem1;
 z_stem=fudged.hair;
else: arm_thickness1=stem1; arm_thickness2=stem1; z_stem=fudged.hair; fi
if arm_thickness1<tiny.breadth: arm_thickness1:=tiny.breadth; fi
pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u); 
lft x3l=lft x4l=hround .3[.5u, w-.8u]; 
top y1=h; y2=min(y1,h-2/3arm_thickness1);
bot y4=.3[0,h]; 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
pickup fine.nib; pos11(vair,-90);
pos12(vair,180); x12r=x3r; %.5[1.5u,x7];
x8=x13=hround .5[.5u, w-.8u];
pos7(curve,0); rt x7r=hround(w-.75u); 
lft x11=lft x4; %min(hround 3u,lft x12)-eps;
pos8(vair,-90); bot y8r=-d; pos13(vair, 90); y13=.1[y3,y5];
y7=.5[bot y13l,top y8l];
top y11l=top y4l; %vround(0+.5vair); 
y3=y12;
filldraw stroke pulled_arc.e(12,13); %link
filldraw stroke pulled_arc.e(13,7)
 & pulled_arc.e(7,8);  % bowl
if serifs: numeric bulb_diam[];
 bulb_diam2=flare+cap_stem-stem;
 pos10(bulb_diam2,-180); pos9(cap_hair,-180);
 lft x10r=hround .75u; y10=-.3d; %max(.1h+.5bulb_diam2,.3h-.5bulb_diam2);
 bulb(8,9,10);  % lower bulb
else:  pos9(bot_thickness,angle(-2u,-h));
 lft x9r=hround .75u; top y9l=vround -.3d;
 y9r:=good.y y9r-eps; x9l:=good.x x9l;
 filldraw stroke term.e(8,9,left,1,4); fi  % lower terminal
penlabels(1,2,3,4,5,6,7,8,9,10,12,13); endchar;

cmchar "The letter dj";
beginchar("J",10.5u#,asc_height#,desc_depth#);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
 rt x1r=hround(w-3u+.5stem'+serif_fit); 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-.5u)-.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
 pickup tiny.nib; pos2'(stem',-180); z2'=z2;
 pos8(vair,-90); pos9(hair,0); pos10(flare,0);
 x8=.5[x2',x9r]; bot y8r=-d-oo; y9-.5flare=-.88d;
 if monospace: rt x9r = w else: z9r=z10r; lft x10l= w-floor .75u fi;
 (xc,y8r)=whatever[z8l,z2'l]; x8r:=min(xc,.5[x9r,x8]);
 filldraw stroke z2'e{down}...z8e{right}; bulb(8,9,10); % arc and bulb
else: pickup fine.nib; pos2'(stem',180); z2'=z2;
 pos9(.2[vair,stem'],-90); pos10(vair,-90);
 rt x10r=w-(hround.75u); bot y10r=vround 5/6(-d-oo);
 (x,y10l)=whatever[z10r,z2]; x7l:=x;
 z8l=z2'l; (x2'r,y8r)=whatever[z10r,z8l]; x8r=x2'r;y8=y8l;
 x9r=.5[x10l,x8l]; x9l:=.5[x10l,x8l]; bot y9r=-d-oo;
 filldraw stroke z2'e..{down}z5e & super_arc.e(8,9)
  & z9e{right}..z10e; fi % arc and terminal
penlabels(0,1,2',3,4,5,6,7,8,9,10); endchar;


cmchar "Italic letter enya";
beginchar(oct"116",11u#,x_height#,desc_depth#);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); pickup fine.nib;
x0=0; x1=x2=x2'; pos2(stem,0); pos2'(stem,0);
lft x2l=hround(3.5u-.5stem); bot y2=-1/3d; y2'-.5stem=-oo;
hook_in(0,a,1);  % opening hook
x4+.5stem=hround(w-2.5u+.5stem); x5=x4-.25u; ital_arch(2',3,4);  % arch
x7=w; hook_out(5,6,7)(skewed);  % closing hook
filldraw stroke z4e{down}..{-u,-x_height}z5e;  % right stem
pos8(vair,-90); pos9(hair,-180); pos10(flare,-180);
bot y8r=-d-oo; y10-.5flare=-vround.9d;
x8=1/3(4u); lft x9r=min(hround-.5u,lft x9r+x8-x9l-eps);
%filldraw circ_stroke z2e--z1e;  % left stem
filldraw stroke z1e---z2e...{left}z8e;  % stem and arc
bulb(8,9,10);  % bulb
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#);
penlabels(0,a,1,2,3,4,5,6,7,8,9,10); endchar;

cmchar "Lowercase Greek bar lambda";
beginchar(oct"001",10.5u#,asc_height#,0);
adjust_fit(0,0); pickup fine.nib;
pos1(vair,90); lft x1=hround .1u; top y1r=h;
x2=x1+2u; y2=.7[x_height,h]; x3=w-2u; bot y4=-oo; y3=max(.07h,y4+eps);
z4-(.25u,0)=whatever[z2,z3]; numeric theta; theta=angle(z2-z3)-90;
pos2(stem,theta); pos3(stem,theta); pos4(stem,0);
filldraw circ_stroke z1e{right}...z2e---z3e
 ...{2(x4e-x3e),y4e-y3e}z4e;  % long diagonal
y5=.5[bar_height,x_height]; z5=whatever[z2,z3];
x6=1.5u; y6-.5stem=-oo; pos5(hair,theta-90); pos6(stem,angle(z5-z6)-90);
filldraw circ_stroke z6e--z5e; % short diagonal
pos7(bar,90+theta); pos8(bar,90+theta);
z7r=whatever[z1l,z6l]; z9=.8[z3,z2];z9=.5[z7,z8];
(x9-x7)*(y2-y1)/(x2-x1)=y7-y9;
showdependencies;
  %angle(z2-z3)+90=angle(z7-z8);
filldraw stroke z7e--z8e;
penlabels(1,2,3,4,5,6,7,8,9); endchar;


cmchar "Lowercase Greek upsidedown iota";
beginchar(oct"000",5u#,x_height#,0);
italcorr x_height#*slant+.5hair#-u#;
adjust_fit(if monospace: u#,u# else: 0,0 fi); pickup fine.nib;
pos1(stem,0); rt x1r=hround(w-1.5u+.5stem); y1-.5stem=-oo;
x2=x1+.25u; x4=0; hook_in(4,3,2);  % opening hook
filldraw circ_stroke z1e{up}...{u,x_height}z2e;  % stem
math_fit(0,ic#); penlabels(1,2,3,4); endchar;


cmchar "Italic ligature fj";
beginchar(oct"106",5.5u#+.5max(1.5u#,stem#)+.5max(3.5u#,2flare#)
 +2letter_fit#,asc_height#,desc_depth#);
italcorr max(asc_height#*slant+.5stem#-2u#,1/3x_height#*slant+.5hair#+.5u#);
adjust_fit(0,0); pickup fine.nib;
.5[x88,x89]=.5(w-3u-2letter_fit); x89-x88=u; y88=h; y89=-d;
numeric theta; 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);
pos11(stem,0); pos12(stem,0); lft x12l=hround(w-1.5u-.5stem);
pos13(vair,-90); pos14(hair,-180); pos15(flare,-180);
top y11=x_height; 
x12=x11; bot y12=-1/3d; bot y13r=-d-oo; y15-.5flare=-vround.9d;
x13=lft x12l-u; lft x14r = hround(.5w-.25u);
x1r=x11r; lft x8r=hround-.35u; x2=.5[x1,x4]; x7=.6[x8,x5];
y9-.5flare=vround-.85d; bot y7r=-d-oo;
y0+.5flare=vround(.85[x_height,h]); top y2r=h+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];
filldraw stroke z11e---z12e...{left}z13e; 
bulb(13,14,15);
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;  % left 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; x21=x11;
filldraw stroke z20e--z21e;  %  crossbar
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21,88,89); endchar;

cmchar "The letter hausa K";
beginchar("K",13.5u#,cap_height#,0);
italcorr cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
numeric right_jut,stem[],alpha[];
if serifs: right_jut=.6cap_jut;
else: right_jut=.4tiny; fi
pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr);
stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi);
top y3=h; rt x3r=hround(r-letter_fit-u-right_jut);
bot y6=0; rt x6r=hround(r-letter_fit-.75u-right_jut);
x4=x1; y4=1/3h;
alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4);
penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90);
alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1);
penpos6(alpha2*(stem2-tiny),0);
forsuffixes $=l,r: y3'$=.9h; 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(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark);fi % lower diagonal serif
if serifs: z10r=z3'l; z10r-z10l=whatever*(z1-z6); z10l=whatever[z4r,z3'r];
 pos7(vair,90); x7=hround(x3+.5u); top y7 = top y3; 
 pos8(cap_hair,0); pos9(flare,0);
 y8= .3[y5r,y7]; rt x8r=hround(w); 
 fill z10r{z3-z4}..top z7r{right}--bot z7l{left}...{z4-z3}z10l--cycle;
% filldraw stroke z10e{z3-z4}...z7e{right}; 
 bulb(7,8,9); fi	% bulb
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10); endchar;

cmchar "The letter hausa D";
beginchar("T",15.5u#,cap_height#,0);
italcorr .7cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,0);
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
lft x1l=lft x2l=hround max(4u,5u-.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=.5(w+2u#)+.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,.5cap_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
if serifs: pickup fine.nib; top y10r= y3r;
 pos8(flare,180); pos9(hair,180);
 pos10(cap_band,90);  rt x8r=0; x10=lft x1l - .5cap_jut;
 y8=vround(.7h);
 bulb(10,9,8); fi % bulb
math_fit(0,ic#-.5u#); penlabels(1,2,3,4,5,6,7,8,9,10); endchar;

cmchar "The letter hausa B";
beginchar("B",14.5u#,cap_height#,0);
italcorr .75cap_height#*slant-.5u#;
adjust_fit(cap_serif_fit#,0);
numeric left_stem,right_curve,middle_weight;
left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5;
pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0);
lft x1l=lft x2l=hround max(4u,5u-.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,.5cap_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
if serifs: pickup fine.nib; top y15r= y3r;
 pos13(flare,180); pos14(hair,180);
 pos15(cap_band,90);  rt x13r=0; x15=lft x1l - .5cap_jut;
 y13=vround(.7h);
 bulb(15,14,13); fi % bulb
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;

cmchar "The letter reverse D";
beginchar(oct"002",13.5u#,cap_height#,0);
italcorr .7cap_height#*slant-.5u#;
adjust_fit(0,cap_serif_fit#);
pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
rt x1r=rt x2r=hround max(w-2u,w-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);
z3l=top z1; y4=y3; y5=.51[y4,y6]; y6=y7;
z7l=bot z2; x4=x6=.5w-.25u; x5l=hround(u);
x4r:=x6r:=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,.5cap_jut,b,1/3,cap_jut);  % upper serif
 nodish_serif(2,1,c,1/3,.5cap_jut,d,1/3,cap_jut); fi  % lower serif
math_fit(0,ic#-.5u#); penlabels(1,2,3,4,5,6,7); endchar;