Debian Codegraph @

texmf-dist/fonts/source/public/phonetic/phochar.mf

raw
1 % Actual phonetic character codes. Created by Emma Pease, CSLI,
2 % Stanford University. Based for the most part on computer modern characters
3
4 cmchar "Reverse Cedilla accent";
5 beginchar(oct"011",8u#,0,.875desc_depth#);
6 adjust_fit(0,0);
7 x1=.5w+.5u;
8 if serifs: pickup crisp.nib; pos1(stem,0); pos2(stem,0);
9 pos3(vair,90); pos4(stem,180); pos5(vair,-90);
10 x1=x2; z3l=z2r; x4=x2-1.5u; x5=x3+1.5u;
11 bot y1=-o; bot y2=-vround 2/7d-o; y4=.5[y3,y5]; bot y5=-d-o;
12 filldraw stroke z1e--z2e; % stem
13 filldraw stroke z3e{left}...z4e{down}...{right}z5e; % hook
14 else: pickup fine.nib; pos1(vair,0); top y1=-o-2;
15 pos2(.5[vair,stem],0); bot y2=-d-o; x2=x1+1.25u;
16 filldraw stroke z1e--z2e; fi % diagonal
17 penlabels(1,2,3,4,5); endchar;
18
19 cmchar "The letter phonetic a";
20 beginchar("a",10u#+serif_fit#,x_height#,0);
21 italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
22 adjust_fit(0,serif_fit#);
23 pickup tiny.nib; pos1(stem',0); pos2(stem,0);
24 pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
25 rt x1r=hround(w-2.5u+.5stem'); top y1=h+oo;
26 numeric edge; edge=lft x2l;
27 pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
28 pos4(vair,90); pos5(curve,180);
29 pos6(vair,270); penpos7(x3r-x3l,360);
30 lft x3l=1/3[lft x2,edge]; y3=1/8[bar_height,x_height];
31 x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
32 lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
33 x6l=x4l-.2u; bot y6r=-oo;
34 x7=x3; y7=min(y3,y6+y4-y3+.6vair);
35 (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
36 (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
37 filldraw stroke z3e{up}...pulled_arc.e(4,5)
38 & pulled_arc.e(5,6)...{up}z7e; % bowl
39 y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
40 pickup tiny.nib; bot y2=if serifs:-min(oo,serif_drop) else: 0 fi;
41 filldraw stroke z1e--z0'e--z0e--z2e; % stem
42 if serifs: sloped_serif.r(2,0,b,1/3,jut,min(oo,serif_drop)); fi % lower serif
43 penlabels(0,1,2,3,4,5,6,7); endchar;
44
45 cmchar "The letter rotated phonetic a";
46 beginchar("A",10u#+serif_fit#,x_height#,0);
47 italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#);
48 adjust_fit(serif_fit#,0);
49 pickup tiny.nib; pos1(stem',0); pos2(stem,0);
50 pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
51 lft x1l=hround(2.5u-.5stem'); top y1=h+min(oo,serif_drop);
52 numeric edge; edge=rt x2r;
53 pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
54 pos4(vair,90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180);
55 rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l),1/3[rt x2,edge]);
56 y3=1/8[bar_height,x_height];
57 x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
58 rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
59 x6l=x4l-.2u; bot y6r=-oo;
60 x7=x3; y7=min(y3,y6+y4-y3+.6vair);
61 (x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x4,x5r]);
62 (x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x6,x5r]);
63 filldraw stroke z3e{up}...pulled_arc.e(4,5)&pulled_arc.e(5,6)...{up}z7e; % bowl
64 y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
65 y2=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{left}...{up}z7l));
66 pickup tiny.nib; filldraw stroke z1e--z0'e--z0e--z2e; % stem
67 pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
68 z7'=z2; x8l=x7'l; bot y8=0;
69 filldraw stroke z7'e--z8e; % point
70 if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); fi % upper serif
71 penlabels(0,1,2,3,4,5,6,7,8); endchar;
72
73 cmchar "The letter voiced implosive b";
74 beginchar("b",10u#+serif_fit#,asc_height#,0);
75 italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#);
76 adjust_fit(serif_fit#,0);
77 pickup tiny.nib; pos1(stem',0); pos2(stem,0);
78 pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
79 lft x1l=hround(2.5u-.5stem'); top y1=.25[x_height,h];
80 numeric edge; edge=rt x2r;
81 pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
82 pos4(vair,90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180);
83 rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l),1/3[rt x2,edge]);
84 y3=1/8[bar_height,x_height];
85 x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
86 rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
87 x6l=x4l-.2u; bot y6r=-oo;
88 x7=x3; y7=min(y3,y6+y4-y3+.6vair);
89 (x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x4,x5r]);
90 (x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x6,x5r]);
91 filldraw stroke z3e{up}...pulled_arc.e(4,5)&pulled_arc.e(5,6)...{up}z7e; % bowl
92 y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
93 y2=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{left}...{up}z7l));
94 pickup tiny.nib; filldraw stroke z1e--z0'e--z0e--z2e; % stem
95 pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
96 z7'=z2; x8l=x7'l; bot y8=0;
97 filldraw stroke z7'e--z8e; % point
98 if serifs: pickup tiny.nib;
99 pos9(vair,-270); pos9'(vair,-90);z9=z9';x9=.5[x1,x10]; top y9r=h;
100 pos10(hair,-360); rt x10r=w- hround u; y10=.75[x_height,h]-.5flare;
101 pos11(flare,-360); %z11l=z10l;
102 bulb(9,10,11); filldraw stroke super_arc.e(1,9'); % tail
103 else: pickup fine.nib; pos1'(stem,0); z1'=z1;
104 z1''r=z1'r; z1''=z1'; z1''l=(x1'l,0);
105 pos9(vair,-90); x9=4.5u; top y9l=h;
106 pos10(.5[vair,flare],90); rt x10=hround 1.25u;
107 y10r=good.y 5/6[x_height,h]; y10l:=good.y y10l;
108 filldraw stroke z1'e..z1''e&super_arc.e(1'',9)
109 & term.e(9,10,left,.9,4); fi % tail
110 penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
111
112 cmchar "The letter variant open o";
113 beginchar("C",8u#,x_height#,0);
114 italcorr x_height#*slant-.2u#;
115 adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
116 pickup fine.nib; pos2(vair',90); pos4(vair',270);
117 x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo;
118 pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h;
119 if serifs: pos1(hair,0); pos0(flare,0);
120 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare);
121 rt x1r=hround(w-.7u); bulb(2,1,0); % bulb
122 pos5(hair,0); rt x5r=hround(w-.5u);
123 y5=max(good.y(.5bar_height-.9),y4l+vair');
124 (x,y4l)=whatever[z4r,z5l]; x4l:=x;
125 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
126 & pulled_super_arc.e(3,4)(.5superpull)
127 ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal
128 else: pos1(4/7[vair',flare],80);
129 rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r];
130 filldraw stroke term.e(2,1,right,.8,4); % upper terminal
131 pos5(.6[vair',flare],275); rt x5r=hround(w-.5u);
132 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
133 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
134 & pulled_super_arc.e(3,4)(.5superpull)
135 ..tension .9 and 1..z5e; fi % arc and lower terminal
136 currentpicture:=currentpicture rotatedaround ((.5w,.5h),180);
137 penlabels(0,1,2,3,4,5); endchar;
138
139 cmchar "The letter open o";
140 beginchar("c",8u#,x_height#,0);
141 italcorr x_height#*slant-.2u#;
142 adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
143 pickup fine.nib; pos2(vair',90); pos4(vair',270);
144 x2=x4=.5(w-u); top y2r=vround(h+1.5oo); bot y4r=-oo;
145 pos3(curve,0); rt x3r=hround min(w-.6u,w-1.35u+.5curve); y3=.5h;
146 if serifs: pos1(hair,180); pos0(flare,180);
147 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare);
148 lft x1r=hround(.7u); bulb(2,1,0); % bulb
149 pos5(hair,180); lft x5r=hround(.5u);
150 y5=max(good.y(.5bar_height-.9),y4l+vair');
151 (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u);
152 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
153 & pulled_super_arc.e(3,4)(.5superpull)
154 ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e; % arc and lower terminal
155 else: pos1(4/7[vair',flare],80);
156 lft x1r=hround(.6u); top y1r=vround .82[bar_height,top y2r];
157 filldraw stroke term.e(2,1,right,.8,4); % upper terminal
158 pos5(.6[vair',flare],275); lft x5r=hround(.5u);
159 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
160 forsuffixes e=l,r: path p.e; p.e=z4e{left}..tension .9 and 1..z5e;
161 if angle direction 1 of p.e>75:
162 p.e:=z4e{left}..tension atleast.9 and 1..{dir 75}z5e; fi endfor
163 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
164 & pulled_super_arc.e(3,4)(.5superpull)
165 & p.e; fi % arc and lower terminal
166 penlabels(0,1,2,3,4,5); endchar;
167
168 cmchar "The letter glottal d";
169 beginchar("D",10.5u#+serif_fit#,asc_height#,0);
170 italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
171 adjust_fit(0,serif_fit#);
172 pickup tiny.nib;
173 pos2(stem,0);
174 lft x2l=w-hround(3u+.5stem');
175 pickup fine.nib; numeric bulb_diam;
176 if serifs: bulb_diam=hround .8[stem,flare];
177 pos8(bulb_diam,0); y8+.5bulb_diam=.9[x_height,h+oo];
178 if monospace: rt x8r=hround(w-.5u)+1 else: lft x8l=hround(w-.75u+.5)
179 fi;
180 else: pos8(5/7[vair,flare],90); top y8r=h;
181 rt x8=hround(if monospace:w-.5u else:w+.75u fi); fi;
182 pickup tiny.nib; bot y2=-oo;
183 penpos a0(x2r-x2l,0); x.a0l=x2l; top y.a0=x_height;
184 filldraw stroke z2e--z.a0e; % stem
185 pickup fine.nib; pos a0'(x2r-x2l-(hround stem_corr)+tiny,180);
186 y.a0'=y.a0; lft x.a0'r=tiny.lft x2l;
187 penpos a1(x.a0'l-x.a0'r,180); x.a1=x.a0'; y.a1+.5vair=.5[x_height,h];
188 pos a2(vair,90); top y.a2r=h+oo;
189 if serifs: x.a2=.6[x.a1,x8r]; (x.a,y.a2r)=whatever[z.a2l,z.a1l];
190 x.a2r:=min(x.a,.5[x.a2,x8r]); pos a3(hair,0); bulb(a2,a3,8); % bulb
191 filldraw stroke z.a0'e--z.a1e & super_arc.e(a1,a2); % arc
192 sloped_serif.r(2,a0,b,1/3,jut,min(oo,serif_drop)); % lower serif
193 else: x.a2=.6[x.a1,x8]; y.a1l:=1/3[y.a1l,y.a2l];
194 filldraw stroke z.a0'e--z.a1e & super_arc.e(a1,a2)
195 & term.e(a2,8,right,.9,4); fi % arc and terminal
196 numeric edge; edge=lft x2l;
197 pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
198 pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
199 lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),1/3[lft x2,edge]);
200 y3=1/8[bar_height,x_height];
201 x4l=.5(w-serif_fit-.5u)-.3u; top y4r=x_height+oo;
202 lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
203 x6l=x4l-.2u; bot y6r=-oo;
204 x7=x3; y7=min(y3,y6+y4-y3+.6vair);
205 (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
206 (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
207 filldraw stroke z3e{up}...pulled_arc.e(4,5)
208 & pulled_arc.e(5,6)...{up}z7e; % bowl
209 penlabels(a1,a2,2,3,4,5,6,7,8,a0); endchar;
210
211 cmchar "The letter eth";
212 beginchar("d",9u#,asc_height#,0);
213 italcorr .7x_height#*slant;
214 adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
215 penpos1(vair,90); penpos3(vair',-90);
216 penpos2(curve,180); penpos4(curve,0);
217 x2r=hround max(.5u,1.25u-.5curve);
218 x4r=w-x2r; x1=x3=.5w; y1r=x_height; % +vround 1.5oo;
219 y3r=-oo;
220 y2=y4=.5x_height-vair_corr; y2l:=y4l:=.52x_height;
221 penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
222 & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle; % bowl
223 penpos5(hair/(sind 45),45); penpos4'(stem,0);
224 x4r=x4'r; y4=y4';
225 top y5r=h+oo; x5=x2;
226 penstroke pulled_arc.e(4',5);
227 penpos6(bar+stem_corr,120); penpos7(bar+stem_corr,120);
228 y6=.35[y1,y5]; y7r=h+oo;
229 x7r=rt x4; x6l=rt x2l;
230 filldraw stroke z6e--z7e;
231 penlabels(1,2,3,4,5,6,7); endchar;
232
233 cmchar "The letter schwa";
234 beginchar("e",7.25u#+max(.75u#,.5curve#),x_height#,0);
235 italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0);
236 adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi);
237 numeric left_curve,right_curve;
238 left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi;
239 if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi
240 if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi
241 pickup tiny.nib; pos1(right_curve,180);
242 pos2(vair,-90); pos3(left_curve,0);
243 y1=good.y (h-bar_height); bot y2r=-vround 1.5oo; y0l=top y1;
244 lft x1r=hround min(.5u,u-.5right_curve);
245 rt x3r=hround max(w-.5u,w-1.25u+.5left_curve); x2=.5w-.25u;
246 {{interim superness:=more_super;
247 filldraw stroke super_arc.e(1,2)}}; % right bowl
248 y3=.5[y2,y4]; top y4r=h+oo; x4=x2+.25u;
249 if serifs: pos4(vair',90); pos5(hair,180);
250 y5=min(good.y(h-.5(h-bar_height)+.9),y4l-vair); x5r=x1r;
251 (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l-.5u);
252 filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4)
253 ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal
254 else: pos4(vair,270);
255 filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc
256 pickup fine.nib; pos4'(vair,90); z4=z4';
257 pos5(.5[vair,flare],275); rt x5r=hround(.6u);
258 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
259 filldraw stroke term.e(4',5,right,1,4); fi % terminal
260 path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4);
261 y1'r=y0r=y0l-.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1;
262 forsuffixes $=l,r:
263 x0$=xpart(((w,y0$)--(x1,y0$)) intersectionpoint testpath); endfor
264 fill stroke z0e--z1'e; % crossbar
265 penlabels(0,1,1',2,3,4,5); endchar;
266
267 cmchar "The letter variant schwa";
268 beginchar("E",7.25u#+max(.75u#,.5curve#),x_height#,0);
269 italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0);
270 adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi);
271 numeric left_curve,right_curve;
272 left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi;
273 if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi
274 if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi
275 pickup tiny.nib; pos1(right_curve,0);
276 pos2(vair,90); pos3(left_curve,180);
277 y1=good.y bar_height; top y2r=h+vround 1.5oo; y0l=bot y1;
278 rt x1r=hround min(w-.5u,w-u+.5right_curve);
279 lft x3r=hround max(.5u,1.25u-.5left_curve); x2=.5w+.25u;
280 {{interim superness:=more_super;
281 filldraw stroke super_arc.e(1,2)}}; % right bowl
282 y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u;
283 if serifs: pos4(vair',270); pos5(hair,360);
284 y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r;
285 (x,y4l)=whatever[z4r,z5]; x4l:=x;
286 filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4)
287 ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal
288 else: pos4(vair,270);
289 filldraw stroke super_arc.e(2,3) & super_arc.e(3,4); % left bowl and arc
290 pickup fine.nib; pos4'(vair,270); z4=z4';
291 pos5(.5[vair,flare],275); rt x5r=hround(w-.6u);
292 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
293 filldraw stroke term.e(4',5,right,1,4); fi % terminal
294 path testpath; testpath=super_arc.r(2,3) & super_arc.r(3,4);
295 y1'r=y0r=y0l+.6[thin_join,vair]; y1'l=y0l; x1'l=x1'r=x1;
296 forsuffixes $=l,r:
297 x0$=xpart(((0,y0$)--(x1,y0$)) intersectionpoint testpath); endfor
298 fill stroke z0e--z1'e; % crossbar
299 currentpicture:=currentpicture rotatedaround ((.5w,.5h),180);
300 penlabels(0,1,2,3,4,5); endchar;
301
302
303
304
305 cmchar "The letter flap";
306 numeric r_flare#; r_flare#=.75[if serifs: stem# else: vair# fi,flare#];
307 define_whole_blacker_pixels(r_flare);
308 beginchar("f",if serifs:max(7u#,5.5u#+r_flare#) else:6.5u# fi,x_height#,0);
309 italcorr x_height#*slant if not serifs: +.25u# fi;
310 adjust_fit(serif_fit#,0);
311 pickup fine.nib; top y4r=h+oo;
312 if serifs: pos4(vair,90); pos5(hair,0);
313 x4=w-max(1.75u,.25u+r_flare);
314 rt x5r=hround(w-.5u+.5); y5+.5r_flare=.9[bar_height,h]+oo;
315 pos6(r_flare,0); bulb(4,5,6); % bulb
316 else: pos4(r_flare,90); rt x4=hround(w-.25u); fi
317 pos0'(hround(stem-3stem_corr),180);
318 rt x0'l=hround(2.5u-.5stem')+stem'; top y0'=bar_height;
319 filldraw stroke z0'e{up}...{right}z4e; % arc
320 pickup tiny.nib; pos0(stem',0); pos2(stem',0);
321 pos1(hround(stem-3stem_corr),0); top y1=h+min(oo,serif_drop);
322 %pos0'(hround(stem-3stem_corr),0);
323 y0=y0'; x1l=x0l=x2l;
324 lft x1l=hround(2.5u-.5stem'); bot y2=0;
325 filldraw stroke z0e--z2e; % stem
326 if serifs: dish_serif(2,0,b,1/3,jut,c,1/3,1.25jut); fi % lower serif
327 penlabels(1,2,0',4,5,6); endchar;
328
329 cmchar "rotated Variant letter g";
330 beginchar("g",10u#+serif_fit#,x_height#+desc_depth#,0);
331 h:=vround(x_height#*hppp); d:=vround(desc_depth#*hppp); % vertical adj.
332 italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
333 adjust_fit(0,serif_fit# if serifs: -.5u# fi);
334 pickup tiny.nib; pos1(stem',0); pos2(stem,0);
335 pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
336 rt x1r=hround(w-2.5u+.5stem');
337 numeric edge; edge=lft x2l;
338 path edge_path; edge_path=(edge,h)--(edge,0);
339 pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
340 pos4(vair,90); pos5(curve,180);
341 pos6(vair,270); penpos7(x3r-x3l,360);
342 lft x3l=2/3[lft x2,edge]; y3=bar_height;
343 x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
344 lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
345 x6l=x4l-.2u; bot y6r=vround 1/3vair;
346 lft x7l=edge; y7=min(y3,y6+y4-y3+.6vair);
347 (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
348 (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
349 filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
350 &super_arc.e(5,6)&z6e{right}...{up}z7e; % bowl
351 y1=ypart(edge_path intersectionpoint(z3l{up}...{left}z4l));
352 y0=ypart(edge_path intersectionpoint(z7l{down}...{left}z6l));
353 pickup tiny.nib; bot y2=if serifs: -.25d else: 0 fi;
354 filldraw stroke z1e--z0'e--z0e--z2e; % stem
355 pickup crisp.nib;
356 pos8(hround(hair-stem_corr),0); pos7'(stem',0);
357 z7'=z1; x8r=x7'r; top y8=h+oo;
358 filldraw stroke z7'e--z8e; % point
359 if serifs: pickup tiny.nib;
360 pos9(vair,-90); x9=.5[x2,x10]; bot y9r=-d-o-1;
361 pos10(hair,-180); lft x10r=hround u; y10=-.75d+.5flare;
362 pos11(flare,-180); z11r=z10r;
363 bulb(9,10,11); filldraw stroke super_arc.e(2,9); % tail
364 else: pickup fine.nib; pos2'(stem,0); z2'=z2;
365 z2''r=z2'r; z2''=z2'; z2''l=(x2'l,0);
366 pos9(vair,-90); x9=4.5u; bot y9r=-d-o-1;
367 pos10(.5[vair,flare],-90); lft x10=hround 1.25u;
368 y10r=good.y -5/6d; y10l:=good.y y10l;
369 filldraw stroke z2'e..z2''e&super_arc.e(2'',9)
370 & term.e(9,10,left,.9,4); fi % tail
371 currentpicture:=currentpicture rotatedaround ((.5w,.5h),180);
372 penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
373
374 cmchar "Variant letter g";
375 beginchar("G",10u#+serif_fit#,x_height#,desc_depth#);
376 h:=vround(x_height#*hppp); d:=vround(desc_depth#*hppp); % vertical adj.
377 italcorr x_height#*slant-serif_fit#+.5stem#-2u# if serifs:+.5u# fi;
378 adjust_fit(0,serif_fit# if serifs: -.5u# fi);
379 pickup tiny.nib; pos1(stem',0); pos2(stem,0);
380 pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
381 rt x1r=hround(w-2.5u+.5stem');
382 numeric edge; edge=lft x2l;
383 path edge_path; edge_path=(edge,h)--(edge,0);
384 pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
385 pos4(vair,90); pos5(curve,180);
386 pos6(vair,270); penpos7(x3r-x3l,360);
387 lft x3l=2/3[lft x2,edge]; y3=bar_height;
388 x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
389 lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
390 x6l=x4l-.2u; bot y6r=vround 1/3vair;
391 lft x7l=edge; y7=min(y3,y6+y4-y3+.6vair);
392 (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
393 (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
394 filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
395 &super_arc.e(5,6)&z6e{right}...{up}z7e; % bowl
396 y1=ypart(edge_path intersectionpoint(z3l{up}...{left}z4l));
397 y0=ypart(edge_path intersectionpoint(z7l{down}...{left}z6l));
398 pickup tiny.nib; bot y2=if serifs: -.25d else: 0 fi;
399 filldraw stroke z1e--z0'e--z0e--z2e; % stem
400 pickup crisp.nib;
401 pos8(hround(hair-stem_corr),0); pos7'(stem',0);
402 z7'=z1; x8r=x7'r; top y8=h+oo;
403 filldraw stroke z7'e--z8e; % point
404 if serifs: pickup tiny.nib;
405 pos9(vair,-90); x9=.5[x2,x10]; bot y9r=-d-o-1;
406 pos10(hair,-180); lft x10r=hround u; y10=-.75d+.5flare;
407 pos11(flare,-180); z11r=z10r;
408 bulb(9,10,11); filldraw stroke super_arc.e(2,9); % tail
409 else: pickup fine.nib; pos2'(stem,0); z2'=z2;
410 z2''r=z2'r; z2''=z2'; z2''l=(x2'l,0);
411 pos9(vair,-90); x9=4.5u; bot y9r=-d-o-1;
412 pos10(.5[vair,flare],-90); lft x10=hround 1.25u;
413 y10r=good.y -5/6d; y10l:=good.y y10l;
414 filldraw stroke z2'e..z2''e&super_arc.e(2'',9)
415 & term.e(9,10,left,.9,4); fi % tail
416 penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
417
418 cmchar "The letter voiced h";
419 beginchar("h",10u#,asc_height#,0);
420 italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
421 adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
422 pickup tiny.nib; pos1(stem,0); pos2(stem,0);
423 pos1'(stem',0); pos2'(stem',0); pos3(stem,0);
424 lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
425 top y1=.25[x_height,h]; bot y2=0; y1=y1'; y2=y2';
426 filldraw stroke z1'e--z2'e; % left stem
427 h_stroke(2,a,3,4); % arch and right stem
428 if serifs: pickup tiny.nib;
429 pos9(vair,-270); pos9'(vair,-90);z9=z9';x9=.5[x1,x10]; top y9r=h;
430 pos10(hair,-360);
431 rt x10r=min(w- hround u,rt x3r);
432 y10=.75[x_height,h]-.5flare;
433 pos11(flare,-360); %z11l=z10l;
434 bulb(9,10,11); filldraw stroke super_arc.e(1,9'); % tail
435 else: pickup fine.nib; pos1'(stem,0); z1'=z1;
436 z1''r=z1'r; z1''=z1'; z1''l=(x1'l,0);
437 pos9(vair,-270); x9=4.5u; top y9r=h;
438 pos10(.5[vair,flare],90); rt x10=hround 1.25u;
439 y10r=good.y 5/6[x_height,h]; y10l:=good.y y10l;
440 filldraw stroke z1'e..z1''e&super_arc.e(1'',9)
441 & term.e(9,10,left,.9,4); fi % tail
442 if serifs: numeric inner_jut; pickup tiny.nib;
443 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
444 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
445 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
446 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
447 penlabels(1,2,3,4,9,10,11); endchar;
448
449 cmchar "letter variant i";
450 beginchar("i",4u#,x_height#,0); l_width#:=4u#;
451 italcorr max(1/3x_height#*slant+.5hair#+.5u#,
452 x_height#*slant+.5stem#-2u#) if math_fitting:+.5u# fi;
453 adjust_fit(if monospace:u#,u# else: u#,u# fi); pickup fine.nib;
454 x2-.5stem=hround(1.5u-.5stem); x4=w; hook_out(2,3,4); % closing hook
455 pickup tiny.nib; pos1(stem,0); pos2'(stem,0); z2'=z2;
456 top y1=h; x1=x2; filldraw stroke z1e--z2e; % stem
457 sloped_serif.l(1,2,a,1/3,jut,serif_drop); % serif
458 math_fit(-.5u#,1/3x_height#*slant+.5hair#+u#); penlabels(1,2,3,4); endchar;
459
460 cmchar "The letter dj";
461 beginchar("J",10.5u#,asc_height#,desc_depth#);
462 italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
463 adjust_fit(0,serif_fit#);
464 pickup tiny.nib; pos1(stem',0); pos2(stem,0);
465 pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
466 rt x1r=hround(w-3u+.5stem'+serif_fit); top y1=h;
467 numeric edge; edge=lft x2l;
468 pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
469 pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
470 lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),1/3[lft x2,edge]);
471 y3=1/8[bar_height,x_height];
472 x4l=.5(w-.5u)-.3u; top y4r=x_height+oo;
473 lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
474 x6l=x4l-.2u; bot y6r=-oo;
475 x7=x3; y7=min(y3,y6+y4-y3+.6vair);
476 (x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
477 (x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
478 filldraw stroke z3e{up}...pulled_arc.e(4,5)
479 & pulled_arc.e(5,6)...{up}z7e; % bowl
480 y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
481 pickup tiny.nib; bot y2=if serifs:-min(oo,serif_drop) else: 0 fi;
482 filldraw stroke z1e--z0'e--z0e--z2e; % stem
483 if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif
484 pickup tiny.nib; pos2'(stem',-180); z2'=z2;
485 pos8(vair,-90); pos9(hair,0); pos10(flare,0);
486 x8=.5[x2',x9r]; bot y8r=-d-oo; y9-.5flare=-.88d;
487 if monospace: rt x9r = w else: z9r=z10r; lft x10l= w-floor .75u fi;
488 (xc,y8r)=whatever[z8l,z2'l]; x8r:=min(xc,.5[x9r,x8]);
489 filldraw stroke z2'e{down}...z8e{right}; bulb(8,9,10); % arc and bulb
490 else: pickup fine.nib; pos2'(stem',180); z2'=z2;
491 pos9(.2[vair,stem'],-90); pos10(vair,-90);
492 rt x10r=w-(hround.75u); bot y10r=vround 5/6(-d-oo);
493 (x,y10l)=whatever[z10r,z2]; x7l:=x;
494 z8l=z2'l; (x2'r,y8r)=whatever[z10r,z8l]; x8r=x2'r;y8=y8l;
495 x9r=.5[x10l,x8l]; x9l:=.5[x10l,x8l]; bot y9r=-d-oo;
496 filldraw stroke z2'e..{down}z5e & super_arc.e(8,9)
497 & z9e{right}..z10e; fi % arc and terminal
498 penlabels(0,1,2',3,4,5,6,7,8,9,10); endchar;
499
500
501 cmchar "Dotless letter j barred";
502 beginchar("j",5.5u#,x_height#,desc_depth#);
503 italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
504 adjust_fit(serif_fit#+2stem_shift# if monospace:+.5u# fi,
505 serif_fit#-2stem_shift# if monospace:-.5u# fi);
506 pickup tiny.nib; pos1(stem',0); pos2(stem',0);
507 rt x1r=hround(.5w+.25u+.5stem'); x1=x2;
508 top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d;
509 filldraw stroke z1e--z2e; % stem
510 if serifs: sloped_serif.l(1,2,a,1/3,1.1jut,serif_drop); % upper serif
511 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
512 x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
513 if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi;
514 (x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]);
515 filldraw stroke z2e{down}...z5e{left}; bulb(5,6,7); % arc and bulb
516 else: pickup fine.nib; pos2'(stem',0); z2'=z2;
517 pos6(.2[vair,stem'],-90); pos7(vair,-90);
518 lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo);
519 x3r=x1r; top y4r=min(2x_height,h+1);
520 (x,y7l)=whatever[z7r,(x1,min(h,asc_height))]; x7l:=x;
521 z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r;
522 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
523 filldraw stroke z2'e..{down}z5e & super_arc.e(5,6)
524 & term.e(6,7,left,1,4); fi % arc and terminal
525 pickup crisp.nib; bot y3r=bot y4r=0; lft x3=hround .5u-1;
526 pos3(bar,90); pos4(bar,90);
527 rt x4=hround(w-if monospace:.75u+1 else:1/3u fi);
528 filldraw stroke z3e--z4e; % bar
529 penlabels(1,2,3,4,5,6,7); endchar;
530
531 cmchar "The letter hook k";
532 beginchar("k",9.5u#,asc_height#,0);
533 italcorr x_height#*slant-.2u#;
534 adjust_fit(serif_fit#,serif_fit#); pickup tiny.nib;
535 numeric right_jut,stem[],alpha[];
536 stem1=max(tiny.breadth,hround(fudged.stem-stem_corr));
537 stem2=max(tiny.breadth,hround(fudged.stem-2stem_corr));
538 stem3=max(tiny.breadth,hround(fudged.hair if hefty:-\\4stem_corr fi));
539 stem4=max(tiny.breadth,hround(fudged.stem-3stem_corr));
540 if serifs: right_jut=.6jut; else: right_jut=.4tiny; fi
541 pos1(stem1,0); pos2(stem2,0); top y1=.25[x_height,h]; bot y2=0;
542 lft x1l=lft x2l=hround(2.5u-.5stem1);
543 top y3=x_height; rt x3r=hround(r-letter_fit-.7u-right_jut)+eps;
544 bot y6=0; rt x6r=hround(r-letter_fit-.3u-right_jut)+eps;
545 x4=x11=x1; y4=.7bar_height; y11=y3;
546 alpha1=diag_ratio(1,.5(stem3-tiny),y3-y4,x3r-x4);
547 alpha2=diag_ratio(1,.5(stem4-tiny),y11-y6,x6r-x1);
548 penpos3(alpha1*(stem3-tiny),0); penpos4(whatever,-90);
549 z5=.5[z5l,z5r]; penpos6(alpha2*(stem4-tiny),0);
550 forsuffixes $=l,r: y3'$=x_height; y6'$=0; z4$=z3'$+whatever*(z3-z4);
551 z5$=z6'$+whatever*(z11-z6)=whatever[z3,z4]; endfor
552 z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4);
553 % we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\]
554 z6'r=z6r+penoffset z11-z6 of currentpen+whatever*(z11-z6);
555 z6'l=z6l+penoffset z6-z11 of currentpen+whatever*(z11-z6);
556 fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal
557 fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal
558 pos0(stem1,0); pos0'(stem2,0); y0=y0'; x0=x1; x0'=x2;
559 rt z0r=whatever[z3,z4]; filldraw stroke z1e..z0e--z0'e..z2e; % stem
560 if serifs: numeric inner_jut;
561 if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut;
562 else: rt x2r+inner_jut+.5u+1=lft x6l-inner_jut; fi
563 dish_serif(2,0',b,1/3,jut,c,1/3,inner_jut); % lower stem serif
564 dish_serif(3,4,d,2/3,1.4jut,e,1/2,right_jut)(dark); % upperDiagonal serif
565 dish_serif(6,5,f,1/2,inner_jut,g,1/3,right_jut)(dark);fi % lowerDiagonal serif
566 if serifs: pickup tiny.nib;
567 pos7(vair,-270); pos7'(vair,-90);z7=z7';x7=.5[x1,x8]; top y7r=h;
568 pos8(hair,-360); rt x8r=rt x3r; y8=.75[x_height,h]-.5flare;
569 pos9(flare,-360);
570 bulb(7,8,9); filldraw stroke super_arc.e(1,7'); % hook
571 else: pickup fine.nib; pos1'(stem,0); z1'=z1;
572 z1''r=z1'r; z1''=z1'; z1''l=(x1'l,0);
573 pos7(vair,-90); x7=4.5u; top y7l=h;
574 pos8(.5[vair,flare],90); rt x8=hround 1.25u;
575 y8r=good.y 5/6[x_height,h]; y8l:=good.y y8l;
576 filldraw stroke z1'e..z1''e&super_arc.e(1'',7)
577 & term.e(7,8,left,.9,4); fi % tail
578 penlabels(0,1,2,3,4,5,6,7,8,9,11); endchar;
579
580 cmchar "The letter rotated m";
581 beginchar("m",15u#,x_height#,0);
582 italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
583 adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
584 numeric shaved_stem; shaved_stem=hround(mfudged.stem-2stem_corr);
585 pickup tiny.nib; pos1(mfudged.stem,0); pos2(mfudged.stem,0);
586 pos1'(shaved_stem,0); pos2'(shaved_stem,0);
587 pos3(mfudged.stem,0); pos5(mfudged.stem,0);
588 lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l;
589 lft x3l=hround(.5w-.5stem); x5-x3=x3-x1;
590 if not monospace: r:=hround(x5+x1)-l; fi % change width for better fit
591 top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
592 filldraw stroke z1'e--z2'e; % left stem
593 h_stroke(2,a,3,4); % left arch and middle stem
594 h_stroke(4,b,5,6); % right arch and right stem
595 if serifs: sloped_serif.l(1',2',c,1/3,jut,serif_drop); % upper left serif
596 numeric inner_jut; pickup tiny.nib;
597 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
598 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
599 dish_serif(2,1,d,1/3,jut,e,1/3,jut); % lower left serif
600 dish_serif(4,3,f,1/3,inner_jut,g,1/3,jut); % lower middle serif
601 dish_serif(6,5,h,1/3,inner_jut,i,1/3,jut); fi % lower right serif
602 currentpicture:=currentpicture rotatedaround ((.5w,.5h),180);
603 penlabels(1,2,3,4,5,6); endchar;
604
605 cmchar "The letter emgma";
606 beginchar("M",15u#,x_height#,desc_depth#);
607 italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
608 adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
609 numeric shaved_stem; shaved_stem=hround(mfudged.stem-2stem_corr);
610 pickup tiny.nib; pos1(mfudged.stem,0); pos2(mfudged.stem,0);
611 pos1'(shaved_stem,0); pos2'(shaved_stem,0);
612 pos3(mfudged.stem,0); pos5(mfudged.stem,0);
613 lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l;
614 lft x3l=hround(.5w-.5stem); x5-x3=x3-x1;
615 if not monospace: r:=hround(x5+x1)-l; fi % change width for better fit
616 top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
617 filldraw stroke z1'e--z2'e; % left stem
618 h_stroke(2,a,3,4); % left arch and middle stem
619 h_stroke(4,b,5,6); % right arch and right stem
620 if serifs: sloped_serif.l(1',2',c,1/3,jut,serif_drop); % upper left serif
621 numeric inner_jut; pickup tiny.nib;
622 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
623 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
624 dish_serif(2,1,d,1/3,jut,e,1/3,jut); % lower left serif
625 dish_serif(4,3,f,1/3,inner_jut,g,1/3,jut); % lower middle serif
626 x10=x6; bot y10=-1/3d; penpos10(x5r-x5l,0); % stuff added
627 pickup tiny.nib; filldraw stroke z6e--z10e; % right stem continuation
628 pickup tiny.nib; pos7(vair,-90); pos8(hair,-180); pos9(flare,-180);
629 x7=.5[x10,x8r]; bot y7r=-d-oo; y8-.5flare=-.88d;
630 if monospace: lft x8r=lft x4l; else: z8r=z9r; lft x9r= rt x4r; fi
631 (x,y7r)=whatever[z7l,z10l]; x7r:=max(x,.5[x8r,x7]);
632 filldraw stroke z10e{down}...z7e{left}; bulb(7,8,9); fi % arc and bulb
633 penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
634
635
636 cmchar "The letter engma";
637 beginchar("n",10u#,x_height#,desc_depth#);
638 italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
639 adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
640 pickup tiny.nib; pos1(stem,0); pos2(stem,0);
641 numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
642 pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
643 lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
644 top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
645 filldraw stroke z1'e--z2'e; % left stem
646 h_stroke(2,a,3,4); % arch and right stem
647 if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
648 numeric inner_jut; pickup tiny.nib;
649 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
650 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
651 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
652 % dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
653 x8=x4; bot y8=-1/3d; penpos8(x3r-x3l,0); % stuff added
654 pickup tiny.nib; filldraw stroke z4e--z8e; % right stem continuation
655 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
656 x5=.5[x8,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
657 if monospace: lft x6r=0; else: z6r=z7r; lft x7r= rt x2r; fi
658 (x,y5r)=whatever[z5l,z8l]; x5r:=max(x,.5[x6r,x5]);
659 filldraw stroke z8e{down}...z5e{left}; bulb(5,6,7); fi % arc and bulb
660 penlabels(1,2,3,4,5,6,7,8); endchar;
661
662 cmchar "The letter thorn";
663 beginchar("p",10u#+serif_fit#,asc_height#,desc_depth#);
664 italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
665 adjust_fit(serif_fit#,0);
666 pickup tiny.nib; pos1(stem',0); pos2(stem,0);
667 pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2;
668 lft x1l=hround(2.5u-.5stem'); top y1=h if serifs: +min(oo,serif_drop) fi;
669 numeric edge; edge=rt x2r;
670 pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
671 pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180);
672 rt x3l=1/3[rt x2,edge]; y3=1/8[bar_height,x_height];
673 x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
674 rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
675 x6l=x4l-.2u; bot y6r=-oo;
676 x7=x3; y7=min(y3,y6+y4-y3+.6vair);
677 (x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
678 (x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]);
679 filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
680 &super_arc.e(5,6)&z6e{left}...{up}z7e; % bowl
681 y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
682 pickup tiny.nib; bot y2=-d;
683 filldraw stroke z1e--z0'e--z0e--z2e; % stem
684 pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
685 z7'=z2; x8l=x7'l; bot y8=0;
686 filldraw stroke z7'e--z8e; % point
687 if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); % upper serif
688 dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi % lower serif
689 penlabels(0,1,2,3,4,5,6,7,8); endchar;
690
691 cmchar "The letter rotated r";
692 numeric r_flare#; r_flare#=.75[if serifs: stem# else: vair# fi,flare#];
693 define_whole_blacker_pixels(r_flare);
694 beginchar("r",if serifs:max(7u#,5.5u#+r_flare#) else:6.5u# fi,x_height#,0);
695 italcorr x_height#*slant if not serifs: +.25u# fi;
696 adjust_fit(serif_fit#,0);
697 pickup fine.nib; bot y4r=0-oo;
698 if serifs: pos4(vair,-90); pos5(hair,180);
699 x4=min(1.75u,.25u+r_flare);
700 lft x5r=hround(.5u-.5); y5-.5r_flare=h-.9[bar_height,h]-oo;
701 pos6(r_flare,180); bulb(4,5,6); % bulb
702 else: pos4(r_flare,-90); lft x4=hround(.25u); fi
703 pos3(thin_join,0); lft x3l=w-hround(2.5u-.5stem')-stem'; bot y3=h-bar_height;
704 filldraw stroke z3e{down}...{left}z4e; % arc
705 pickup tiny.nib; pos0(stem',0); pos2(stem',0);
706 pos1(hround(stem-3stem_corr),0); bot y1=0-min(oo,serif_drop);
707 pos0'(hround(stem-3stem_corr),0); y0=y0'=y3; x1r=x0r=x0'r=x2r;
708 rt x1r=w-hround(2.5u-.5stem'); top y2=h;
709 filldraw stroke z1e--z0'e--z0e--z2e; % stem
710 if serifs: sloped_serif.r(1,0',a,1/3,jut,serif_drop); % lower serif
711 sloped_serif.l(2,0,b,1/3,jut,serif_drop); fi % upper serif
712 % dish_serif(2,0,b,1/3,1.25jut,c,1/3,jut); fi % upper serif
713 penlabels(0,1,2,3,4,5,6); endchar;
714
715 cmchar "The letter esh";
716 numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
717 beginchar("s",5.5u#,asc_height#,desc_depth#);
718 define_whole_blacker_pixels(dot_diam);
719 italcorr h#*slant-serif_fit#+.5stem#-2u#;
720 adjust_fit(serif_fit#+2stem_shift# if monospace:+\\.5u# fi,
721 serif_fit#-2stem_shift# if monospace:-.5u# fi);
722 numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
723 pickup tiny.nib; pos0(stem',0); pos1(shaved_stem,0);
724 x0=x1;
725 x1=.5w;
726 top y0=x_height if serifs: +min(oo,serif_drop) fi;
727 bot y1=-1/3d;
728 pickup fine.nib; numeric bulb_diam;
729 if serifs:
730 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
731 x5=.5[x1,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
732 if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi;
733 (x,y5r)=whatever[z5l,z1l]; x5r:=max(x,.5[x6r,x5]);
734 filldraw stroke z1e{down}...z5e{left}; bulb(5,6,7); % lower arc and bulb
735 bulb_diam=hround .8[stem,flare];
736 pos2(bulb_diam,0); y2+.5bulb_diam=.9[x_height,h+oo];
737 if monospace: rt x2r=hround(w-.5u)+1 else: lft x2l=hround(w-.75u+.5) fi;
738 else: pickup fine.nib; pos1'(stem',0); z1'=z1;
739 pos6(.2[vair,stem'],-90); pos7(vair,-90);
740 lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo);
741 (x,y7l)=whatever[z7r,z3]; x7l:=x;
742 z5r=z1'r; (x1'l,y5l)=whatever[z7l,z5r]; x5l=x1'l; y5=y5r;
743 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
744 filldraw stroke z1'e..{down}z5e & super_arc.e(5,6)
745 & z6e{left}..z7e; % arc and terminal
746 pos2(5/7[vair,flare],90); top y2r=h;
747 rt x2=hround(if monospace:w-.5u else:w+.75u fi); fi
748 pickup tiny.nib;
749 penpos3(x1r-x1l,0); x3l=x1l; top y3=x_height;
750 filldraw stroke z1e--z3e; % stem
751 pickup fine.nib; pos3'(x1r-x1l-(hround stem_corr)+tiny,180);
752 y3'=y3; lft x3'r=tiny.lft x1l;
753 penpos4(x3'l-x3'r,180); x4=x3'; y4+.5vair=.5[x_height,h];
754 pos8(vair,90); top y8r=h+oo;
755 if serifs: x8=.5[x4,x2r]; (xa,y8r)=whatever[z8l,z4l];
756 x8r:=min(xa,.5[x8,x2r]); pos9(hair,0); bulb(8,9,2); % bulb
757 filldraw stroke z3'e--z4e & super_arc.e(4,8); % arc
758 else: x8=.6[x4,x2]; y4l:=1/3[y4l,y8l];
759 filldraw stroke z3'e--z4e & super_arc.e(4,8)
760 & term.e(8,2,right,.9,4); fi % arc and terminal
761 penlabels(1,2,3,4,5,6,7,8); endchar;
762
763
764 cmchar "The letter wedge";
765 beginchar("U",if serifs: 9.5u# else:9u# fi,x_height#,0);
766 italcorr x_height#*slant+.25u#;
767 adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
768 numeric left_stem,right_stem,outer_jut,alpha;
769 right_stem=fudged.stem-stem_corr;
770 left_stem=min(fudged.hair if hefty:-2stem_corr fi,right_stem);
771 outer_jut=.75jut;
772 x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4=0;
773 x2-x1=x4-x3; x2r+apex_corr=x3r; y2=y3=h+apex_oo;
774 alpha=diag_ratio(2,left_stem,y2-y1,x4r-x1l-apex_corr);
775 penpos1(alpha*left_stem,0); penpos2(alpha*left_stem,0);
776 penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
777 z0=whatever[z1r,z2r]=whatever[z3l,z4l];
778 if y0<h-notch_cut: y0:=h-notch_cut;
779 fill z0+.5right{down}...{z4-z3}diag_end(3l,4l,1,1,4r,3r)
780 --diag_end(4r,3r,1,1,2l,1l)--diag_end(2l,1l,1,1,1r,2r){z2-z1}
781 ...{up}z0+.5left--cycle; % left and right diagonals
782 else: fill z0--diag_end(0,4l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)
783 --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
784 if serifs: numeric inner_jut; pickup tiny.nib;
785 prime_points_inside(1,2); prime_points_inside(4,3);
786 if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut;
787 else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
788 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut)(dark); % left serif
789 dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut); fi % right serif
790 penlabels(0,1',2,3,4'); endchar;
791
792
793 cmchar "The letter rotated h";
794 beginchar("u",10u#,x_height#,desc_depth#);
795 italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
796 adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
797 numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi;
798 if light_vair<fine.breadth: light_vair:=fine.breadth; fi
799 pickup tiny.nib; pos1(stem,0); pos2(stem,0);
800 pos3(stem,0); pos4(stem',0);
801 lft x1l=hround(2.5u-.5stem); x1=x2; x3=w-x1; x3r=x4r;
802 if serifs: top y1=h+min(oo,serif_drop); bot y4=-d;
803 else: top y1=h; bot y4=-d; fi
804 pos0(stem,0); pos0'(stem',0); x0=x3; x0'=x4; y0=y0';
805 penpos2'(stem-fine,-180); z2'=z2; y3=y1; y2=.5bar_height;
806 penpos5(light_vair-fine,-90); penpos6(thin_join-fine,0);
807 y6=y0=2/3bar_height;
808 filldraw stroke z1e--z2e; % left stem
809 filldraw stroke z3e..z0e--z0'e..z4e; % right stem
810 pickup fine.nib; bot y5r=-oo; x5l=.5w-.25u; lft x6l=tiny.lft x0l;
811 (x,y5r)=whatever[z5l,z6l]; x5r:=max(x,.5[x5,x2'r]);
812 filldraw stroke {{interim superness:=hein_super;
813 pulled_arc.e(2',5)}} & z5e{right}...{up}z6e; % arc
814 if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper left serif
815 sloped_serif.l(3,0,b,1/3,jut,serif_drop); % upper right serif
816 dish_serif(4,0',c,1/3,jut,d,1/3,jut); fi % lower right serif
817 penlabels(1,2,3,4,5); labels(6); endchar;
818
819 cmchar "The letter rotated w";
820 beginchar("w",13u#,x_height#,0);
821 italcorr x_height#*slant+.25u#;
822 adjust_fit(serif_fit#,serif_fit#);
823 numeric stem[],outer_jut,upper_notch,alpha,mid_corr;
824 outer_jut=.7jut; x1l=w-x8r=l+letter_fit+outer_jut+.25u;
825 stem1=fudged.stem-stem_corr;
826 stem4=min(fudged.hair if hefty:-2stem_corr fi,stem1);
827 stem2=if hefty:.1[vair,stem4] else: stem4 fi;
828 stem3=max(stem2,stem1-3stem_corr);
829 x2-x1=x4-x3=x6-x5=x8-x7; x2l+apex_corr=x3l; x6l+apex_corr=x7l;
830 y1=y8=h; y2=y3=y6=y7=-apex_oo;
831 y4=y5=if monospace: vround .6 fi\\ h; upper_notch=y4-notch_cut;
832 mid_corr=if monospace or hefty:-.3apex_corr else: .5jut fi;
833 alpha=diag_ratio(4,stem2-stem3+stem4,y1-y2,x8r-x1l+mid_corr-2apex_corr);
834 penpos1(alpha*stem1,0); penpos2(alpha*stem1,0);
835 penpos3(alpha*stem2,0); penpos4(alpha*stem2,0);
836 penpos5(alpha*stem3,0); penpos6(alpha*stem3,0);
837 penpos7(alpha*stem4,0); penpos8(alpha*stem4,0);
838 x4l-x1l=floor(x4l-x1l+.5(x5r+mid_corr-x4r)); % |x5r| $\approx$ |x4r+mid_corr|
839 z23=whatever[z1r,z2r]=whatever[z3l,z4l];
840 z45=whatever[z3r,z4r]=whatever[z5l,z6l];
841 z67=whatever[z5r,z6r]=whatever[z7l,z8l];
842 fill diag_end(1l,2l,1,1,3r,4r){z4-z3}
843 ...if y45<upper_notch:(x45,upper_notch)+.5left{up}
844 --(x45,upper_notch)+.5right{down} else: z45&z45 fi
845 ...{z6-z5}diag_end(5l,6l,1,1,7r,8r)--diag_end(7r,8r,1,1,8l,7l){z7-z8}
846 ...if y67>notch_cut:(x67,notch_cut)+.5right{down}
847 --(x67,notch_cut)+.5left{up} else: z67&z67 fi
848 ...{z5-z6}special_diag_end(6,5,4,3){z3-z4}
849 ...if y23>notch_cut:(x23,notch_cut)+.5right{down}
850 --(x23,notch_cut)+.5left{up} else: z23&z23 fi
851 ...{z1-z2}diag_end(2r,1r,1,1,1l,2l)--cycle; % diagonals
852 if serifs: numeric inner_jut[]; pickup tiny.nib;
853 prime_points_inside(1,2); prime_points_inside(5,6); prime_points_inside(8,7);
854 if monospace: inner_jut1=inner_jut4=1.5jut;
855 elseif hefty: inner_jut1=inner_jut4=jut;
856 else: fill diag_end(6r,5r,1,1,5l,6l)--.5[z5l,z6l]
857 --.5[z5r,z6r]--cycle;% middle stem
858 inner_jut2=.7inner_jut1; inner_jut4=1.1inner_jut3;
859 if rt x1'r+jut+.5u+1<=lft x5'l-.7jut: inner_jut1=jut;
860 else: rt x1'r+inner_jut1+.5u+1=lft x5'l-inner_jut2; fi
861 if rt x5'r+jut+.5u+1<=lft x8'l-1.1jut: inner_jut3=jut;
862 else: rt x5'r+inner_jut3+.5u+1=lft x8'l-inner_jut4; fi
863 dish_serif(5',6,e,1/3,inner_jut2,f,1/2,inner_jut3); fi % middle serif
864 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut1); % left serif
865 dish_serif(8',7,c,.6,inner_jut4,d,1/2,outer_jut)(dark); fi % right serif
866 currentpicture:=currentpicture rotatedaround ((.5w,.5h),180);
867 penlabels(0,1,2,3,4,5,6,7,8,23,45,67); endchar;
868
869 cmchar "The letter yogh";
870 beginchar("x",8u#,x_height#,desc_depth#);
871 italcorr x_height#*slant-.5serif_fit#-.3u#;
872 adjust_fit(0,.5serif_fit#);
873 numeric arm_thickness[],z_stem,stem[];
874 stem1=fudged.stem-4stem_corr;
875 if hefty: arm_thickness1=stem1; arm_thickness2=stem1;
876 z_stem=fudged.hair;
877 else: arm_thickness1=stem1; arm_thickness2=stem1; z_stem=fudged.hair; fi
878 if arm_thickness1<tiny.breadth: arm_thickness1:=tiny.breadth; fi
879 pickup tiny.nib; rt x1r=rt x2r=hround(w-.8u);
880 lft x3l=lft x4l=hround .3[.5u, w-.8u];
881 top y1=h; y2=min(y1,h-2/3arm_thickness1);
882 bot y4=.3[0,h]; y3=max(y4,2/3arm_thickness2);
883 numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3));
884 penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0);
885 penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0);
886 pair delta; delta=penoffset z3-z2 of currentpen;
887 fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l
888 ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r
889 ---cycle; % diagonal
890 pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180);
891 top y5r=h; x5=x1; lft x6r=hround .75u; y6=good.y(y5l-beak/1.4)-eps;
892 arm(5,6,a,beak_darkness,-.4beak_jut); % upper arm and beak
893 pickup fine.nib; pos11(vair,-90);
894 pos12(vair,180); x12r=x3r; %.5[1.5u,x7];
895 x8=x13=hround .5[.5u, w-.8u];
896 pos7(curve,0); rt x7r=hround(w-.75u);
897 lft x11=lft x4; %min(hround 3u,lft x12)-eps;
898 pos8(vair,-90); bot y8r=-d; pos13(vair, 90); y13=.1[y3,y5];
899 y7=.5[bot y13l,top y8l];
900 top y11l=top y4l; %vround(0+.5vair);
901 y3=y12;
902 filldraw stroke pulled_arc.e(12,13); %link
903 filldraw stroke pulled_arc.e(13,7)
904 & pulled_arc.e(7,8); % bowl
905 if serifs: numeric bulb_diam[];
906 bulb_diam2=flare+cap_stem-stem;
907 pos10(bulb_diam2,-180); pos9(cap_hair,-180);
908 lft x10r=hround .75u; y10=-.3d; %max(.1h+.5bulb_diam2,.3h-.5bulb_diam2);
909 bulb(8,9,10); % lower bulb
910 else: pos9(bot_thickness,angle(-2u,-h));
911 lft x9r=hround .75u; top y9l=vround -.3d;
912 y9r:=good.y y9r-eps; x9l:=good.x x9l;
913 filldraw stroke term.e(8,9,left,1,4); fi % lower terminal
914 penlabels(1,2,3,4,5,6,7,8,9,10,12,13); endchar;
915
916
917 cmchar "The letter rotated y";
918 beginchar("y",if serifs:9.5u# else:9u# fi,x_height#+desc_depth#,0);
919 h:=vround(x_height#*hppp); d:=vround(desc_depth#*hppp); %adj. vertical
920 italcorr x_height#*slant+.25u#;
921 adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
922 numeric left_stem,right_stem,bot_stem,bot_vair,outer_jut;
923 left_stem=fudged.stem-stem_corr;
924 right_stem=fudged.hair if hefty:-2stem_corr fi;
925 bot_stem=fudged.hair if hefty:-8stem_corr fi;
926 bot_vair=vround(if serifs: vair else:.5[vair,bot_stem] fi);
927 outer_jut=.75jut;
928 x1l=w-x4r=l+letter_fit+outer_jut+.25u; y1=y4r=h; y2=y3=0; x2l=x3l;
929 numeric alpha,alpha[]; x9=3u; y9=bot_vair-d-oo;
930 alpha1=diag_ratio(2,bot_stem,y1-y3,x4r-x1l-apex_corr);
931 alpha2=diag_ratio(1,bot_stem,y1-y9,x4r-x9);
932 if alpha1<alpha2: x2l-x1l=x4r-x3r+apex_corr; alpha=alpha1;
933 else: alpha=alpha2; z3l=whatever[z9,z4r-(alpha*bot_stem,0)]; fi
934 penpos3(alpha*bot_stem,0); penpos4(alpha*right_stem,0);
935 alpha3=(y1++(x2l-x1l))/y1;
936 penpos1(alpha3*left_stem,0); penpos2(alpha3*left_stem,0);
937 z0=whatever[z1r,z2r]=z4l+whatever*(z3r-z4r);
938 if y0>notch_cut: y0:=notch_cut;
939 fill z0+.5right{up}...{z4r-z3r}diag_end(0,4l,1,1,4r,3r)
940 --z3r--z2l--diag_end(2l,1l,1,1,1r,2r){z2-z1}
941 ...{down}z0+.5left--cycle; % left and right diagonals
942 else: fill z0--diag_end(0,4l,1,1,4r,3r)--z3r--z2l
943 --diag_end(2l,1l,1,1,1r,0)--cycle; fi % left and right diagonals
944 penpos5(alpha*bot_stem,0); z5r=whatever[z3r,z4r]; y5-.5vair=-.5d;
945 if serifs: numeric light_bulb; light_bulb=7/8[hair,flare]; clearpen;
946 penpos6(vair,-90); penpos7(hair,-180); penpos8(light_bulb,-180);
947 x6=2u; y6r=-d-oo; y8-.5light_bulb=-.85d; x8r=hround .35u;
948 fill stroke z3e---z5e...{left}z6e; bulb(6,7,8); % arc and bulb
949 numeric inner_jut; pickup tiny.nib;
950 prime_points_inside(1,2); prime_points_inside(4,3);
951 if rt x1'r+jut+.5u+1<=lft x4'l-jut: inner_jut=jut;
952 else: rt x1'r+inner_jut+.5u+1=lft x4'l-inner_jut; fi
953 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); % left serif
954 dish_serif(4',3,c,.6,inner_jut,d,1/2,outer_jut)(dark); % right serif
955 else: penpos6(bot_vair,-90); x6=2.5u; y6r=-d-oo;
956 fill stroke z3e---z5e...{left}z6e; % arc
957 pickup fine.nib; pos6'(bot_vair,-90); z6'=z6;
958 pos7(2/3[bot_vair,flare],-85);
959 lft x7l=hround u; bot y7r=vround-.96d-oo; y7l:=good.y y7l;
960 filldraw stroke term.e(6',7,left,1,4); fi % arc and terminal
961 currentpicture:=currentpicture rotatedaround ((.5w,.5h),180);
962 penlabels(0,1,2,3,4,5,6,7,8,9); endchar;
963
964 cmchar "The letter hausa K";
965 beginchar("K",13.5u#,cap_height#,0);
966 italcorr cap_height#*slant-.5u#;
967 adjust_fit(cap_serif_fit#,cap_serif_fit#);
968 numeric right_jut,stem[],alpha[];
969 if serifs: right_jut=.6cap_jut;
970 else: right_jut=.4tiny; fi
971 pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0);
972 lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0;
973 filldraw stroke z1e--z2e; % stem
974 stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr);
975 stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi);
976 top y3=h; rt x3r=hround(r-letter_fit-u-right_jut);
977 bot y6=0; rt x6r=hround(r-letter_fit-.75u-right_jut);
978 x4=x1; y4=1/3h;
979 alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4);
980 penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90);
981 alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1);
982 penpos6(alpha2*(stem2-tiny),0);
983 forsuffixes $=l,r: y3'$=.9h; y6'$=0; z4$=z3'$+whatever*(z3-z4);
984 z5$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor
985 z5=.5[z5l,z5r];
986 z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4);
987 % we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\]
988 z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6);
989 z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6);
990 fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal
991 fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal
992 if serifs: numeric inner_jut;
993 if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut;
994 else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi
995 dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif
996 dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); % lower stem serif
997 dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark);fi % lower diagonal serif
998 if serifs: z10r=z3'l; z10r-z10l=whatever*(z1-z6); z10l=whatever[z4r,z3'r];
999 pos7(vair,90); x7=hround(x3+.5u); top y7 = top y3;
1000 pos8(cap_hair,0); pos9(flare,0);
1001 y8= .3[y5r,y7]; rt x8r=hround(w);
1002 fill z10r{z3-z4}..top z7r{right}--bot z7l{left}...{z4-z3}z10l--cycle;
1003 % filldraw stroke z10e{z3-z4}...z7e{right};
1004 bulb(7,8,9); fi % bulb
1005 math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
1006
1007 cmchar "The letter hausa D";
1008 beginchar("T",15.5u#,cap_height#,0);
1009 italcorr .7cap_height#*slant-.5u#;
1010 adjust_fit(cap_serif_fit#,0);
1011 pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
1012 lft x1l=lft x2l=hround max(4u,5u-.5cap_stem'); top y1=h; bot y2=0;
1013 filldraw stroke z1e--z2e; % stem
1014 penpos3(cap_band,90); penpos4(cap_band,90);
1015 penpos5(cap_curve-stem_corr,0);
1016 penpos6(cap_band,-90); penpos7(cap_band,-90);
1017 z3r=top z1; y4=y3; y5=.51[y4,y6]; y6=y7;
1018 z7r=bot z2; x4=x6=.5(w+2u#)+.25u; x5r=hround(w-u);
1019 x4l:=x6l:=x4-.25cap_curve;
1020 fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe
1021 if serifs: nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); % upper serif
1022 nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif
1023 if serifs: pickup fine.nib; top y10r= y3r;
1024 pos8(flare,180); pos9(hair,180);
1025 pos10(cap_band,90); rt x8r=0; x10=lft x1l - .5cap_jut;
1026 y8=vround(.7h);
1027 bulb(10,9,8); fi % bulb
1028 math_fit(0,ic#-.5u#); penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
1029
1030 cmchar "The letter hausa B";
1031 beginchar("B",14.5u#,cap_height#,0);
1032 italcorr .75cap_height#*slant-.5u#;
1033 adjust_fit(cap_serif_fit#,0);
1034 numeric left_stem,right_curve,middle_weight;
1035 left_stem=cap_stem-hround 2stem_corr; middle_weight=.6vair+.5;
1036 pickup tiny.nib; pos1(left_stem,0); pos2(left_stem,0);
1037 lft x1l=lft x2l=hround max(4u,5u-.5left_stem); top y1=h; bot y2=0;
1038 filldraw stroke z1e--z2e; % stem
1039 penpos3(cap_band,90); penpos4(cap_band,90);
1040 penpos6(middle_weight,-90); penpos7(middle_weight,-90);
1041 penpos8(middle_weight,90); penpos9(middle_weight,90);
1042 penpos5(right_curve-stem_corr,0); penpos10(right_curve,0);
1043 penpos11(cap_band,-90); penpos12(cap_band,-90);
1044 z3r=top z1; y4=y3; y5=.5[y4,y6]; y6=y7; y7l-y8l=vair;
1045 z12r=bot z2; y11=y12; y10=.5[y11,y9]; y8=y9; .5[y7l,y8l]=.52h;
1046 x4=x6; x9=x11=x4+.5u; x7=x8=x1; x9l:=x4+.25u;
1047 x5r=hround(w-1.5u); x10r=hround(w-u);
1048 if serifs: right_curve=cap_curve-stem_corr; x4=.5[x1,w-1.5u];
1049 else: right_curve=cap_curve-3stem_corr; x4=.5[x1,w-2.5u];
1050 x4l:=x4l-.5u; x9l:=x9l-.5u; fi
1051 x6l:=x6l-.5u; x11l:=x11l-.5u;
1052 fill stroke z3e..super_arc.e(4,5) & super_arc.e(5,6)..z7e; % upper lobe
1053 fill stroke z8e..super_arc.e(9,10) & super_arc.e(10,11)..z12e; % lower lobe
1054 if serifs: nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,.5cap_jut); % upper serif
1055 nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif
1056 if serifs: pickup fine.nib; top y15r= y3r;
1057 pos13(flare,180); pos14(hair,180);
1058 pos15(cap_band,90); rt x13r=0; x15=lft x1l - .5cap_jut;
1059 y13=vround(.7h);
1060 bulb(15,14,13); fi % bulb
1061 math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;
1062
1063 cmchar "The letter rotated R";
1064 beginchar("R",if serifs: 12u#+.5max(2u#,cap_curve#)
1065 else:12.5u#-.5width_adj# fi,cap_height#,0);
1066 italcorr .75cap_height#*slant- if serifs: 1.75 else: .5 fi\\ u#;
1067 adjust_fit(cap_serif_fit#,0);
1068 pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
1069 lft x1l=lft x2l=hround max(2u,3u-.5cap_stem'); top y1=h; bot y2=0;
1070 filldraw stroke z1e--z2e; % stem
1071 penpos3(cap_band,90); penpos4(cap_band,90);
1072 penpos5(cap_curve if hefty:-3stem_corr fi,0);
1073 penpos6(vair,-90); penpos7(vair,-90);
1074 z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7;
1075 x7=x2; y7l=vround(.5h+.5vair); x4=x6;
1076 if serifs: x4=.5w-.5u; x5r=hround(w-2.25u);
1077 else: x4=.5w+.5u; x5r=hround(w-u); fi
1078 x4l:=x6l:=x4-.125cap_curve;
1079 fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe
1080 if serifs: pos6'(vair,-90); pos0(cap_stem,180);
1081 pos8(cap_curve,180); pos9(vair,-90); pos10(hair,0);
1082 z6'=z6; lft x0r=lft x8r=hround(x5-2/3u-.5cap_curve);
1083 y8=1/3[y2,y7]; y0=3/5[y2,y7]; x9=.5[x8l,x10r];
1084 bot y9r=-o; rt x10r=hround(w-.05u); y10=1/4[y2,y7];
1085 filldraw stroke z6'e{right}..z0e---z8e....z9e{right}..z10e{up}; % tail
1086 dish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif
1087 dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); % lower serif
1088 else: penpos8(cap_stem-2stem_corr,0); penpos9(cap_stem,0);
1089 x8=x6+.5u; y8=y6; x9r=hround(w-.5u); y9=0;
1090 fill z8l--diag_end(8l,9l,.5,1,9r,8r)--z8r--cycle; fi % tail
1091 math_fit(0,.75ic#);
1092 transform mirror; mirror=identity rotatedaround ((.5w,.5h),180)
1093 reflectedabout ((.5w,0),(.5w,h));
1094 currentpicture:=currentpicture transformed mirror;
1095 penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
1096
1097
1098 cmchar "Glottal stop";
1099 beginchar("?",8.5u#,asc_height#,0);
1100 italcorr .8asc_height#*slant;
1101 adjust_fit(0,0);
1102 pickup tiny.nib; pos7(stem',0); bot y7=0; x7=.47w;
1103 numeric bot_width;
1104 bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
1105 pickup fine.nib; pos2(vair,90); pos3(curve,0);
1106 pos4(vair,-90); pos5(stem',0); pos6(stem',0);
1107 x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.5[top y7r,x_height];
1108 top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
1109 {{interim superness:=more_super;
1110 filldraw stroke pulled_super_arc.e(2,3)(superpull)
1111 & subpath (0,1) of super_arc.e(3,4) .. z5e---z7e\\}}; % arc and stem
1112 if serifs: pos1(hair,180); pos0(flare,180);
1113 lft x1r=hround u; y1=y3; bulb(2,1,0); % bulb
1114 dish_serif(7,5,e,1/3,jut,f,1/3,jut); %serif
1115 else: pos1(vround 5/7[vair,flare],110);
1116 lft x1r=hround u; top y1r=vround .9[y6,top y2r];
1117 filldraw stroke term.e(2,1,left,1,4); fi % terminal
1118 penlabels(0,1,2,3,4,5,6,7); endchar;
1119
1120 cmchar "Upward harpoon";
1121 beginchar("z",9u#,asc_height#,asc_depth#);
1122 italcorr .76asc_height#*slant+.5crisp#-u#;
1123 adjust_fit(0,0); pickup crisp.nib;
1124 pos1(rule_thickness,0); pos2(rule_thickness,0);
1125 pos3(bar,90); pos4(bar,90);
1126 lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d;
1127 x0=x1=x2; top y0=h; x0-x3=x4-x0=3u+eps;
1128 y3=y4=y0-.24asc_height-eps;
1129 pos5(bar,angle(z4-z0)); z5l=z0;
1130 pos6(bar,angle(z3-z0)); z6l=z0;
1131 z9=.381966[.5[z3,z4],z0];
1132 numeric t; path p; p=z4l{z9-z4}..z6r;
1133 t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
1134 filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
1135 --z2r---z1r..z1l---z2l--(x2l,y0)--cycle; % arrowhead and stem
1136 penlabels(0,1,2,3,4,5,6,9); endchar;
1137
1138 cmchar "The letter variant u";
1139 beginchar(oct"012",10u#,x_height#,0);
1140 italcorr .75x_height#*slant-.5u#;
1141 adjust_fit(0,0);
1142 pickup tiny.nib; pos1(vair,90); pos2(curve,180);
1143 pos3(vair,180); pos4(curve,0); pos5(vair,0);
1144 x1=.5w; top y1r=h+o; lft x2r=hround u; y2=y4=2/3h; x4=w-x2;
1145 rt x3l=hround(1/3(w+.5u)+.5hair); bot y3=bot y5=0; x5=w-x3;
1146 filldraw stroke z3e{up}...{up}z2e
1147 & pulled_super_arc.e(2,1)(.5superpull)
1148 & pulled_super_arc.e(1,4)(.5superpull)
1149 & z4e{down}...{down}z5e; % bowl
1150 numeric arm_thickness; path p; p=z3{up}...{up}z2;
1151 arm_thickness=vround(if hefty:slab+2stem_corr else:.75[slab,vstem] fi);
1152 pickup crisp.nib; pos6(arm_thickness,-90); pos7(fudged.hair,-180);
1153 bot y6r=0; x6=x3; lft x7r=hround .8u;
1154 y7=good.y(y6l+.3beak)+eps;
1155 (x,y)=p intersectionpoint((0,y6l)--(w,y6l)); x6l:=x;
1156 arm(6,7,a,.5beak_darkness,-1.2beak_jut); % left arm and beak
1157 pos8(arm_thickness,-90); pos9(fudged.hair,0);
1158 y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
1159 arm(8,9,b,.5beak_darkness,1.2beak_jut); % right arm and beak
1160 math_fit(0,.5ic#);
1161 currentpicture:=currentpicture rotatedaround ((.5w,.5h),180);
1162 penlabels(1,2,3,4,5,6,7,8,9); endchar;
1163
1164 cmchar "The letter variant varu";
1165 beginchar(oct"010",11u#,x_height#,0);
1166 italcorr x_height#*slant;
1167 adjust_fit(0,0); pickup fine.nib;
1168 pos2(curve,-180); lft x2r=hround.5u; y2=y8=bar_height;
1169 y4=y6=vround.4h;
1170 %y1+.5hair=h; x1=x2+.75u; pos1(hair,angle(2(x1-x2),y1-y2)+90);
1171 y1r=h+oo; x1=.5w; pos1(hair,90);
1172 pos3(hair,-90); pos4(hair,0); pos5(vair,90);
1173 pos6(hair,180); pos7(hair,270); pos8(curve,360);
1174 bot y3r=bot y7r=-oo; top y5r=vround(.1[y4,h]+.5vair);
1175 x3=.5[x2,x4]; x7+.25u=.5[x6,x8]; rt x8r=hround(w-.5u);
1176 x5+.5stem=hround(.5w+.5stem)+eps;
1177 x5=.5[x4,x6]; rt x4r-lft x6r=min(stem,2hair)+2eps;
1178 if x4l<x6l: x4l:=x6l:=x5; fi
1179 filldraw circ_stroke z1e{left}...z2e{down}...z3e{right}
1180 ...{up}z4e...{left}z5e; % left arc
1181 filldraw stroke z5e{left}...z6e{down}...z7e{right}...{up}z8e...z1e{left};
1182 math_fit(-bar_height#*slant,2/3ic#); penlabels(1,2,3,4,5,6,7,8); endchar;
1183
1184
1185 cmchar "Lowercase Greek bar lambda";
1186 beginchar(oct"001",10.5u#,asc_height#,0);
1187 adjust_fit(0,0); pickup fine.nib;
1188 pos1(vair,90); lft x1=hround .1u; top y1r=h;
1189 x2=x1+2u; y2=.7[x_height,h]; x3=w-2u; bot y4=-oo; y3=max(.07h,y4+eps);
1190 z4-(.25u,0)=whatever[z2,z3]; numeric theta; theta=angle(z2-z3)-90;
1191 pos2(stem,theta); pos3(stem,theta); pos4(stem,0);
1192 filldraw circ_stroke z1e{right}...z2e---z3e
1193 ...{2(x4e-x3e),y4e-y3e}z4e; % long diagonal
1194 y5=.5[bar_height,x_height]; z5=whatever[z2,z3];
1195 x6=1.5u; y6-.5stem=-oo; pos5(hair,theta-90); pos6(stem,angle(z5-z6)-90);
1196 filldraw circ_stroke z6e--z5e; % short diagonal
1197 pos7(bar,90+theta); pos8(bar,90+theta);
1198 z7r=whatever[z1l,z6l]; z9=.8[z3,z2];z9=.5[z7,z8];
1199 (x9-x7)*(y2-y1)/(x2-x1)=y7-y9;
1200 showdependencies;
1201 %angle(z2-z3)+90=angle(z7-z8);
1202 filldraw stroke z7e--z8e;
1203 penlabels(1,2,3,4,5,6,7,8,9); endchar;
1204
1205
1206 cmchar "Lowercase Greek upsidedown iota";
1207 beginchar(oct"000",5u#,x_height#,0);
1208 italcorr x_height#*slant+.5hair#-u#;
1209 adjust_fit(if monospace: u#,u# else: 0,0 fi); pickup fine.nib;
1210 pos1(stem,0); rt x1r=hround(w-1.5u+.5stem); y1-.5stem=-oo;
1211 x2=x1+.25u; x4=0; hook_in(4,3,2); % opening hook
1212 filldraw circ_stroke z1e{up}...{u,x_height}z2e; % stem
1213 math_fit(0,ic#); penlabels(1,2,3,4); endchar;
1214
1215
1216 cmchar "The letter enya";
1217 beginchar(oct"116",10.5u#,x_height#,desc_depth#);
1218 italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
1219 adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
1220 pickup tiny.nib; pos1(stem,0); pos2(stem,0); pos8(stem',0);
1221 numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
1222 pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
1223 lft x1l=hround(3u-.5stem); x1l=x1'l=x2l=x2'l=x8l; x3=w+.5u-x1;
1224 top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
1225 bot y8=-1/3d;
1226 filldraw stroke z1'e--z2'e; % left stem
1227 h_stroke(8,a,3,4); % arch and right stem
1228 if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
1229 numeric inner_jut; pickup tiny.nib;
1230 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
1231 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
1232 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
1233 if serifs:
1234 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
1235 x5=.5[x8,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
1236 if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi;
1237 (x,y5r)=whatever[z5l,z8l]; x5r:=max(x,.5[x6r,x5]);
1238 filldraw stroke z8e{down}...z5e{left}; bulb(5,6,7); % arc and bulb
1239 else: pickup fine.nib; pos8'(stem',0); z8'=z8;
1240 pos6(.2[vair,stem'],-90); pos7(vair,-90);
1241 lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo);
1242 (x,y7l)=whatever[z7r,z3]; x7l:=x;
1243 z5r=z8'r; (x8'l,y5l)=whatever[z7l,z5r]; x5l=x8'l; y5=y5r;
1244 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
1245 filldraw stroke z8'e..{down}z5e & super_arc.e(5,6)
1246 & z6e{left}..z7e; fi % arc and terminal
1247 penlabels(1,2,3,4,5,6,7,8); endchar;
1248
1249
1250 cmchar "The ligature fj";
1251 beginchar(oct"106",10u#+2letter_fit#,asc_height#,desc_depth#);
1252 % written by Dimitri Vulis
1253 % mostly based on cm program for fi from romligs
1254 italcorr asc_height#*slant-serif_fit#+.5if serifs:stem# else:dot_size# fi-2u#;
1255 adjust_fit(0,serif_fit#);
1256 pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
1257 pos11(stem',0); rt x11r=hround(w-2.5u+.5stem');
1258 pos12(stem',0); x11=x12; bot y12=-1/3d;
1259 pickup fine.nib; numeric bulb_diam, inner_jut;
1260 if serifs: bulb_diam=hround 1/4[.8[stem,flare],dot_size];
1261 pos2(bulb_diam,0); x2r=x12r;
1262 y2+.5bulb_diam=.8[x_height,h+oo]; top y11=x_height+min(oo,serif_drop);
1263 if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
1264 else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
1265 else: bulb_diam=max(stem,dot_size);
1266 pos2(6/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u;
1267 pickup tiny.nib; pos13(bulb_diam,0); pos14(bulb_diam,90);
1268 x13=x11-.5; top y14r=min(2x_height,h+1); top y11=x_height;
1269 if bot y14l-x_height<tiny: y14l:=min(y14r-eps,y11+2tiny); fi
1270 x13=x14; y13=.5[y14l,y14r]; dot(13,14); % dot
1271 fi
1272 f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
1273 pickup tiny.nib; filldraw stroke z11e--z12e; % right stem
1274 pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
1275 pos3(bar,90); pos4(bar,90);
1276 if serifs: x4=x11; % bar will overlap upper right serif
1277 sloped_serif.l(11,12,d,1/3,jut,min(oo,serif_drop)); % upper right serif
1278 pickup tiny.nib; pos16(vair,-90); pos17(hair,-180); pos15(flare,-180);
1279 x16=.5[x12,x17r]; bot y16r=-d-oo; y17-.5flare=-.88d;
1280 if monospace: lft x17r=0 else: z17r=z15r; rt x17l=floor 5.25u fi;
1281 (x,y16r)=whatever[z16l,z12l]; x16r:=max(x,.5[x17r,x16]);
1282 filldraw stroke z12e{down}...z16e{left}; bulb(16,17,15); % arc and bulb
1283 else: pickup fine.nib; pos12'(stem',0); z12'=z12;
1284 pos17(.2[vair,stem'],-90); pos15(vair,-90);
1285 lft x15r=hround 3.75u; bot y15r=vround 5/6(-d-oo);
1286 (x,y15l)=whatever[z15r,z13]; x15l:=x;
1287 z16r=z12'r; (x12'l,y16l)=whatever[z15l,z16r]; x16l=x12'l; y16=y16r;
1288 x17r=.5[x15r,x16r]; x17l:=.5[x15l,x16l]; bot y17r=-d-oo;
1289 filldraw stroke z12'e..{down}z16e & super_arc.e(16,17)
1290 & z17e{left}..z15e; % arc and terminal
1291 rt x4= hround 5.3u;
1292 fi
1293 pickup crisp.nib; filldraw stroke z3e--z4e; % bar
1294 penlabels(1,2,3,4,11,12,13,14,15,16,17); endchar;
1295
1296 cmchar "The letter reverse D";
1297 beginchar(oct"002",13.5u#,cap_height#,0);
1298 italcorr .7cap_height#*slant-.5u#;
1299 adjust_fit(0,cap_serif_fit#);
1300 pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0);
1301 rt x1r=rt x2r=hround max(w-2u,w-3u+.5cap_stem'); top y1=h; bot y2=0;
1302 filldraw stroke z1e--z2e; % stem
1303 penpos3(cap_band,-90); penpos4(cap_band,-90);
1304 penpos5(cap_curve-stem_corr,0);
1305 penpos6(cap_band,90); penpos7(cap_band,90);
1306 z3l=top z1; y4=y3; y5=.51[y4,y6]; y6=y7;
1307 z7l=bot z2; x4=x6=.5w-.25u; x5l=hround(u);
1308 x4r:=x6r:=x4+.25cap_curve;
1309 fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe
1310 if serifs: nodish_serif(1,2,a,1/3,.5cap_jut,b,1/3,cap_jut); % upper serif
1311 nodish_serif(2,1,c,1/3,.5cap_jut,d,1/3,cap_jut); fi % lower serif
1312 math_fit(0,ic#-.5u#); penlabels(1,2,3,4,5,6,7); endchar;
1313
1314