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

cmchar "Cursive A";
beginchar(oct"001",10u#+serif_fit#,x_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem'); top y1=h+oo;
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=1/3[lft x2,edge]; y3=1/8[bar_height,x_height];
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...pulled_arc.e(4,5)
 & pulled_arc.e(5,6)...{up}z7e; % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
pickup tiny.nib; bot y2=if serifs:-min(oo,serif_drop) else: 0 fi;
filldraw stroke z0'e--z0e--z2e;  % stem
pickup crisp.nib;
pos8(hround(hair-stem_corr),0); pos7'(stem',0);
z7'=z0'; x8r=x7'r; top y8=h+oo;
filldraw stroke z7'e--z8e;
if serifs:  sloped_serif.r(2,0,b,1/3,jut,min(oo,serif_drop)); fi  % lower serif
penlabels(0,1,2,3,4,5,6,7,8); endchar;

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

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

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

cmchar "Beta";
beginchar(oct"006",9.0u#,asc_height#,desc_depth#);
italcorr .5[x_height#,asc_height#]*slant-u#;
adjust_fit(serif_fit#+.5u#,0); pickup tiny.nib;
pos0(stem,180); pos1(stem,180); pos2(vair,90);
pos3(stem,0); pos4(vair,-90); pos5(hair,-180);
pos6(vair,-270); pos7(curve,-360); pos8(vair,-450); pos9(1.25hair,-540);
pos0'(stem,0); pos1'(stem,0); z0'=z0; z1'=z1;
x0=x1=x9; lft x0r=hround u; x4=x6=x8=.5w+.25u; x2=.5w;
rt x3r=hround(w-1.5u); rt x7r=hround(w-1.5u+.5curve); rt x5l=hround(x4-u);
bot y0'=-d; top y6r+.5u=x_height; top y2r=h+oo; y1+o=y3=.5[y2,y4];
y5=.5[y4,y6]; y4l=y6l; bot y8=-oo; y7=y9=.5[y6,y8];
if y6l<y4l: y6l:=y4l:=y5; fi
pos4'(vair,-90); pos6'(vair,-270); z4'=z6'=z5;
filldraw stroke z0e---z1e...pulled_arc.e(2,3)
 & pulled_arc.e(3,4)...{left}z4'e;  % stem and upper bowl
filldraw stroke z6'e{right}...pulled_arc.e(6,7)
 & pulled_arc.e(7,8)...{up}z9e;  % lower bowl
if serifs: dish_serif(0',1',a,1/3,jut,b,1/3,jut); fi
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;

cmchar "Curly-tail C";
beginchar(oct"007",8u#,x_height#,desc_depth#);
italcorr x_height#*slant-.2u#;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
pickup fine.nib; pos2(vair',90); pos4(vair',270);
x2=x4=.5(w+u); top y2r=vround(h+1.5oo); bot y4r=-oo;
pos3(curve,180); lft x3r=hround max(.6u,1.35u-.5curve); y3=.5h;
if serifs: pos1(hair,0); pos0(flare,0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare);
 rt x1r=hround(w-.7u); bulb(2,1,0);  % bulb
 pos5(hair,0); rt x5r=hround(.92w);
 %y5=max(good.y(.4bar_height-.9),y4l+vair');
 y5=.35bar_height;
 (x,y4l)=whatever[z4r,z5l]; x4l:=min(x,x4l+.5u);
 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
  & pulled_super_arc.e(3,4)(.5superpull)
  ..tension .9 and 1..{up}z5e;  % arc and lower terminal
else: pos1(4/7[vair',flare],80);
 rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r];
 filldraw stroke term.e(2,1,right,.8,4);  % upper terminal
 pos5(.6[vair',flare],275); rt x5r=hround(w+.2u);
 y5r=good.y(y5r+1/4bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
 forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e;
  if angle direction 1 of p.e>75:
   p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor
 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
  & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi%arc and lower terminal
numeric edge; edge=lft x3l;path edge_path;
edge_path=(edge,h)--(edge,0);
pos6(hair,110);  x6l=.3[x4,x5];  y6=.6bar_height;
pos8(hair,180);  x8=u; bot y8=-.75d;
pos7(hair,180); x7=.65[x3r,x4r];
y7=ypart(edge_path intersectionpoint(z3r{down}...{right}z4r));
% filldraw stroke pulled_super_arc.e(5,6)(.9superpull){left}
%  ...z7e--z8e;
filldraw stroke z5e{up}...{(-5,-1)}z6e...z7e...{(-1,-2)}z8e;
penlabels(0,1,2,3,4,5,6,7,8); endchar;

cmchar "Stretched C";
beginchar(oct"010",8u#,asc_height#,desc_depth#);
italcorr x_height#*slant-.2u#;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
pickup fine.nib; interim superness:=more_super;
pos2(stem,90); pos5(stem,270);
x2=x5=.5w; top y2r=vround(h+1.5oo); bot y5r=-d-oo;
pos3(stem,180); pos4(stem,180); lft x3r=lft x4r=.6u; y3=.75h; y4=0;
pos1(stem,0); rt x1r=hround(w-.6u); top y1=vround .75h;
pos6(stem,0); rt x6r=hround(w-.5u); top y6=0;
filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & z3e--z4e & pulled_arc.e(4,5) & pulled_arc.e(5,6);
penlabels(0,1,2,3,4,5,6); endchar;

cmchar "Hooktop D";
beginchar(oct"011",10u#+serif_fit#,asc_height#,0);
italcorr asc_height#*slant+1.75u#;
adjust_fit(0,serif_fit#);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem'); top y1=h;
numeric edge; edge=lft x2l;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),1/3[lft x2,edge]);
y3=1/8[bar_height,x_height];
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...pulled_arc.e(4,5)
 & pulled_arc.e(5,6)...{up}z7e; % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
pickup tiny.nib; bot y2=if serifs:-min(oo,serif_drop) else: 0 fi;
filldraw stroke z0e--z2e;  % stem
if serifs: sloped_serif.r(2,0,b,1/3,jut,min(oo,serif_drop)); fi  % lower serif
penlabels(0,1,2,3,4,5,6,7);
%
% Hook-top
pickup fine.nib; numeric bulb_diam; bulb_diam=hround .8[stem,flare];
pos8(bulb_diam,0); y8+.5bulb_diam=.9[x_height,h+oo]; x8=x.a1+3u;
pickup tiny.nib;
pos a0(stem',180); x.a0l=x2r; y.a0=y0;
pos a1(stem',180); x.a1=x.a0; y.a1+.5vair=.5[x_height,asc_height];
pos a2(vair,90); top y.a2r=h+oo;
x.a2=.6[x.a1,x8r]; (x.a,y.a2r)=whatever[z.a2l,z.a1l];
x.a2r:=min(x.a,.5[x.a2,x8r]); pos a3(hair,0); bulb(a2,a3,8);  % bulb
filldraw stroke z.a0e--z.a1e & super_arc.e(a1,a2);  % arc
penlabels(8,a0,a1,a2,a3);
endchar;

cmchar "Right-tail D";
beginchar(oct"012",10u#,asc_height#,desc_depth#);
italcorr 1.75u#;
adjust_fit(0,serif_fit#-.5u#);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
 rt x1r=hround(w-2.5u+.5stem'+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; y2=-1/3d;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop);  % upper serif
 pickup fine.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; x10=x0+2.5u 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 "D-Yogh Digraph";
beginchar(oct"013",14u#,asc_height#,desc_depth#);
numeric d_w; d_w=10u+serif_fit;
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,.5serif_fit#);
% "d" shape
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(d_w-2.5u+.5stem'); top y1=h;
numeric edge; edge=lft x2l;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),1/3[lft x2,edge]);
y3=1/8[bar_height,x_height];
x4l=.5(d_w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...pulled_arc.e(4,5)
 & pulled_arc.e(5,6)...{up}z7e; % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
pickup tiny.nib; bot y2=.6bar_height;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
sloped_serif.l(1,0',a,1/3,jut,serif_drop);  % upper serif
penlabels(0,1,2,3,4,5,6,7);
% "Yogh" shape
numeric arm_thickness[],z_stem,stem[];
numeric w_s; w_s=6u;
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 x21r=rt x22r=hround(w-.8u); 
top y21=x_height; y22=min(y21,x_height-2/3arm_thickness1);
lft x23l=lft x24l=x2r+oo;
y24=y2; y23=max(y24,2/3arm_thickness2);
numeric alpha;
 alpha=diag_ratio(1,z_stem-tiny,y22-y23,x22r-x23l-slant*(y22-y23));
penpos21(alpha*(z_stem-tiny),0); penpos22(alpha*(z_stem-tiny),0);
penpos23(alpha*(z_stem-tiny),0); penpos24(alpha*(z_stem-tiny),0);
pair delta; delta=penoffset z23-z22 of currentpen;
fill top lft z21l--z22l+delta---z23l+delta..lft z23l---lft z24l..bot z24l
 ---bot rt z24r--z23r-delta---z22r-delta..rt z22r---rt z21r..top z21r
 ---cycle;  % diagonal
pickup crisp.nib; pos25(arm_thickness1,90); pos26(hair,180);
top y25r=x_height; x25=x21; lft x26r=hround(w_s+u);
y26=good.y(y25l-beak/1.4)-eps;
arm(25,26,g,beak_darkness,-.4beak_jut);  % upper arm and beak
pickup fine.nib; pos31(vair,-90);
pos32(vair,180); x32r=x23r;
x28=x33=hround .5[w_s+.5u, w-.8u];
pos27(curve,0); rt x27r=hround(w-.75u); lft x31=lft x24;
pos28(vair,-90); bot y28r=-d; pos33(vair, 90); y33=.1[y23,y25];
y27=.5[bot y33l,top y28l];
top y31l=top y24l; %vround(0+.5vair); 
y23=y32;
filldraw stroke pulled_arc.e(32,33); %link
filldraw stroke pulled_arc.e(33,27)
 & pulled_arc.e(27,28);  % bowl
numeric bulb_diam[];
 bulb_diam2=flare+cap_stem-stem;
 pos30(bulb_diam2,-180); pos29(cap_hair,-180);
 lft x30r=hround(w_s+.75u); y30=-.3d;
 bulb(28,29,30);  % lower bulb
penlabels(21,22,23,24,25,26,27,28,29,30,32,33);
% joint
x40=x40'=x2l; y40'=.2bar_height; y40=.5[y2,y40'];
%x32'r=x32l+oo; y32'=y32;
pickup tiny.nib; pos40(vair,0);
 filldraw stroke z2e--z40e;
pickup fine.nib; pos40'(vair,180); pos32'(vair,180);
 filldraw stroke z33e{left}...z32e...{z40'-z2}z40'e;
penlabels(40,40',32');
endchar;

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

cmchar "Right-hook Schwa";
beginchar(oct"016",11.5u#,x_height#,0);
italcorr .5[bar_height#,x_height#]*slant+.5u#;
adjust_fit(if monospace: .25u#,.5u# else: 0,0 fi);
numeric left_curve,right_curve;
left_curve=right_curve+6stem_corr=curve if not serifs: -3stem_corr fi;
numeric hook_w; hook_w=w-8u;
if right_curve<tiny.breadth: right_curve:=tiny.breadth; fi
if left_curve<tiny.breadth: left_curve:=tiny.breadth; fi
pickup tiny.nib; pos1(.5right_curve,0);
pos2(vair,90); pos3(left_curve,180);
y1=.7h; top y2r=h+vround 1.5oo;
rt x1r=hround min(w-.75u,w-1.25u+.5right_curve);
lft x3r=hround(hook_w+max(.5u,1.25u-.5left_curve));
x2=hook_w+.5(w-hook_w)+.25u;
{{interim superness:=more_super;
 filldraw stroke super_arc.e(1,2)}};  % right bowl
y3=.5[y2,y4]; bot y4r=-oo; x4=x2+.25u;
if serifs: pos4(vair,270); pos5(hair,360);
 y5=max(good.y(.5bar_height-.9),y4l+vair); x5r=x1r;
 (x,y4l)=whatever[z4r,z5]; x4l:=min(x,x4l+.5u);
 filldraw stroke pulled_arc.e(2,3) & pulled_arc.e(3,4)
  ...{x5-x4,5(y5-y4)}z5e; % left bowl, arc, and terminal
else: pos4(vair,270);
 filldraw stroke super_arc.e(2,3) & super_arc.e(3,4);  % left bowl and arc
 pickup fine.nib; pos4'(vair,270); z4=z4';
 pos5(.5[vair,flare],275); rt x5r=hround(w-.6u);
 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
 filldraw stroke term.e(4',5,right,1,4); fi  % terminal
pos0(hair,0); pos1'(hair,0);
z1'r=z1r; bot y0=0-oo; x0r=hround(x3r-1.75u)=x12r;
filldraw stroke z1'e--z0e;  % crossbar
%  hook
pos0'(1.5hair,0); pos12(1.5hair,0); pos13(hair,90); pos14(vair,180);
z0'r=z0r;
y14=.7[y0,y13]; x13=.5[x0,x14];
y12=.7[y0,y13];
bot y13l=.45h; x14=0;
filldraw stroke z14e{up}..z13e{right}...{down}z12e---z0'e;
currentpicture:=currentpicture rotatedabout((.5w,.5h),180);
penlabels(0,1,2,3,4,5,12,13,14); endchar;

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

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

cmchar "Closed Epsilon";
beginchar(oct"021",8.5u#,x_height#,0);
italcorr x_height#*slant-.5u#;
adjust_fit(0,.5u#);
numeric top_thickness,mid_thickness,bot_thickness;
top_thickness=max(fine.breadth,vround(slab-2vair_corr));
mid_thickness=max(fine.breadth,vround 2/3vair);
bot_thickness=max(fine.breadth,vround(slab-vair_corr));
pickup fine.nib; pos2(top_thickness,90); top y2r=h+o;
pos3(max(.6fine.breadth,.35[curve,cap_curve]-stem_corr),0);
rt x3r=hround(w-u);
pos4(vair,-90); pos5(vair,-90);
pos5'(slab,180); y5'=y5; x5'=0;
pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7];
pos7(max(.6fine.breadth,.35[curve,cap_curve]-stem_corr),0);
rt x7r=hround(w-.75u);
lft x5=min(hround 3.5u,lft x6)-eps;
pos8(bot_thickness,-90); bot y8r=-o;
y3=.5[top y4l,bot y2l]; y7=.5[bot y6l,top y8l];
top y5l=vround(.54h+.5vair); y5r=y6l;
x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h);
filldraw stroke z8e{left}...{up}z5'e...z2e
&pulled_super_arc.e(2,3)(.5superpull)
 & z3e{down}...z4e---z5e;  % upper bowl
filldraw z5r--z6l--z6r--z5l---cycle;  % middle tip
filldraw stroke pulled_super_arc.e(6,7)(.5superpull)
 & pulled_super_arc.e(7,8)(.5superpull);  % lower bowl
picture cepsilon;
cepsilon:=currentpicture reflectedabout((.5w,0),(.5w,h));
currentpicture:=cepsilon;
penlabels(2,3,4,5,6,7,8,,5'); endchar;

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

cmchar "Closed Reversed Epsilon";
beginchar(oct"023",8.5u#,x_height#,0);
italcorr x_height#*slant-.5u#;
adjust_fit(.5u#,0);
numeric top_thickness,mid_thickness,bot_thickness;
top_thickness=max(fine.breadth,vround(slab-2vair_corr));
mid_thickness=max(fine.breadth,vround 2/3vair);
bot_thickness=max(fine.breadth,vround(slab-vair_corr));
pickup fine.nib; pos2(top_thickness,90); top y2r=h+o;
pos3(max(.6fine.breadth,.35[curve,cap_curve]-stem_corr),0);
rt x3r=hround(w-u);
pos4(vair,-90); pos5(vair,-90);
pos5'(slab,180); y5'=y5; x5'=0;
pos6(mid_thickness,90); x2=x6=x8=.5[1.5u,x7];
pos7(max(.6fine.breadth,.35[curve,cap_curve]-stem_corr),0);
rt x7r=hround(w-.75u);
lft x5=min(hround 3.5u,lft x6)-eps;
pos8(bot_thickness,-90); bot y8r=-o;
y3=.5[top y4l,bot y2l]; y7=.5[bot y6l,top y8l];
top y5l=vround(.54h+.5vair); y5r=y6l;
x4=1/3[x5,x3l]; z4=z5+whatever*(150u,h);
filldraw stroke z8e{left}...{up}z5'e...z2e
&pulled_super_arc.e(2,3)(.5superpull)
 & z3e{down}...z4e---z5e;  % upper bowl
filldraw z5r--z6l--z6r--z5l---cycle;  % middle tip
filldraw stroke pulled_super_arc.e(6,7)(.5superpull)
 & pulled_super_arc.e(7,8)(.5superpull);  % lower bowl
penlabels(2,3,4,5,6,7,8,,5'); endchar;

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

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

cmchar "Gamma";
beginchar(oct"027",if serifs: 9.5u# else:9u# fi,x_height#,desc_depth#);
italcorr x_height#*slant+.25u#;
adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
numeric left_stem,right_stem,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=0;
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
numeric pos_cor; pos_cor=x4-x4l;  % .5right_stem
pickup penrazor;
penpos60(alpha*left_stem,0);
penpos61(alpha*left_stem,0);
penpos62(alpha*1.1right_stem,-90);
penpos63(alpha*right_stem,-180);
penpos64(alpha*right_stem,-180);
z60r=z64l=(z1r--z2r)intersectionpoint(z4r--z3r);
bot y62r=-d-oo; x62=x3;
z61=whatever[(x1-pos_cor,y1),(x2+pos_cor,y2)];
z63=whatever[z3l,z4r];
y61=y63=-.5d;
filldraw stroke z60e{((x2+pos_cor,y2)-(x1-pos_cor,y1))}
 ...z61e..{left}z62e..z63e...{(z4r-z3l)}z64e;
penlabels(0,1,2,3,4,60,61,62,63,64); endchar;

cmchar "Baby Gamma";
beginchar(oct"030",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=.45h;
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
pickup penrazor;
penpos60(alpha*left_stem,0);
penpos61(alpha*.8left_stem,10);
penpos62(alpha*right_stem,-90);
penpos63(alpha*right_stem,-180);
penpos64(alpha*right_stem,-180);
z60r=z0;
z64r=z2l; bot y62r=-d-oo; x62=x3;
z61=whatever[z1,z2]; z63=whatever[z3,z4];
y61=y63=.35h;
filldraw stroke z60e---z61e..{left}z62e..z63e---z64e;
penlabels(0,1,2,3,4,60,61,62,63,64); endchar;

cmchar "Ram's Horns";
beginchar(oct"031",9.5u#,x_height#,0);
italcorr x_height#*slant+.5hair#-1.5u#;
adjust_fit(0,0); pickup fine.nib;
pos1(hair,180); pos2(vair,80); pos5(vair,80); pos6(hair,180);
x1-.5hair=hround-.5hair+.5u; x6=w-x1; x2=w-x5=1.5u;
y1=y2l-h/8; top y2r=h+oo; bot y5l=-d-oo; y6=y5r+h/8;
z0=.5[z2,z5]; z2'=z2l+(.5u,0); z5'=z5r-(.5u,0);
numeric theta; theta=angle(z5'-z2')+90;
pos3(stem,theta); pos4(stem,theta);
y3r=y2r-h/8; z3l=whatever[z2',z0]; z4=whatever[z3,z0]; y4=2/3y0;
pos11(1.1hair,-90);
z11r=(x0,0);
filldraw stroke z1e{up}...z2e{right}...z3e---z4e...{left}z11e;
x8=w-x7=2.5u; y7+.5hair=h; y8-.5hair=-d;
numeric theta; theta=angle(z7-z8)-90;
pos7(hair,theta); pos8(hair,theta);
pos21(hair,theta-180); pos22(hair,theta-180); pos23(vair,90); pos24(hair,0);
z21=whatever[z7,z8]; z22=whatever[z7,z8];
y21l=y4; y22=y3; top y23r=h+oo; x23=w-x2; x24=w-x1; y24=y1;
filldraw stroke z11e{left}...z21e---z22e...{right}z23e...{down}z24e;
%filldraw z7l---z8l..z8r---z7r..cycle;  % minor diagonal
math_fit((desc_depth#-x_height#)*slant+ic#,ic#);
penlabels(0,1,2,2',3,4,5',5,6,7,8,11,12,21,22,23,24); endchar;

cmchar "Hooktop H";
beginchar(oct"032",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 "Hooktop Heng";
beginchar(oct"033",10u#,asc_height#,desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#if serifs:-.5u#fi);
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
x8=x4; bot y8=-1/3d; penpos8(x3r-x3l,0);   % stuff added
pickup tiny.nib; filldraw stroke z4e--z8e;  % right stem continuation
pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
 x5=.5[x8,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
 if monospace: lft x6r=0; else: z6r=z7r; lft x7r= rt x2r; fi 
 (x,y5r)=whatever[z5l,z8l]; x5r:=max(x,.5[x6r,x5]);
 filldraw stroke z8e{down}...z5e{left};  bulb(5,6,7);	% arc and bulb
penlabels(1,2,3,4,5,6,7,9,10,11); endchar;

cmchar "Turned H";
beginchar(oct"034",10u#,x_height#,desc_depth#);
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=x_height+d+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
currentpicture:=currentpicture rotatedaround((.5w,.5h),180);
penlabels(1,2,3,4); endchar;

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

def tmp_f_stroke(suffix $,$$,@,left_serif,right_serif)(expr left_jut,right_jut)=
 pickup tiny.nib; bot y$=0;
 penpos@0(x$r-x$l,0); x@0l=x$l; top y@0=x_height;
 filldraw stroke z$e--z@0e;  % stem
 %pickup fine.nib;
 penpos@0'(x$r-x$l,180); y@0'=y@0; x@0'=x$;
 penpos@1(x@0'l-x@0'r,180); x@1=x@0';
 y@1+.5vair=.35[x_height,x_height+desc_depth];
 pos@2(vair,90); top y@2r=x_height+desc_depth+oo;
 x@2=.6[x@1,x$$r]; (x@,y@2r)=whatever[z@2l,z@1l];
 x@2r:=min(x@,.5[x@2,x$$r]); pos@3(hair,0); bulb(@2,@3,$$);  % bulb
 filldraw stroke z@0'e--z@1e & super_arc.e(@1,@2);  % arc
 dish_serif($,@0,left_serif,1/3,left_jut,right_serif,1/3,right_jut); % serif
 penlabels(@0,@1,@2); enddef;

cmchar "Dotless J";
beginchar(oct"041",5.5u#,x_height#,desc_depth#);
%italcorr asc_height#*slant+if serifs:flare#-.25u# else: 1.25u# fi;
adjust_fit(stem_shift#,if monospace: .5u# else:-stem_shift# fi);
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pickup fine.nib; numeric bulb_diam;
if serifs: bulb_diam=hround .8[stem,flare];
 pos2(bulb_diam,0); y2+.5bulb_diam=.9[x_height,x_height+desc_depth+oo];
 if monospace: rt x2r=hround(w-.5u)+1 else: lft x2l=hround(w-.75u+.5) fi;
else: pos2(5/7[vair,flare],90); top y2r=x_height+desc_depth;
 rt x2=hround(if monospace:w-.5u else:w+.75u fi); fi
tmp_f_stroke(1,2,a,b,c,jut,1.25jut); % stem, terminal, serif
%pickup crisp.nib;
%top y3r=top y4r=x_height-.5(asc_height-x_height-desc_depth);
%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
currentpicture:=currentpicture rotatedaround((.5w,.5x_height),180);
penlabels(1,2,3,4); endchar;

cmchar "Hooktop Barred Dotless J";
beginchar(oct"042",6u#,.9asc_height#,desc_depth#);
italcorr h#*slant+1.5u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
x1=x2=.5w;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d;
filldraw stroke z1e--z2e;  % stem
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
%
% top-hook
pickup fine.nib; numeric bulb_diam;
if serifs: bulb_diam=hround .8[stem,flare];
pos8(bulb_diam,0); y8+.5bulb_diam=.85[x_height,h+oo];
if monospace: rt x8r=hround(w-.5u)+1 else: x8=x.a1+3u fi;
else: pos8(5/7[vair,flare],90); top y8r=h;
rt x8=hround(if monospace:w-.5u else:w+.75u fi); fi;
 pickup tiny.nib;
 penpos a0(x1r-x1l,0); x.a0l=x1l; top y.a0=y1;
 pickup fine.nib;
 %pos a0'(x1r-x1l-(hround stem_corr)+tiny,180);
 pos a0'(stem',180);
 y.a0'=y.a0; lft x.a0'r=tiny.lft x1l;
 penpos a1(x.a0'l-x.a0'r,180); x.a1=x.a0'; y.a1+.5vair=.4[x_height,h];
 pos a2(vair,90); top y.a2r=h+oo;
 if serifs: x.a2=.55[x.a1,x8r]; (x.a,y.a2r)=whatever[z.a2l,z.a1l];
  x.a2r:=min(x.a,.5[x.a2,x8r]); pos a3(hair,0); bulb(a2,a3,8);  % bulb
  filldraw stroke z.a0'e--z.a1e & super_arc.e(a1,a2);  % arc
 else: x.a2=.6[x.a1,x8]; y.a1l:=1/3[y.a1l,y.a2l];
  filldraw stroke z.a0'e--z.a1e & super_arc.e(a1,a2)
   & term.e(a2,8,right,.9,4); fi  % arc and terminal
%
pickup crisp.nib; bot y3l=bot y4l=0; lft x3=x2-2.5u; x4=w-x3;
pos3(bar,90); pos4(bar,90);
filldraw stroke z3e--z4e;	% bar
penlabels(1,2,3,4,5,6,7,8,a1,a2); endchar;

cmchar "Hooktop K";
beginchar(oct"043",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 "Turned K";
beginchar(oct"044",9.5u#,x_height#,desc_depth#);
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=x_height+d+min(oo,serif_drop); bot y2=0;
lft x1l=lft x2l=hround(2.5u-.5stem1);
top y3=x_height; rt x3r=hround(r-letter_fit-.7u-right_jut)+eps;
bot y6=0; rt x6r=hround(r-letter_fit-.3u-right_jut)+eps;
x4=x11=x1; y4=.7bar_height; y11=y3;
alpha1=diag_ratio(1,.5(stem3-tiny),y3-y4,x3r-x4);
alpha2=diag_ratio(1,.5(stem4-tiny),y11-y6,x6r-x1);
penpos3(alpha1*(stem3-tiny),0); penpos4(whatever,-90);
z5=.5[z5l,z5r]; penpos6(alpha2*(stem4-tiny),0);
forsuffixes $=l,r: y3'$=x_height; y6'$=0; z4$=z3'$+whatever*(z3-z4);
 z5$=z6'$+whatever*(z11-z6)=whatever[z3,z4]; endfor
z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4);
% we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\]
z6'r=z6r+penoffset z11-z6 of currentpen+whatever*(z11-z6);
z6'l=z6l+penoffset z6-z11 of currentpen+whatever*(z11-z6);
fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle;  % upper diagonal
fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle;  % lower diagonal
pos0(stem1,0); pos0'(stem2,0); y0=y0'; x0=x1; x0'=x2;
rt z0r=whatever[z3,z4]; filldraw stroke z1e..z0e--z0'e..z2e; % stem
if serifs: numeric inner_jut;
 if rt x2r+jut+.5u+1<=lft x6l-jut: inner_jut=jut;
 else: rt x2r+inner_jut+.5u+1=lft x6l-inner_jut; fi
 sloped_serif.l(1,0,a,1/3,jut,serif_drop); % upper stem serif
 dish_serif(2,0',b,1/3,jut,c,1/3,inner_jut);  % lower stem serif
 dish_serif(3,4,d,2/3,1.4jut,e,1/2,right_jut)(dark); % upper diagonal serif
 dish_serif(6,5,f,1/2,inner_jut,g,1/3,right_jut)(dark);fi % lower diagonal serif
currentpicture:=currentpicture rotatedabout((.5w,.5x_height),180);
penlabels(0,1,2,3,4,5,6,11); endchar;

cmchar "Belted L";
beginchar(oct"045",7u#,asc_height#,0);
l_width#:=5u#+2serif_fit#;
numeric hook_depth#; hook_depth#:=1.1desc_depth#;
define_whole_vertical_pixels(hook_depth);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
%"Polish hook"
x11=.5w+.25u;
if serifs: pickup crisp.nib; pos11(stem,180); pos12(stem,-90);
 pos13(vair,80); pos14(.8stem,180); pos15(vair,-60);
 x11=x12; z13r=z12r; x14=x12-3u; x15=x13+2.5u;
 bot y11=.75h-o; bot y12r=x_height; y14=y15;
 bot y15=.8x_height;
 filldraw stroke z13e{(-10,1)}...z14e{down}...{(1,1)}z15e;  % hook
else: pickup fine.nib; pos11(vair,0); top y11=-o-2;
 pos12(.5[vair,stem],0); bot y12=-d-o; x12=x11-1.5u;
 filldraw stroke z11e--z12e; fi  % diagonal
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2; top y1=h; bot y2=0;
filldraw stroke z1e--z2e;  % stem
if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop);  % upper serif
 dish_serif(2,1,b,1/3,jut,c,1/3,jut); fi  % lower serif
penlabels(1,2,11,12,13,14,15); endchar;

cmchar "Right-tail L";
beginchar(oct"046",5u#,asc_height#,desc_depth#);
italcorr 1.75u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#-.5u#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2; top y1=h; bot y2=-.2d;
filldraw stroke z1e--z2e;  % stem
if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop);fi% upper serif
%tail
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
define_whole_blacker_pixels(dot_diam);
 pickup tiny.nib; pos12(stem',180); z2=z12;
 pos15(vair,-90); pos16(hair,0); pos17(flare,0);
 x15=.5[x12,x16r]; bot y15r=-d-oo; y16-.5flare=-.88d;
 z16r=z17r; x17=x2+2.5u;
 filldraw stroke z12e{down}...{right}z15e{up};
 bulb(15,16,17); % arc and bulb
penlabels(1,2,15,16,17); endchar;

cmchar "Old L-Yogh Digraph";
beginchar(oct"050",9.5u#,asc_height#,desc_depth#);
italcorr x_height#*slant-.5serif_fit#-.3u#;
adjust_fit(serif_fit#+stem_shift#,.5serif_fit#);
pickup fine.nib;
pos1(vair,180); x1r=2.5u; y1=.72x_height;
pos2(.3[hair,stem],90); x2=.5w+u; top y2r=x_height+o;
pos3(stem,0); x3=x7-.5u; y3=.4[bar_height,x_height];
pos4(.5[hair,curve],-30); x4=.4[x3,x5]; y4=.6[y3,y5];
pos5(.7[hair,curve],0); x5r=.6[x8,x7r]; y5=.7bar_height;
pos6(.8[hair,curve],30); x6=.6[x5l,x7r]; y6=.45[y5,y7];
x8=hround .5[1.5u, w-.8u];
pos7(curve,0); rt x7r=hround(w-.75u); 
pos8(vair,-90); bot y8r=-d; y7=-.1d;
filldraw stroke z1e{up}...{right}z2e...{down}z3e..z4e...{down}z5e
 ...z6e...{down}z7e & 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 2u; y10=-.45d;
 bulb(8,9,10);  % lower bulb
else:  pos9(bot_thickness,angle(-2u,-x_height));
 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
% "l"
pickup tiny.nib; pos51(stem',0); pos52(stem',0);
if odd(w-stem'): change_width; fi
lft x51l=hround(2.5u-.5stem'); x51=x52; top y51=h; bot y52=0;
filldraw stroke z51e--z52e;  % stem
if serifs: sloped_serif.l(51,52,e,1/3,jut,serif_drop);  % upper serif
 dish_serif(52,51,f,1/3,jut,g,1/3,jut); fi  % lower serif
penlabels(51,52);
penlabels(1,2,3,4,5,6,7,8,9,10,12,13); endchar;

cmchar "Lambda";
beginchar(oct"051",9.5u#,asc_height#,0);
adjust_fit(0,0); pickup fine.nib;
pos1(hair,180); pos2(curve,80); pos5(curve,80); pos6(hair,180);
x1-.5hair=hround-.5hair+.5u; x6=w-x1; x2=2u; x5=w-1.5u;
y1=.5[y2l,y3]; top y2r=h+oo; bot y5l=-d-oo; y6=y5r+o;
z0=.5[z2,z5]; z2'=z2l+(.5u,0); z5'=z5r-(.5u,0);
numeric theta; theta=angle(z5'-z2')+90;
pos3(.6stem,theta); pos4(.6stem,theta);
y3r=y2r-h/4; y4l=y5l+h/4;
x3+1.25u=x4-1.25u=x0;
filldraw stroke z1e{up}...z2e{right}...z3e{z4r-z3l}
 ..z4e{z4r-z3l}...{right}z5e...{up}z6e;  % major diagonal and hooks
%y15=.5[bar_height,x_height];
y15=.55h;
z15=whatever[z3,z4];
x16=1.5u; y16-.5stem=-oo;
pos15(hair,theta-90); pos16(stem,angle(z15-z16)-90);
filldraw circ_stroke z16e--z15e; % short diagonal
penlabels(1,2,2',3,4,5,5',6,15,16); endchar;

cmchar "Left-tail M (at right)";
beginchar(oct"052",15u#,x_height#,desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift# if serifs:-.5u# fi);
numeric shaved_stem; shaved_stem=hround(mfudged.stem-2stem_corr);
pickup tiny.nib; pos1(mfudged.stem,0); pos2(mfudged.stem,0);
pos1'(shaved_stem,0); pos2'(shaved_stem,0);
pos3(mfudged.stem,0); pos5(mfudged.stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l;
lft x3l=hround(.5w-.5stem); x5-x3=x3-x1;
%if not monospace: r:=hround(x5+x1)-l; fi  % change width for better fit
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % left arch and middle stem
h_stroke(4,b,5,6);  % right arch and right stem
if serifs: sloped_serif.l(1',2',c,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,d,1/3,jut,e,1/3,jut); % lower left serif
 dish_serif(4,3,f,1/3,inner_jut,g,1/3,jut); % lower middle serif
x10=x6; bot y10=-1/3d; penpos10(x5r-x5l,0);   % stuff added
pickup tiny.nib; filldraw stroke z6e--z10e;  % right stem continuation
pickup tiny.nib; pos7(vair,-90); pos8(hair,-180); pos9(flare,-180);
 x7=.5[x10,x8r]; bot y7r=-d-oo; y8-.5flare=-.88d;
 if monospace: lft x8r=lft x4l; else: z8r=z9r; lft x9r= rt x4r; fi 
 (x,y7r)=whatever[z7l,z10l]; x7r:=max(x,.5[x8r,x7]);
 filldraw stroke z10e{down}...z7e{left};  bulb(7,8,9); fi  % arc and bulb
penlabels(1,2,3,4,5,6,7,8,9,10); endchar;

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

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

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

cmchar "Left-tail N (at left)";
beginchar(oct"056",10u#,x_height#,desc_depth#);
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); pos8(stem',0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l=x8l; x3=w-x1;
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
bot y8=-1/3d;
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(8,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
if serifs: 
 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
 x5=.5[x8,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
 if monospace: lft x6r=0 else: z6r=z7r; x7=x8-2.5u fi;
 (x,y5r)=whatever[z5l,z8l]; x5r:=max(x,.5[x6r,x5]);
 filldraw stroke z8e{down}...z5e{left};  bulb(5,6,7); % arc and bulb
else: pickup fine.nib; pos8'(stem',0); z8'=z8;
 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=z8'r; (x8'l,y5l)=whatever[z7l,z5r]; x5l=x8'l; y5=y5r;
 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
 filldraw stroke z8'e..{down}z5e & super_arc.e(5,6)
  & z6e{left}..z7e; fi  % arc and terminal
penlabels(1,2,3,4,5,6,7,8); endchar;

cmchar "Eng";
beginchar(oct"057",10u#,x_height#,desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift# if serifs:-.5u# fi);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
% dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
x8=x4; bot y8=-1/3d; penpos8(x3r-x3l,0);   % stuff added
pickup tiny.nib; filldraw stroke z4e--z8e;  % right stem continuation
pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
 x5=.5[x8,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
 if monospace: lft x6r=0; else: z6r=z7r; lft x7r= rt x2r; fi 
 (x,y5r)=whatever[z5l,z8l]; x5r:=max(x,.5[x6r,x5]);
 filldraw stroke z8e{down}...z5e{left};  bulb(5,6,7); fi  % arc and bulb
penlabels(1,2,3,4,5,6,7,8); endchar;

cmchar "Right-tail N";
beginchar(oct"060",10u#,x_height#,desc_depth#);
italcorr 1.75u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#-.5u#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
numeric inner_jut;
pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
pickup tiny.nib;
 pos5(stem,0); z5=(x4,-1/3d);
 pos5'(stem,-180); z5'=z5;
 pos8(vair,-90); pos9(hair,0); pos10(flare,0);
 x8=.5[x5',x9r]; bot y8r=-d-oo; y9-.5flare=-.88d;
 if monospace: rt x9r = w else: z9r=z10r; x10=x5+2.5u fi;
 %(xc,y8r)=whatever[z8l,z5'l]; x8r:=min(xc,.5[x9r,x8]);
 filldraw stroke z4e--z5e;
 filldraw stroke z5'e{down}...z8e{right}; bulb(8,9,10); % arc and bulb
penlabels(1,2,3,4,5,5',6,7,8,9,10); endchar;

cmchar "Bull's Eye";
beginchar(oct"062",asc_height#+2(u#+o#),asc_height#,0); autorounded;
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup light_rule.nib;
lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
circle_points; draw_circle;  % circle
fill fullcircle scaled(dot_size+eps) shifted(.5[z4,z8]);  % dot
labels(1,2,3,4,5,6,7,8); endchar;

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

cmchar "Closed Omega";
beginchar(oct"065",11u#,x_height#,0);
italcorr x_height#*slant;
adjust_fit(0,0); pickup fine.nib;
pos2(curve,-180); lft x2r=hround.5u; y2=y8=.45x_height;
y4=y6=vround.6h;
%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 "Hooktop P";
beginchar(oct"066",10u#+serif_fit#,asc_height#,desc_depth#);
italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#);
adjust_fit(serif_fit#-.5u#,0);
pickup tiny.nib; pos1(stem',0); pos2(stem,0); pos2'(stem,0);
pos0'(stem',0); pos0(stem,0); z0l=z0'l; x0'=x1; x0=x2=x2'; bot y2'=-d;
lft x1l=hround(2.5u-.5stem'); top y1=.25[x_height,h];
numeric edge; edge=rt x2r;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
pos4(vair,90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180);
rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l),1/3[rt x2,edge]);
y3=1/8[bar_height,x_height];
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x4,x5r]);
(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x6,x5r]);
filldraw stroke z3e{up}...pulled_arc.e(4,5)&pulled_arc.e(5,6)...{up}z7e; % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
y2=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{left}...{up}z7l));
pickup tiny.nib; filldraw stroke z1e--z0'e--z0e--z2e--z2'e;  % stem
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
z7'=z2; x8l=x7'l; bot y8=0;
filldraw stroke z7'e--z8e;  % point
if serifs: pickup tiny.nib;
 pos9(vair,-270); pos9'(vair,-90);z9=z9';x9=.5[x1,x10]; top y9r=h;
 pos10(hair,-360); rt x10r=w- hround u; y10=.75[x_height,h]-.5flare;
 pos11(flare,-360); %z11l=z10l;
 bulb(9,10,11); filldraw stroke super_arc.e(1,9');  % tail
 dish_serif(2',0,b,1/3,jut,c,1/3,jut);
else: pickup fine.nib; pos1'(stem,0); z1'=z1;
 z1''r=z1'r; z1''=z1'; z1''l=(x1'l,0);
 pos9(vair,-90); x9=4.5u; top y9l=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
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,2'); endchar;

cmchar "Phi";
beginchar(oct"067",11u#,asc_height#,desc_depth#);
italcorr .7x_height#*slant+.5curve#-u# if math_fitting:-.5u# fi;
adjust_fit(0,0); pickup tiny.nib;
numeric light_curve; light_curve=hround(.5[stem,curve]-2stem_corr);
pos1(vair,90); pos2(light_curve,180); pos3(vair,270); pos4(light_curve,360);
x1=x3=.5w; lft x2r=hround(1.5u-.5light_curve); x4=w-x2;
bot y1=x_height+oo; y2=y4=.5[y1,y3]; top y3=-oo+h-x_height-d;
filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1); % bowl
pos5(stem,0); pos6(stem,0); x5=x6=.5w; top y5=h; bot y6=-d;
filldraw stroke z5e--z6e;  % stem
if serifs: dish_serif(5,6,a,1/3,jut,b,1/3,jut);
 dish_serif(6,5,c,1/3,jut,d,1/3,jut); fi
penlabels(1,2,3,4,5,6); endchar;

cmchar "Hooktop Q";
beginchar(oct"070",10u#+serif_fit#,.9asc_height#,desc_depth#);
italcorr asc_height#*slant+2.25u#;
adjust_fit(0,serif_fit# if serifs: -.5u#fi);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem');
numeric edge; edge=lft x2l;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair',90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),2/3[lft x2,edge]); y3=bar_height;
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo; y7=min(y3,y6+y4-y3+.6vair);
lft x7l=min(lft x7l-(rt x7r-tiny.rt x2r),1/3[lft x2,edge]);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...{left}z4e&super_arc.e(4,5)
 &super_arc.e(5,6)&z6e{right}...{up}z7e;  % bowl
y1=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z6l{right}...{up}z7l));
pickup tiny.nib; bot y2=-d;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
pickup crisp.nib;
if serifs: dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi  % lower serif
penlabels(0,1,2,3,4,5,6,7,8);
%
% Hook-top
pickup fine.nib; numeric bulb_diam; bulb_diam=hround .8[stem,flare];
pos8(bulb_diam,0); y8+.5bulb_diam=.85[x_height,h+oo]; x8=x.a1+3u;
pickup tiny.nib;
pos a0(stem',180); x.a0l=x2r; y.a0=y1;
pos a1(stem',180); x.a1=x.a0; y.a1+.5vair=.4[x_height,h];
pos a2(vair,90); top y.a2r=h+oo;
x.a2=.6[x.a1,x8r]; (x.a,y.a2r)=whatever[z.a2l,z.a1l];
x.a2r:=min(x.a,.5[x.a2,x8r]); pos a3(hair,0); bulb(a2,a3,8);  % bulb
filldraw stroke z.a0e--z.a1e & super_arc.e(a1,a2);  % arc
penlabels(8,a0,a1,a2,a3);
endchar;

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

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

cmchar "Right-tail R";
numeric r_flare#; r_flare#=.75[if serifs: stem# else: vair# fi,flare#];
define_whole_blacker_pixels(r_flare);
beginchar(oct"074",max(7u#,5.5u#+r_flare#),x_height#,desc_depth#);
italcorr x_height#*slant if not serifs: +.25u# fi;
adjust_fit(serif_fit#,0);
pickup fine.nib; top y4r=h+oo;
if serifs: pos4(vair,90); pos5(hair,0);
 x4=w-max(1.75u,.25u+r_flare);
 rt x5r=hround(w-.5u+.5); y5+.5r_flare=.9[bar_height,h]+oo;
 pos6(r_flare,0); bulb(4,5,6);  % bulb
else: pos4(r_flare,90); rt x4=hround(w-.25u); fi
pos3(thin_join,180); rt x3l=hround(2.5u-.5stem')+stem'; top y3=bar_height;
filldraw stroke z3e{up}...{right}z4e;  % arc
pickup tiny.nib; pos0(stem',0); pos2(stem',0);
pos1(hround(stem-3stem_corr),0); top y1=h+min(oo,serif_drop);
pos0'(hround(stem-3stem_corr),0); y0=y0'=y3; x1l=x0l=x0'l=x2l;
lft x1l=hround(2.5u-.5stem'); bot y2=-1/3d;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); fi % upper serif
%tail
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
define_whole_blacker_pixels(dot_diam);
 pickup tiny.nib; pos12(stem',180); z2=z12;
 pos15(vair,-90); pos16(hair,0); pos17(flare,0);
 x15=.5[x12,x16r]; bot y15r=-d-oo; y16-.5flare=-.88d;
 z16r=z17r; rt x17l=w-1.4u;
 filldraw stroke z12e{down}...{right}z15e{up};
  bulb(15,16,17); % arc and bulb
penlabels(1,2,3,4,5,6,12,15,16,17); endchar;

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

cmchar "Turned R, Right Tail";
numeric r_flare#; r_flare#=.75[if serifs: stem# else: vair# fi,flare#];
define_whole_blacker_pixels(r_flare);
beginchar(oct"076",if serifs:max(7u#,5.5u#+r_flare#) else:6.5u# fi,
 x_height#,desc_depth#);
italcorr 1.5u#;
adjust_fit(serif_fit#,0);
pickup fine.nib; top y4r=x_height+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,x_height]+oo;
 pos6(r_flare,0); bulb(4,5,6);  % bulb
else: pos4(r_flare,90); rt x4=hround(w-.3u); fi
pos3(thin_join,180); rt x3l=hround(2.5u-.5stem')+stem';
top y3=bar_height;
filldraw stroke z3e{up}...{right}z4e;  % arc
pickup tiny.nib; pos0(stem',0); pos2(stem',0);
pos1(hround(stem-3stem_corr),0); top y1=x_height+1/3d;
pos0'(hround(stem-3stem_corr),0); y0=y0'=y3; x1l=x0l=x0'l=x2l;
lft x1l=hround(2.5u-.5stem'); bot y2=0;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
% hooktop
pickup tiny.nib;
 pos10(vair,90); x10=.6[x1,x12r]; top y10r=x_height+d+oo;
 pos11(hair,180); y11+.5flare=x_height+.88d;
 pos12(flare,180); x12=x1-2.5u;
 filldraw stroke z1e{up}...{left}z10e; bulb(10,11,12);  % arc and bulb
if serifs:
 dish_serif(2,0,b,1/3,jut,c,1/3,1.25jut); fi  % lower serif
currentpicture:=currentpicture rotatedabout((.5w,.5h),180);
penlabels(1,2,3,4,5,6,10,11,12); endchar;

cmchar "Esh";
beginchar(oct"101",5u#,asc_height#,desc_depth#);
italcorr asc_height#*slant+1.5u#;
adjust_fit(0,0); pickup tiny.nib;
pos1(curve,0); pos2(hair,0); pos3(vair,90); pos4(stem',180);
pos5(stem',180); pos5'(stem',0); z5'=z5; pos6(stem',0);
pos7(vair,-90); pos8(hair,-180); pos9(curve,-180);
x3=w-x7=.3[x1l,x5l];
x1=w-x9=x4l+2.25u;
x5=.5[x3,x7]; x4=w-x6=.5w;
y9-.5curve=vround(-.92d-o+vair); y3-y1=y9-y7;
top y3r=h+o; bot y7r=-d-o; y5=.5[y3,y7]=.5[y4,y6]; y4-y6=.7(y3-y7);
filldraw stroke z3e{left}...{down}z4e...z5e;  % upper stem
filldraw stroke z5'e...z6e{down}...{left}z7e;  % lower stem
bulb(3,2,1); bulb(7,8,9);  % bulbs
math_fit(0,-2u#); penlabels(1,2,3,4,5,6,7,8,9); endchar;

cmchar "Curly-tail Esh";
beginchar(oct"102",5u#,asc_height#,desc_depth#);
italcorr asc_height#*slant+1.5u#;
adjust_fit(0,0); pickup fine.nib;
pos1(curve,0); pos2(hair,0); pos3(vair,90); pos4(stem',180);
pos5(stem',180); pos5'(stem',0); z5'=z5; pos6(stem',0);
pos7(vair,-90); pos8(hair,-180); pos9(curve,-180);
pos10(hair,-270); pos11(hair,0);
x3=w-x7=.3[x1l,x5l];
x1=x4l+2.25u;
x5=.5[x3,x7]; x4=w-x6=.5w;
y9-.5curve=vround(-.9d-o+vair); y3-y1=y9-y7;
top y3r=h+o; bot y7r=-d-o; y5=.5[y3,y7]=.5[y4,y6]; y4-y6=2/3(y3-y7);
bulb(3,2,1); % upper bulb
z10=(.5w,-.2d);
x11r=.5w+2u; y11=-d-o; y8=-.7d; x8r=w-x1r;
filldraw stroke z3e{left}...{down}z4e...z5e;  % upper stem
filldraw stroke z5'e...z6e{down}...{left}z7e...z8e
 ...z10e...{down}z11e;  % lower stem
math_fit(0,-2u#); penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;

cmchar "Hooktop T";
beginchar(oct"103",6u#+max(u#,.5stem#),.9asc_height#,0);
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
adjust_fit(0,if serifs: 0 else: -.5u# fi);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2.5u-.5shaved_stem);
y2=y8; y3=max(.5bar_height,2vair);
pickup crisp.nib; pos8(bar,90);
rt x8=hround(w-1.3u); top y8r=x_height; lft x7=hround 1/3u; y7l=y8l;
pos7(bar,90); filldraw stroke z7e--z8e;  % crossbar
pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=.75h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2;
 filldraw stroke z1e--z2'e;  % upper terminal
pickup fine.nib; interim superness:=more_super;
%
numeric bulb_diam; bulb_diam=hround .8[stem,flare];
pos10(bulb_diam,0); y10+.5bulb_diam=.85[x_height,h+oo];
%if monospace: rt x10r=hround(w-.5u)+1 else: rt x10r=hround(w-u) fi;
x10=x.a1+3u;
pos a1(shaved_stem,180); x.a1=x2; y.a1+.5vair=.4[x_height,h];
pos a2(vair,90); top y.a2r=h+oo;
x.a2=.55[x.a1,x10r]; (x.a,y.a2)=whatever[z.a2l,z.a1l];
x.a2r:=min(x.a,.5[x.a2,x10r]); pos a3(hair,0); bulb(a2,a3,10);  % bulb
filldraw stroke z2e..super_arc.e(a1,a2);  % arc
%
pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u);
pos5(hair,0); y5=y3; x4l=.5[x3l,x5l];
 (x,y4r)=whatever[z4l,z5l]; x4r:=max(x,.5[x3r,x4]);
 filldraw stroke z2e..super_arc.e(3,4)...{up}z5e;  % stem and hook
 pickup crisp.nib; pos6(hair,0); pos5'(hair,0);
 x6=x5=x5'; top y6=max(vround .75bar_height,top y5); y5=y5';
 filldraw stroke z5'e--z6e;  % terminal
penlabels(1,2,3,4,5,6,7,8,10,a0,a1,a2); endchar;

cmchar "Right-tail T";
beginchar(oct"104",6u#+max(u#,.5stem#),
 min(asc_height#,if hefty:9/7 else:10/7 fi\\ x_height#),desc_depth#);
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
adjust_fit(0,if serifs: -.5u# else: -.5u# fi);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180); pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2.5u-.5shaved_stem);
y2=y8; y3=-.3d;
pickup crisp.nib; pos8(bar,90);
rt x8=hround(.93w-1.3u); top y8r=x_height; lft x7=hround 1/3u; y7l=y8l;
if hefty: pos7(bar,90);
 filldraw stroke z7e--z8e;  % crossbar
 pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2;
 filldraw stroke z1e--z2'e;  %terminal
else: pos7(vair,90); pos1(hair,0);
 rt x1r=fine.rt x2l; top y1=h;
 filldraw z1l{down}...{left}z7r--z7l--z8l
  --z8r--(x1r,y8r)--z1r--cycle; fi  % upper terminal and crossbar
pickup fine.nib;
 filldraw stroke z2e--z3e;  % stem
%tail
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
define_whole_blacker_pixels(dot_diam);
 pickup tiny.nib; pos15(vair,-90); pos16(hair,0); pos17(flare,0);
 x15=.5[x3,x16r]; bot y15r=-d-oo; y16-.5flare=-.88d;
 z16r=z17r; x17=x3+2.5u;
 filldraw stroke z3e{down}...{right}z15e{up};
 bulb(15,16,17); % arc and bulb
penlabels(1,2,3,7,8,15,16,17); endchar;

cmchar "T-S Digraph";
beginchar(oct"105",12u#,10/7x_height#,0);
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
adjust_fit(0,if serifs: 0 else: -.5u# fi);
%
% "t"
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2.5u-.5shaved_stem);
y2=y8; y3=max(.5bar_height,2vair);
pickup crisp.nib; pos8(bar,90);
rt x8=hround5u; top y8r=x_height; lft x7=hround 1/3u; y7l=y8l;
if hefty: pos7(bar,90);
 filldraw stroke z7e--z8e;  % crossbar
 pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2;
 filldraw stroke z1e--z2'e;  % upper terminal
else: pos7(vair,90); pos1(hair,0);
 rt x1r=fine.rt x2l; top y1=h;
 filldraw z1l{down}...{left}z7r--z7l--z8l
  --z8r--(x1r,y8r)--z1r--cycle; fi  % upper terminal and crossbar
pickup fine.nib; interim superness:=more_super;
pos4(vair',-90); bot y4r=-oo; rt x5r=hround7u;
pos5(hair,0); y5=.35bar_height; x4l=.5[x3l,x5l];
(x,y4r)=whatever[z4l,z5l]; x4r:=max(x,.5[x3r,x4]);
filldraw stroke z2e..super_arc.e(3,4); 	% stem
%
% "s"
numeric x_org; x_org=5u;
numeric theta;
 theta=90-angle(40u,x_height); slope:=-x_height/40u;  % angle at middle
numeric s_slab; s_slab=if serifs:vair else:Vround .1[vair,stem] fi;
numeric ess'; ess'=max(fine.breadth,ess);
pickup fine.nib; pos12(max(fine.breadth,s_slab-vround vair_corr),-100);
pos10(ess',theta); pos17(vair',-90); x12l=x10=x17=x_org+.5(w-x_org);
top y12l=x_height+vround 1.5oo; bot y17r=-oo;
y10-.5ess'=y17l+if serifs:.54 else: .52 fi\\(y12r-y17l-ess');
lft x13l=hround(x_org+.6u); rt x16r=hround(w-.6u);
x13r-x13l=x16r-x16l=hround .5[s_slab,ess']-fine;
ellipse_set(12l,13l,14l,10l); ellipse_set(12r,13r,14r,10r); y13=y13r;
ellipse_set(17l,16l,15l,10l); ellipse_set(17r,16r,15r,10r); y16=y16r;
interim superness:=more_super;
filldraw stroke super_arc.e(12,13) & z13e{down}
 ..z14e---z15e..z16e{down} & super_arc.e(16,17)..z4e;  % main stroke
pos11(hair,180); pos18(hair,180);
rt x11l=hround(w-1.05u); lft x18r=hround(x_org+.6u);
bot y11=min(bot y12r,vround 1/5[top y15r,x_height]);
top y18=max(top y17l,vround 5/6 bot y14l);
filldraw stroke z11e{up}....{left}z12e;  % upper arc
%filldraw stroke z17e{left}....{x18-x17,5(y18-y17)}z18e;  % lower arc
path upper_arc, lower_arc;
upper_arc=z11{up}....{left}z12; lower_arc=z17{left}....{x18-x17,5(y18-y17)}z18;
pos20(.3[fine.breadth,cap_hair],0); pos19(.3[fine.breadth,cap_hair],0);
x20r=x11l; top y20=top y12l; x19l=x18r; bot y19=bot y17r;
x11l-x11'=x18'-x18r=1.6cap_curve-fine; y11'=y11; y18'=y18;
numeric t; t=xpart(upper_arc intersectiontimes(z20l--z11'));
filldraw z11l--z20r--z20l--subpath(t,0) of upper_arc--cycle;  % upper barb
t:=xpart(lower_arc intersectiontimes(z19r--z18'));
%filldraw z18r--z19l--z19r--subpath(t,1) of lower_arc--cycle;  % lower barb
penlabels(1,2,3,4,5,6,7,8);
penlabels(10,11,11',12,13,14,15,16,17,18,18',19,20); endchar;

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

cmchar "Theta";
beginchar(oct"107",8.25u#,asc_height#,0);
italcorr .7asc_height#*slant+.5curve#-u#;
adjust_fit(0,0); pickup fine.nib;
pos1(vair,90); pos2(curve,180); pos3(vair,270); pos4(curve,360);
x1=x3=.5w; lft x2r=hround(1.5u-.5curve); x4=w-x2;
top y1r=h+oo; y2=y4=.5[y1,y3]; bot y3r=-oo;
filldraw stroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1);  % bowl
pos2'(bar,90); pos4'(bar,90); z2'=z2l; z4'=z4l;
filldraw stroke z2'e--z4'e;  % bar
math_fit(-.3asc_height#*slant-u#+.5curve#,ic#-.5u#);
penlabels(1,2,3,4); endchar;

cmchar "Upsilon";
beginchar(oct"110",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);
pos3(.5curve,180); pos4(curve,0); pos5(.5curve,0);
x1=.5w; top y1r=h+o; lft x2r=hround 1.25u; y2=y4=bar_height; x4=w-x2;
rt x3l=hround(1/3(w+.5u)); 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:.25[slab,vstem] fi);
pickup crisp.nib; pos6(arm_thickness,-90); pos7(fudged.hair,-90);
bot y6r=0; x6=x3; lft x7r=hround 1.0u; y7r=0;
(x,y)=p intersectionpoint((0,y6l)--(w,y6l)); x6l:=x;
filldraw stroke z6e--z7e;
pos8(arm_thickness,-90); pos9(fudged.hair,-90);
y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
filldraw stroke z8e--z9e;
%arm(8,9,b,.5beak_darkness,1.2beak_jut);  % right arm and beak
math_fit(0,.5ic#); 
  currentpicture:=currentpicture rotatedaround ((.5w,.5h),180);
penlabels(1,2,3,4,5,6,7,8,9); endchar;

cmchar "Cursive V";
beginchar(oct"111",9u#,x_height#,0);
italcorr x_height#*slant;
adjust_fit(0,0);
pickup tiny.nib; interim superness:=more_super;
pos3(stem,-180); lft x3r=hround(2.5u-.5stem);
x0=0; x2=x3; y2=h;
pos2'(stem,-180); z2'=z2; pos4(vair,-90); pos5(hair,0);
x4=.5w; rt x5r=hround(w-.5u); y3=.5[y4,y5]; bot y4r=-oo; y5=.57h;
filldraw stroke z2'e{down}--super_arc.e(3,4)
 ..tension atleast 1.05..{up}z5e; % left stem and arc
v_bulb(5,6);  % closing bulb
pos7(stem,0); pos8(stem,0); z7=z2; z8=z3;
sloped_serif.l(7,8,a,1/3,jut,serif_drop);
math_fit(-2/3x_height#*slant+.5hair#+.5u#,2/3ic#);
penlabels(0,1,2,3,4,5,6,7,8); endchar;

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

cmchar "Chi";
beginchar(oct"113",9.5u#,x_height#,desc_depth#);
italcorr x_height#*slant+.5hair#-1.5u#;
adjust_fit(0,0); pickup fine.nib;
pos1(hair,180); pos2(curve,80); pos5(curve,80); pos6(hair,180);
x1-.5hair=hround-.5hair+.5u; x6=w-x1; x2=w-x5=2u;
y1=y2l-h/6; top y2r=h+oo; bot y5l=-d-oo; y6=y5r+h/6;
z0=.5[z2,z5]; z2'=z2l+(.5u,0); z5'=z5r-(.5u,0);
numeric theta; theta=angle(z5'-z2')+90;
pos3(hair,theta); pos4(hair,theta);
y3r=y2r-h/3; y4l=y5l+h/3; %z3l=whatever[z2',z0]; z4r=whatever[z0,z5'];
x3r+u=x4l-u=.5w;
filldraw stroke z1e{up}...z2e{right}...z3e{z4r-z3l}
 ..z4e{z4r-z3l}...{right}z5e...{up}z6e;  % major diagonal and hooks
x8l=w-x7r=u; top y7=h; bot y8=-d;
%numeric theta; theta=angle(z7-z8)-90;
pos7(stem,0); pos8(stem,0);
filldraw stroke z7e--z8e;  % minor diagonal
math_fit((desc_depth#-x_height#)*slant+ic#,ic#);
penlabels(0,1,2,2',3,4,5',5,6,7,8); endchar;

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

cmchar "Curly-tail Z";
beginchar(oct"116",9u#,x_height#,desc_depth#);
italcorr x_height#*slant-.5serif_fit#-.3u#;
adjust_fit(0,.5serif_fit#);
numeric arm_thickness[],z_stem;
arm_thickness1=vair; arm_thickness2=1.2vair; z_stem=.9[vair,stem];
pickup tiny.nib; rt x1r=rt x2r=hround(.89w-.8u);
lft x3l=lft x4l=hround .5u;
top y1=h; y2=min(y1,h-2/3arm_thickness1);
bot y4=0; y3=max(y4,2/3arm_thickness2);
numeric alpha; alpha=diag_ratio(1,z_stem-tiny,y2-y3,x2r-x3l-slant*(y2-y3));
penpos1(alpha*(z_stem-tiny),0); penpos2(alpha*(z_stem-tiny),0);
penpos3(alpha*(z_stem-tiny),0); penpos4(alpha*(z_stem-tiny),0);
pair delta; delta=penoffset z3-z2 of currentpen;
fill top lft z1l--z2l+delta---z3l+delta..lft z3l---lft z4l..bot z4l
 ---bot rt z4r--z3r-delta---z2r-delta..rt z2r---rt z1r..top z1r
 ---cycle;  % diagonal
pickup crisp.nib; pos5(arm_thickness1,90); pos6(hair,180);
top y5r=h; x5=x1; lft x6r=hround .75u; y6=good.y(y5l-beak/1.4)-eps;
arm(5,6,a,beak_darkness,-.4beak_jut);  % upper arm and beak
pos7(arm_thickness2,90); pos8(arm_thickness2,90);
 x7=x4; bot y8l=bot y7l=y8'=0;
 pos8'(hair,-45);  x8'=.5[x7,x8];
 pos11(hair,180); rt x11l=hround(w-.25u); y11=.5[y9r,y8r];
 pos9(hair,-80);  x9-.5u=x8=.7[x7,x11]; y9=.35h;
 pos10(hair,0);  x10l=2u; bot y10=-.75d;
filldraw stroke z7e--z8e{right}...{up}z11e...{(-5,-1)}z9e
 ...z8'e...{(-1,-2)}z10e;
%..{down}z8'e{down}---z10e;
penlabels(1,2,3,4,5,6,7,8,8',9,10,11); endchar;

cmchar "Yogh";
beginchar(oct"117",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 "Curly-tail Yogh";
beginchar(oct"120",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);
 pos21(hair,-270); pos22(hair,0);
 lft x10r=hround .75u; y10=-.3d; %max(.1h+.5bulb_diam2,.3h-.5bulb_diam2);
 x21=.5(w-u); y21=0; lft x22l=w-u; y22=-d-o; x9=u; y9=.5[y8,y21];
 filldraw stroke z8e{left}...{up}z9e...{right}z21e..z22e;
 %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,21,22); endchar;

cmchar "Glottal stop";
beginchar(oct"121",9u#,asc_height#,0);
italcorr .8asc_height#*slant;
adjust_fit(0,0);
pickup tiny.nib; pos7(stem,0); bot y7=0; x7=.47w;
%pickup fine.nib;
pos2(vair,90); pos3(curve,0);
pos4(vair,-90); pos5(stem,0); pos6(stem,0);
x2=x5=x6=x7; x4=x5l;
rt x3r=hround(w-u); bot y6=.3x_height;
top y2r=h+oo; y3=.5[y2,y4]; y4r=.5y2; y5=y4l;
{{interim superness:=more_super;
 filldraw stroke pulled_super_arc.e(2,3)(superpull)
  & z3e{down}...{(-10,-1)}z4e;
 filldraw stroke z5e--z7e\\}};  % arc and stem
if serifs: pos1(hair,180); pos0(flare,180);
 lft x1r=hround u; y1=.3[y3,y2]; 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 "Inverted Glottal Stop";
beginchar(oct"122",9u#,asc_height#,0);
italcorr .8asc_height#*slant;
adjust_fit(0,0);
pickup tiny.nib; pos7(stem,0); bot y7=0; x7=.47w;
%pickup fine.nib;
pos2(vair,90); pos3(curve,0);
pos4(vair,-90); pos5(stem,0); pos6(stem,0);
x2=x5=x6=x7; x4=x5l;
rt x3r=hround(w-u); bot y6=.3x_height;
top y2r=h+oo; y3=.5[y2,y4]; y4r=.5y2; y5=y4l;
{{interim superness:=more_super;
 filldraw stroke pulled_super_arc.e(2,3)(superpull)
  & z3e{down}...{(-10,-1)}z4e;
 filldraw stroke z5e--z6e\\}};  % arc and stem
if serifs: pos1(hair,180); pos0(flare,180);
 lft x1r=hround u; y1=.3[y3,y2]; 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
currentpicture:=currentpicture reflectedabout((0,.5h),(w,.5h));
penlabels(0,1,2,3,4,5,6,7); endchar;

cmchar "Reversed Glottal Stop";
beginchar(oct"123",9u#,asc_height#,0);
italcorr .8asc_height#*slant;
adjust_fit(0,0);
pickup tiny.nib; pos7(stem,0); bot y7=0; x7=.47w;
%pickup fine.nib;
pos2(vair,90); pos3(curve,0);
pos4(vair,-90); pos5(stem,0); pos6(stem,0);
x2=x5=x6=x7; x4=x5l;
rt x3r=hround(w-u); bot y6=.3x_height;
top y2r=h+oo; y3=.5[y2,y4]; y4r=.5y2; y5=y4l;
{{interim superness:=more_super;
 filldraw stroke pulled_super_arc.e(2,3)(superpull)
  & z3e{down}...{(-10,-1)}z4e;
 filldraw stroke z5e--z7e\\}};  % arc and stem
if serifs: pos1(hair,180); pos0(flare,180);
 lft x1r=hround u; y1=.3[y3,y2]; 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
currentpicture:=currentpicture reflectedabout((.5w,0),(.5w,h));
penlabels(0,1,2,3,4,5,6,7); endchar;

cmchar "Hooktop";
beginchar(oct"124",3u#,asc_height#,0);
italcorr x_height#*slant + 2.25u#;
adjust_fit(0,0);
pickup fine.nib; top y4r=.8h+oo;
pos4(vair,90); pos5(hair,0);
x4=w+.25u;
rt x5r=hround(w+1.75u); y5=x_height+.5(y4-x_height);
pos6(flare,0); bulb(4,5,6);  % bulb
pickup tiny.nib;
x2=x3=good.x .5w;
pos2(hair,180); pos3(hair,180);
y3=x_height; y2=x_height-flare;
%filldraw stroke z2e--z3e{up}...{right}z4e;  % arc
draw z2--z3{up}...{right}z4;  % arc
penlabels(1,2,3,4,5,6); endchar;

cmchar "Old Right-hook";
beginchar(oct"125",3u#,0,desc_depth#);
italcorr 2.25u#;
adjust_fit(0,0);
pickup fine.nib; pos2(hair,-180); pos3(hair,-180);
pos8(vair,-90); pos9(hair,0); pos10(flare,0);
x8=w+.25u; bot y8r=-d-oo; y9-.5flare=-.88d;
z9r=z10r; rt x9r=hround(w+1.75u);
bulb(8,9,10); % arc and bulb
pickup tiny.nib;
x2=x3=good.x .5w; y2=oo; y3=-1/3d;
draw z2--z3{down}...z8{right};
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

cmchar "Seagull";
beginchar(oct"126",9u#,asc_height#,0);
adjust_fit(0,0);
pickup fine.nib;
pos1(vair,90);
pos2(hair,90); pos3(vair,90); pos4(hair,90);
pos5(vair,90);
x1=w-x5=1.5u; x3=.5w; x2=w-x4=.5[x1,x3];
top y2r=top y4r=h-o; bot y1l=top y3r=bot y5l=.55[x_height,h];
filldraw stroke z1e{(1,2)}...{right}z2e...{down}z3e
 & z3e{up}...{right}z4e...{(1,-2)}z5e;
penlabels(1,2,3,4,5); endchar;

cmchar "Subscript Bridge";
beginchar(oct"127",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
lft x1=lft x2=hround(.5w-2.5u); x3=x4=w-x1;
top y1=top y3=h-o; top y1-bot y2=2.75u; y2=y4;
draw z2--z1--z3--z4;
penlabels(1,2,3,4); endchar;

cmchar "Inverted Subscript Bridge";
beginchar(oct"130",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
lft x1=lft x2=hround(.5w-2.5u); x3=x4=w-x1;
top y1=top y3=h-o; top y1-bot y2=2.75u; y2=y4;
draw z1--z2--z4--z3;
penlabels(1,2,3,4); endchar;

cmchar "Subscript Square";
beginchar(oct"131",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
lft x1=lft x2=hround(.5w-2.5u); x3=x4=w-x1;
top y1=top y3=vround(h-o); bot y2=vround(top y1-2.75u); y2=y4;
draw z1--z2--z4--z3--z1;
penlabels(1,2,3,4); endchar;

cmchar "Subscript Right Half-ring";
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"132",4.5u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
autorounded;
rt x2=hround(w-u)+eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]; top y1=vround(h-o);
draw z1{right}...z2{down}...z3{left};
penlabels(1,2,3,); endchar;

cmchar "Subscript Left Half-ring";
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"133",4.5u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
autorounded;
lft x2=hround u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]; top y1=vround(h-o);
draw z1{left}...z2{down}...z3{right};
penlabels(1,2,3,); endchar;

cmchar "Subscript Plus";
beginchar(oct"134",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
top y3=round(h-o); bot y4=round x_height; x3=x4=good.x .5w;
lft x1=hround(.5(w-(top y3-bot y4))); x2=w-x1; y1=y2=good.y .5[y3,y4];
draw z1--z2; draw z3--z4;
penlabels(1,2,3,4); endchar;

cmchar "Over-cross";
beginchar(oct"135",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
lft x1=lft x2=hround(.5w-2.5u); x3=x4=w-x1;
%top y1=top y3=h-o; bot y2=bot y4=.2[x_height,h];
top y1=top y3=vround(h-o); bot y2=vround(top y1-3u); y2=y4;
draw z1--z4;
draw z2--z3;
penlabels(1,2,3,4); endchar;

cmchar "Vertical Stroke (Superior)";
beginchar(oct"136",3u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
x1=x2=good.x .5w; y1-y2=4u; top y1=h-o;
draw z1--z2;
penlabels(1,2,3,4); endchar;

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

cmchar "Right-hook";
beginchar(oct"140",5u#,x_height#,0);
adjust_fit(0,0);
pickup fine.nib;
x1=0; x2l=1.5u; y1l=y2r-o; top y2l=h+oo; z3r=z2l;
pos1(.6stem,-80); pos2(.6stem,-80);
pos3(.65stem,45); pos4(.6stem,45); pos5(.6stem,80); pos6(vair,120);
x4=.45[x3,x5]; x5l=.4[x2,x6]; y4=.6[y2r,y5r]; y5l=bar_height;
top y6=.5[bar_height,h]; rt x6=w-.75u;
filldraw stroke z1e--z2e;
filldraw stroke z3e..z4e..z5e & z5e{(4,1)}...{(1,2)}z6e;
penlabels(1,2,3,4,5,6); endchar;

cmchar "Corner";
beginchar(oct"141",6u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
lft x1=hround u; x2=x3=good.x(w-x1); top y1=top y2=h-o; y2-y3=x2-x1;
draw z1--z2--z3;
penlabels(1,2,3); endchar;

cmchar "Superimposed Tilde";
beginchar(oct"142",10u#,.5[asc_height#,body_height#],0);
big_tilde; endchar;

cmchar "Raising Sign";
beginchar(oct"143",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
x1=w-x2; x3=x4=good.x(.5[x1,x2]); x2-x1=4u;
y1=y2=y4; top y3=vround(h-o); y4=good.y(y3-3u);
draw z1--z2; draw z3--z4;
penlabels(1,2,3,4,5,6); endchar;

cmchar "Lowering Sign";
beginchar(oct"144",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
x1=w-x2; x3=x4=good.x(.5[x1,x2]); x2-x1=4u;
top y1=vround(h-o); y1=y2=y3; y4=vround(y3-3u);
draw z1--z2; draw z3--z4;
penlabels(1,2,3,4); endchar;

cmchar "Advancing Sign";
beginchar(oct"145",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
x2=x3=x4=good.x(.5w+u); x1=good.x(x2-3u);
top y3=vround(h-o); y4=vround(y3-4u); y1=y2=good.y(.5[y3,y4]);
draw z1--z2; draw z3--z4;
penlabels(1,2,3,4,5,6); endchar;

cmchar "Retracting Sign";
beginchar(oct"146",9u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
x1=x3=x4=good.x(.5w-u); x2=good.x(x1+3u);
top y3=vround(h-o); y4=vround(y3-4u); y1=y2=good.y(.5[y3,y4]);
draw z1--z2; draw z3--z4;
penlabels(1,2,3,4,5,6); endchar;

cmchar "Length Mark";
beginchar(oct"147",5u#,asc_height#,0);
adjust_fit(0,0);
numeric edge_length; edge_length=2.5u;
pickup tiny.nib; 
x1=w-x2; x3=.5[x1,x2]; x2-x1=edge_length;
top y1=top y2=x_height+oo; y1-y3=edge_length;
filldraw z1--z2--z3--cycle;
%
x5=w-x6; x4=.5[x5,x6]; x6-x5=edge_length;
bot y5=bot y6=-oo; y4-y5=edge_length;
filldraw z4--z5--z6--cycle;
penlabels(1,2,3,4,5,6); endchar;

cmchar "Half-length Mark";
beginchar(oct"150",5u#,asc_height#,0);
adjust_fit(0,0);
numeric edge_length; edge_length=2.5u;
pickup tiny.nib; 
x1=w-x2; x3=.5[x1,x2]; x2-x1=edge_length;
top y1=top y2=x_height+oo; y1-y3=edge_length;
filldraw z1--z2--z3--cycle;
%
penlabels(1,2,3,4,5,6); endchar;

cmchar "Bottom Tie Bar";
beginchar(oct"151",14u#,v_center(.35x_height#));
adjust_fit(0,0); pickup fine.nib;
numeric light_stem; light_stem=Vround .5[vair,stem];
x1-.5hair=hround u; y1+.5hair=vround(h+.5hair); x3=w-x1; y3=y1;
pos2(light_stem,90); x2=.5w; y2l=good.y -d;
numeric theta; theta=angle((z2-z1)yscaled 3);
pos1(hair,90+theta); pos3(hair,90-theta);
filldraw z1l{dir theta}...z2l...{dir-theta}z3l
 ..z3r{-dir-theta}...z2r...{-dir theta}z1r..cycle;  % arc
penlabels(1,2,3); endchar;

cmchar "Top Tie Bar";
beginchar(oct"152",14u#,v_center(.35x_height#));
adjust_fit(0,0); pickup fine.nib;
numeric light_stem; light_stem=Vround .5[vair,stem];
x1-.5hair=hround u; y1-.5hair=vround(-d-.5hair); x3=w-x1; y3=y1;
pos2(light_stem,90); x2=.5w; y2=good.y h;
numeric theta; theta=angle((z2-z1)yscaled 3);
pos1(hair,90+theta); pos3(hair,90-theta);
filldraw z1l{dir theta}...z2l...{dir-theta}z3l
 ..z3r{-dir-theta}...z2r...{-dir theta}z1r..cycle;  % arc
penlabels(1,2,3); endchar;

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

cmchar "Subscript W";
beginchar(oct"154",9u#,asc_height#,0);
adjust_fit(0,0);
pickup fine.nib;
%pickup rule.nib;
pos2(vair,-210); lft x2r=hround 1.5u; top y2=top y8=vround(h-o); y4=y6=y2-vair;
pos3(hair,-90); pos4(vair,10); pos5(vair,90);
pos6(vair,170); pos7(hair,270); pos8(vair,30);
bot y3r=bot y7r=.4[x_height,h];
top y5r=vround(.1[y4,h]+.5vair);
x3=.4[x2,x4]; x7=w-x3; x8=w-x2; x5=x4=x6=good.x .5w;
filldraw circ_stroke z2e{(-1,-2)}...z3e{right}...{(-1,5)}z4e;
filldraw circ_stroke z6e{(-1,-5)}...z7e{right}...{(-1,2)}z8e;
%draw z2{(-1,-2)}...z3{right}...{(-1,5)}z4;
%draw z6{(-1,-5)}...z7{right}...{(-1,2)}z8;
math_fit(-bar_height#*slant,2/3ic#); penlabels(1,2,3,4,5,6,7,8); endchar;

cmchar "Acute Accent (under)";
beginchar(oct"155",9u#,asc_height#,0);
adjust_fit(0,0);
pickup crisp.nib; x1-.5stem=hround 2u; x2=2/3[x1,w-x1];
y2+.5stem=h+eps; y1=max(2/3[h,x_height],x_height+o+hair);
numeric theta; theta=angle(z2-z1)+90;
pos1(stem,theta); pos2(hair,theta);
filldraw circ_stroke z1e--z2e;
penlabels(1,2); endchar;

cmchar "Grave Accent (under)";
beginchar(oct"156",9u#,asc_height#,0);
adjust_fit(0,0);
pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1];
y2+.5stem=h+eps; y1=max(2/3[h,x_height],x_height+o+hair);
numeric theta; theta=angle(z2-z1)+90;
pos1(stem,theta); pos2(hair,theta);
filldraw circ_stroke z1e--z2e;
penlabels(1,2); endchar;

cmchar "Palatalization Hook";
beginchar(oct"157",3u#,0,desc_depth#);
adjust_fit(0,0);
pickup fine.nib; pos2(hair,-180); pos3(hair,-180);
pos8(vair,-90); pos9(hair,0); pos10(flare,0);
x8=w+.25u; bot y8r=-d-oo; y9-.5flare=-.88d;
z9r=z10r; rt x9r=hround(w+1.75u);
bulb(8,9,10); % arc and bulb
pickup tiny.nib;
x2=x3=good.x .5w; y2=oo; y3=-1/3d;
%filldraw stroke z2e--z3e{down}...z8e{right};
draw z2--z3{down}...z8{right};
currentpicture:=currentpicture reflectedabout((x2,0),(x2,-d));
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

cmchar "Rectangle";
beginchar(oct"160",5u#,asc_height#,0);
adjust_fit(0,0);
pickup tiny.nib;
lft x1=lft x2=hround u; x3=x4=w-x1;
top y1=top y3=vround(h-oo); bot y2=bot y4=vround x_height;
draw z1--z2--z4--z3--cycle;
penlabels(1,2,3,4,5); endchar;

cmchar "Polish Hook";
beginchar(oct"161",6u#,0,desc_depth#);
adjust_fit(0,0);
pickup fine.nib;
pos1(vair,-60); pos2(stem,10); pos3(.7stem,80); pos4(vair,135);
x1-u=x4-2u=.5w; y1=0; y2l=y4r=-3/5d; bot y3l=-d-oo;
x3r=.7[x4r,x2r]; x2l=u;
filldraw circ_stroke z1e{(-3,-1)}...{down}z2e...{right}z3e...{(1,1)}z4e;
%filldraw circ_stroke z1e{(-3,-1)}...{down}z2e...{(2,1)}z4e;
penlabels(1,2,3,4); endchar;

cmchar "Curly-tail D";
beginchar(oct"162",10u#+serif_fit#,asc_height#,desc_depth#);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,serif_fit#+u#);
pickup tiny.nib; pos1(stem',0); pos2(stem,0);
pos0'(stem',0); pos0(stem,0); z0r=z0'r; x0'=x1; x0=x2;
rt x1r=hround(w-2.5u+.5stem'); top y1=h;
numeric edge; edge=lft x2l;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,0);
pos4(vair,90); pos5(curve,180); pos6(vair,270); penpos7(x3r-x3l,360);
lft x3l=min(lft x3l-(rt x3r-tiny.rt x2r),1/3[lft x2,edge]);
y3=1/8[bar_height,x_height];
x4l=.5(w-serif_fit)-.3u; top y4r=x_height+oo;
lft x5r=hround max(1.35u-.5curve,.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=max(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=max(x',.5[x5r,x6]);
filldraw stroke z3e{up}...pulled_arc.e(4,5)
 & pulled_arc.e(5,6)...{up}z7e; % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{left}z4l));
pickup tiny.nib;
y2=.45bar_height;
pos10(cap_hair,90); x10=.4[x2r,x11]; bot y10l=-oo;
pos11(cap_hair,180); rt x11=w+.5u; y11=.3bar_height;
pos12(hair,280); x12=x2r+.5u; y12=2y11;
pos13(hair,360); x13=.4w; y13=-.75desc_depth;
filldraw stroke z1e--z0'e--z0e--z2e{down}  % stem
 ...{right}z10e...{up}z11e...{(-3,-1)}z12e...{(-1,-2)}z13e; % tail
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop); fi  % upper serif
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;

def raised_h_stroke(suffix $,@,@@,$$) =
 penpos$$(x@@r-x@@l,0); x$$=x@@; y$$=.45bar_height;
 y@@=1/3[bar_height,x_height];
 penpos$''(x$r-x$l,0); x$''=x$; y$''=1/8[bar_height,x_height];
 filldraw stroke z$''e--z$e;  % thicken the lower left stem
 penpos@0(min(rt x$r-lft x$l,thin_join)-fine,180); pickup fine.nib;
 rt x@0l=tiny.rt x$r; y@0=y$'';
 pos@1(vair,90); pos@@'(x@@r-x@@l+tiny,0); z@@'=z@@;
 x@1=.5[rt x@0l,rt x@@'r]; top y@1r=x_height+oo;
 (x@,y@1l)=whatever[z@1r,z@0l]; x@1l:=x@;
 filldraw stroke z@0e{up}...{right}z@1e
  &{{interim superness:=hein_super; super_arc.e(@1,@@')}};  % arch
 pickup tiny.nib; filldraw stroke z@@e--z$$e;  % right stem
 labels(@0); penlabels(@1); enddef;

cmchar "Curly-tail N";
beginchar(oct"163",10u#,x_height#,desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#+u#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
raised_h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
 %dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); % lower right serif
fi
penlabels(1,2,3,4);
pos4'(stem,180); z4'=z4;
pos10(cap_hair,90); x10=.4[x4r,x11]; bot y10l=-oo;
pos11(cap_hair,180); rt x11=w+.5u; y11=.3bar_height;
pos12(hair,280); x12=x4r+.5u; y12=2y11;
pos13(hair,360); x13=.45w; y13=-.75desc_depth;
filldraw stroke z4e{down}  % stem
 ...{right}z10e...{up}z11e...{(-3,-1)}z12e...{(-1,-2)}z13e; % tail
penlabels(10,11,12,13);
endchar;

cmchar "Curly-tail T";
beginchar(oct"164",6u#+max(u#,.5stem#),
 min(asc_height#,if hefty:9/7 else:10/7 fi\\ x_height#),0);
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
adjust_fit(0,if serifs: 0 else: -.5u# fi);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2.5u-.5shaved_stem);
y2=y8; y3=max(.5bar_height,2vair);
pickup crisp.nib; pos8(bar,90);
rt x8=hround(w-1.3u); top y8r=x_height; lft x7=hround 1/3u; y7l=y8l;
if hefty: pos7(bar,90);
 filldraw stroke z7e--z8e;  % crossbar
 pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2;
 filldraw stroke z1e--z2'e;  % upper terminal
else: pos7(vair,90); pos1(hair,0);
 rt x1r=fine.rt x2l; top y1=h;
 filldraw z1l{down}...{left}z7r--z7l--z8l
  --z8r--(x1r,y8r)--z1r--cycle; fi  % upper terminal and crossbar
pickup fine.nib; interim superness:=more_super;
pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u);
pos5(hair,0); y5=.35bar_height; x4l=.5[x3l,x5l];
(x,y4r)=whatever[z4l,z5l]; x4r:=max(x,.5[x3r,x4]);
pos11(hair,110); x11=x4-.5u; top y11r=2y5;
pos12(hair,180); x12=0; y12=-.75desc_depth;
filldraw stroke z2e..super_arc.e(3,4)...{up}z5e  % stem and hook
 ...{(-3,-1)}z11e...{(-1,-4)}z12e;
penlabels(1,2,3,4,5,6,7,8,10,11,12); endchar;

cmchar "Left-hooktop I";
beginchar(oct"165",6u#,x_height#,0);
adjust_fit(0,-.5u#);
pickup tiny.nib; pos3(stem,0); x3=.5w; bot y3=0;
x0=0; x2=.5w; hook_in(0,1,2);
filldraw stroke z2e--z3e;
dish_serif(3,2,a,1/3,jut,b,1/3,jut);
penlabels(0,1,2,3,4,5); endchar;

cmchar "Left-hooktop Long I";
beginchar(oct"166",6u#,x_height#,desc_depth#);
adjust_fit(0,-1u#);
pickup tiny.nib; pos3(stem,0); x3=.5w; bot y3=-d;
x0=0; x2=.5w; hook_in(0,1,2);
filldraw stroke z2e--z3e;
dish_serif(3,2,a,1/3,jut,b,1/3,jut);
penlabels(0,1,2,3,4,5); endchar;

cmchar "Viby I";
beginchar(oct"167",6u#,x_height#,desc_depth#);
italcorr 1.5u#;
adjust_fit(0,-u#);
pickup tiny.nib; pos3(stem,0); x3=.5w; bot y3=0;
x0=0; x2=.5w; hook_in(0,1,2);
filldraw stroke z2e--z3e;
currentpicture:=currentpicture+currentpicture rotatedaround((.5w,.5(h-d)),180);
penlabels(0,1,2,3,4,5); endchar;

cmchar "Viby Y";
beginchar(oct"170",10u#,x_height#,desc_depth#);
italcorr u#;
adjust_fit(0,0); interim superness:=more_super;
pickup tiny.nib;
x10=w+.5u; x8=x10-3u; hook_out(8,9,10);
currentpicture:=currentpicture shifted(0,-d);
x0=0; x2=x3=x0+3u; pos3(stem,-180);
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); x6=x8; pos7(stem,0); pos8'(stem,0); z8'=(x8,y8-d);
y3=.7[y4,y5]; bot y4r=-oo; y5=.57h; top y6=h; y7=0; x5=x6=x7;
filldraw stroke z2'e{-u,-x_height}
 ...super_arc.e(3,4)...{up}z5e; % left stem and arc
filldraw stroke z6e--z8'e;
dish_serif(6,8,a,1/3,jut,b,1/3,jut);
math_fit(-2/3x_height#*slant+.5hair#+.5u#,ic#-1/3x_height#*slant);
penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;

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

cmchar "Wynn";
beginchar(oct"175",9u#+serif_fit#,x_height#,desc_depth#);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#);
adjust_fit(serif_fit#,0);
pickup tiny.nib; pos2(stem,0);
pos0'(stem',0); pos0(stem,0); pos1(stem',0); z0l=z0'l; x0'=x1; x0=x2;
lft x1l=hround(2.5u-.5stem'); top y1=.9h if serifs: +min(oo,serif_drop) fi;
numeric edge; edge=rt x2r;
pickup fine.nib; pos3(hair,90); pos4(hair,90);
pos5(curve,0); pos6(hair,-90); penpos7(hair,-90);
x3=x0r; x4+.5u=x6=.6w; top y4r=x_height; y4-y3=y6-y7;
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.6x_height;
bot y6r=.1x_height-oo; x7=x3; bot y7r=-oo; y0=.82h;
pickup tiny.nib; bot y2=-.7d;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
filldraw stroke z3e--z4e{z6-z7}...z5e{down}...{z7-z6}z6e--z7;
pos8(hair,0); pos7'(stem,0);
z7'=z2; x8l=x7'l; bot y8=0;
filldraw stroke z7'e--z8e;  % point
pos10(stem,0); pos11(vair,-90); z10=z2; lft x11l=x22=.5u; y11l=-d-oo;
varm(10,11,a,.8beak_darkness,-1.5beak_jut);
pickup crisp.nib;
pos21(stem',0); pos22(hair,90); z21=(x1,.6h); y22r=y4;
varm(21,22,b,.8beak_darkness,-1.3beak_jut);
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,21,22); endchar;


slant:=1/4;
font_setup;

cmchar "Italic Schwa";
beginchar(oct"176",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,0); pos2(vair,90);
pos3(curve,180); pos4(vair,270); pos5(hair,320);
x0=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x2=x4=.5(w+u);
lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps-u); x6=x5;
y0=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo;
top y5l=vround .5bar_height; path p; p=z4{right}..z5..z6;
filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3)
 & pulled_arc.e(3,4)...{direction 1 of p}z5e;  % arc
math_fit(-.3x_height#*slant+.5curve#-u#,ic#);
currentpicture:=currentpicture rotatedabout ((.5(w+slant*w),.5h),180);
penlabels(0,1,2,3,4,5,6); endchar;

slant:=0;
font_setup
