%% @metafontfile{
%%     filename="cyrspl.mf",
%%     version="2.2",
%%     date="04-JAN-1995",
%%     filetype="Metafont: driver",
%%     copyright="Copyright (C) Humanities and Arts Computing Center,
%%            University of Washington;
%%            all rights reserved.  Copying of this file is
%%            authorized only if either:
%%            (1) you make absolutely no changes to your copy
%%                including name; OR
%%            (2) if you do make changes, you first rename it to some
%%                other name.",
%%     author="American Mathematical Society",
%%     address="American Mathematical Society,
%%            Technical Support, Electronic Products and Services,
%%            P. O. Box 6248,
%%            Providence, RI 02940,
%%            USA",
%%     telephone="401-455-4080 or (in the USA) 800-321-4AMS",
%%     email="Internet: Tech-Support@Math.AMS.org",
%%     codetable="ISO/ASCII",
%%     checksum = "58605 480 1902 22521"
%%     keywords="amsfonts, tex, metafont , cyrillic ",
%%     abstract="This is the driver file for use with 
%%            the cyrillic fonts in AMSFonts 2.2."
%%     docstring       = "The checksum field above contains a CRC-16
%%                        checksum as the first value, followed by the
%%                        equivalent of the standard UNIX wc (word
%%                        count) utility output of lines, words, and
%%                        characters.  This is produced by Robert
%%                        Solovay's checksum utility.",
%%     }
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Cyrspl special lowercase cyrillic forms, incl. o

cmchar "The Ukrainian letter i";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar(oct"014",5u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit# + .5dot_diam# -2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0;
filldraw stroke z1e--z2e;  % stem
pos3(dot_diam,0); pos4(dot_diam,90);
if serifs: x3r=max(x1r,x1+.5(dot_diam-tiny)-.2jut) else: x3=x1-.5 fi;
top y4r=h+1;
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi
x3=x4; y3=.5[y4l,y4r]; dot(3,4);  % dot
if serifs: sloped_serif.l(1,2,a,1/3,.95jut,serif_drop);  % upper serif
 dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi  % lower serif
penlabels(1,2,3,4); endchar;

cmchar "The letter dj (looks like barred h with tail)";
beginchar(oct"016",9.5u#,asc_height#,desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(u#+serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
pos1'(stem',0); pos2'(stem',0); 
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; 
top y1=h; bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
fi
pickup crisp.nib;
x98=0; x99=hround(w-u); y98=y99=.5x_height+.5h; pos98(bar,90); pos99(bar,90);
filldraw stroke z98e--z99e;
pickup tiny.nib;
%w:=12u; 
x23=hround(w-u); y23=bar_height; %2/3[x_height,bar_height]; 
if serifs: pos23(.9stem,0) else: pos23(stem,0) fi;
rt x20l=rt x2r; y20=7/8[x_height,bar_height]; pos20(hair,180);
x21=.45[x20,x23]; top y21r=x_height+oo; pos21(hair,90);
pos24(cap_hair,-90); 
%if serifs: x24=.45[x20,x23] else: x24=.55[x20,x23] fi;  
lft x24r=rt x2r; %even with right edge of stem;
bot y24r=-d;
%filldraw stroke z20e...{right}z21e{right}...z23e{down}...{-6,-3}z24e;
filldraw stroke z20e...{right}z21e & pulled_arc.e(21,23) & pulled_arc.e(23,24);
penlabels(1,2,3,4,20,21,23,24); endchar;

cmchar "The Serbian letter soft t (looks like barred h)";
beginchar(oct"017",11u#,asc_height#,0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(.5u#+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=h; bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
pickup crisp.nib;
x98=0; x99=x4; y98=y99=.5x_height+.5h; pos98(bar,90); pos99(bar,90);
filldraw stroke z98e--z99e;
penlabels(1,2,3,4); endchar;

cmchar "The Russian letter yo (looks like e umlaut)";
beginchar(oct"033",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
umlaut(2,q);
penlabels(0,1,2,3,4,5); endchar;

cmchar "The Old Russian letter yatz";
beginchar(oct"053",11u#,body_height#,0);
italcorr .5x_height#*slant+min(.5curve#-u#,-.25u#);
adjust_fit(u#+serif_fit#,0);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
lft x1l=lft x2l=hround(max(2u,3u-.5stem)); top y1=h-1.5jut; bot y2=0;
filldraw stroke z1e--z2e;  % body of stem
penpos8(.5[vair,bar],90); penpos9(.5[vair,bar],90);
penpos10(curve,0); penpos11(slab,-90); penpos12(slab,-90);
y9=y8=.5[bar_height,x_height]; x9=x11=.5[x1,w-1.5u];
y12r= y11r=0; y10=.5[y11,y9]; 
x9l:=x9l-.5u; x11l:=x11l-.5u; x8=x12=x1; x10r=hround(w-u);
fill stroke z8e..super_arc.e(9,10)& super_arc.e(10,11)..z12e; %bowl
if serifs: nodish_serif(2,1,a,1/3,jut,b,1/3,.5jut) ; fi
%
pickup tiny.nib; 
x71=x1l-2.5u; x72=x1r+2.5u; y71r=y72r=y1- if serifs: 1.5u else: 2u fi;  
pos71(slab,90); pos72(slab,90); filldraw stroke z71e--z72e; % cross
lft x991l=lft x1l;rt x991r=rt x1r; y991r=y991l=y1;
x92=x1l-jut; x93=x1r+jut; y92=y93=y1+2jut;
if hefty: filldraw z1l--z92--z1r--cycle; filldraw z1l--z93--z1r--cycle; else:
filldraw z991l--z92--z991r--cycle; filldraw z991l--z93--z991r--cycle; fi
penlabels(0,1,2,3,4,5,6,7,8); endchar;

cmchar "The letter dotless i";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("=",5u#,x_height#,0);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit# + .5dot_diam# -2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0;
filldraw stroke z1e--z2e;  % stem
pos3(dot_diam,0); pos4(dot_diam,90);
if serifs: x3r=max(x1r,x1+.5(dot_diam-tiny)-.2jut) else: x3=x1-.5 fi;
top y4r=h+1;
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi
x3=x4; y3=.5[y4l,y4r]; %dot(3,4);  % dot
if serifs: sloped_serif.l(1,2,a,1/3,.95jut,serif_drop);  % upper serif
 dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi  % lower serif
penlabels(1,2,3,4); endchar;

cmchar "The Russian letter a";
beginchar("a",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
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;

cmchar "The Russian letter be";
beginchar("b",9u#,asc_height#,0);
italcorr .7asc_height#*slant;
adjust_fit(if monospace: .5u#,.5u# else: .5u#,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
x2'r=x2r; pos2'(vair,180); y2'=y2;
x20r=x2r+1.525u; y20=.55[y1,y22]; pos20(stem,135); 
x21=x22-1.5u; y21=y20+.5u; pos21(stem,135); x22l=w-u; top y22r=h+1.5oo;
pos22(hair,110); 
filldraw circ_stroke z2'e{up}...z20e...z21e...{up}z22e;
penlabels(1,2,3,4); endchar;

cmchar "The Russian letter e";
beginchar("e",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
penlabels(0,1,2,3,4,5); endchar;

cmchar "The Russian letter ef (looks like phi)";
beginchar("f",11u#,asc_height#,asc_height#-x_height#); 
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#); 
numeric phistem; phistem= if serifs: .825 fi stem;
pickup tiny.nib; pos1(phistem,0); pos2(phistem,0);
x1=hround .5w; x1=x2; top y1=h-2jut; bot y2=-d+2jut;
pos10(hair,0); pos11(hair,90); pos12(curve,180);
 pos13(hair,270); pos14(hair,0);
x10l=x14l=x1l; x12r=u; x11=x13=.5[x1,x12];
 y10=.65x_height; top y11r=x_height+oo;
bot y13r=-oo; y12=.5x_height; y14=.35x_height;
filldraw stroke pulled_arc.e(10,11) & pulled_arc.e(11,12)
 & pulled_arc.e(12,13) & pulled_arc.e(13,14);
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
if serifs:
  x1'r=rt x1r; x1'l=lft x1l; y1'r=y1'l=y1;
  x2'r=rt x2r; x2'l=lft x2l; y2'r=y2'l=y2;
  pickup crisp.nib;
  x41=x42=x1-jut; y41=h; y42=-d; 
  if hefty: filldraw z1l--z41--z1r--cycle; filldraw z2l--z42--z2r--cycle; else:
  filldraw z1'l--z41--z1'r--cycle; filldraw z2'l--z42--z2'r--cycle; fi
fi
picture phicirc; phicirc=currentpicture; currentpicture:=nullpicture;
slantswitch; clearxy;
numeric phistem; phistem= if serifs: .825 fi stem;
pickup tiny.nib; pos1(phistem,0); pos2(phistem,0);
x1=hround .5w; x1=x2; top y1=h-2jut; bot y2=-d+2jut;
pos10(hair,0); pos11(hair,90); pos12(curve,180);
 pos13(hair,270); pos14(hair,0);
x10l=x14l=x1l; x12r=u; x11=x13=.5[x1,x12];
 y10=.65x_height; top y11r=x_height+oo;
bot y13r=-oo; y12=.5x_height; y14=.35x_height;
filldraw stroke pulled_arc.e(10,11)&pulled_arc.e(11,12)&pulled_arc.e(12,13)&pulled_arc.e(13,14);
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
if serifs:
  x1'r=rt x1r; x1'l=lft x1l; y1'r=y1'l=y1;
  x2'r=rt x2r; x2'l=lft x2l; y2'r=y2'l=y2;
  pickup crisp.nib;
  x41=x42=x1-jut; y41=h; y42=-d; 
  if hefty: filldraw z1l--z41--z1r--cycle; filldraw z2l--z42--z2r--cycle; else:
  filldraw z1'l--z41--z1'r--cycle; filldraw z2'l--z42--z2'r--cycle; fi
fi
mirror(x1); addto currentpicture also phicirc;
endchar;

cmchar "The Serbian letter je";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("j",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(flare,-180);
 x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
 if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi;
 (x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]);
 filldraw stroke z2e{down}...z5e{left};  bulb(5,6,7); % arc and bulb
else: pickup fine.nib; pos2'(stem',0); z2'=z2;
 pos6(.2[vair,stem'],-90); pos7(vair,-90);
 lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo);
 (x,y7l)=whatever[z7r,z3]; x7l:=x;
 z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r;
 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
 filldraw stroke z2'e..{down}z5e & super_arc.e(5,6)
  & z6e{left}..z7e; fi  % arc and terminal
penlabels(1,2,3,4,5,6,7); endchar;

cmchar "The Russian letter o";
beginchar("o",9u#,x_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=h+vround 1.5oo; y3r=-oo;
y2=y4=.5h-vair_corr; y2l:=y4l:=.52h;
penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
 & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
penlabels(1,2,3,4); endchar;

cmchar "The Russian letter er (looks like p)";
beginchar("r",10u#+serif_fit#,x_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 if serifs: +min(oo,serif_drop) fi;
numeric edge; edge=rt x2r;
pickup fine.nib; pos3(if hefty:thin_join else: hair fi,180);
pos4(vair',90); pos5(curve,0); pos6(vair,-90); penpos7(x3l-x3r,-180);
rt x3l=max(rt x3l-(lft x3r-tiny.lft x2l), 1/3[rt x2,edge]);
y3=1/8[bar_height,x_height];
x4l=w-.5(w-serif_fit)+.5u; top y4r=x_height+oo;
rt x5r=hround min(w-1.35u+.5curve,w-.6u); y5=.5x_height;
x6l=x4l-.2u; bot y6r=-oo;
x7=x3; y7=min(y3,y6+y4-y3+.6vair);
(x,y4r)=whatever[z3l,z4l]; x4r:=min(x,.5[x5r,x4]);
(x',y6r)=whatever[z7l,z6l]; x6r:=min(x',.5[x5r,x6]);
filldraw stroke z3e{up}...{right}z4e&super_arc.e(4,5)
 &super_arc.e(5,6)&z6e{left}...{up}z7e;  % bowl
y0=ypart(((edge,h)--(edge,0))intersectionpoint(z3l{up}...{right}z4l));
pickup tiny.nib; bot y2=-d;
filldraw stroke z1e--z0'e--z0e--z2e;  % stem
pickup crisp.nib; pos8(hair,0); pos7'(stem,0);
z7'=z2; x8l=x7'l; bot y8=0;
filldraw stroke z7'e--z8e;  % point
if serifs: sloped_serif.l(1,0',a,1/3,jut,serif_drop);  % upper serif
 dish_serif(2,0,b,1/3,jut,c,1/3,jut); fi  % lower serif
penlabels(0,1,2,3,4,5,6,7,8); endchar;

cmchar "The Russian letter es (looks like c)";
beginchar("s",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:=min(x,x4l+.5u);
 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
  & pulled_super_arc.e(3,4)(.5superpull)
  ..tension .9 and 1..{x5-x4,5(y5-y4)}z5e;  % arc and lower terminal
else: pos1(4/7[vair',flare],80);
 rt x1r=hround(w-.6u); top y1r=vround .82[bar_height,top y2r];
 filldraw stroke term.e(2,1,right,.8,4);  % upper terminal
 pos5(.6[vair',flare],275); rt x5r=hround(w-.5u);
 y5r=good.y(y5r+1/3bar_height-y5); y5l:=good.y y5l; x5l:=good.x x5l;
 forsuffixes e=l,r: path p.e; p.e=z4e{right}..tension .9 and 1..z5e;
  if angle direction 1 of p.e>75:
   p.e:=z4e{right}..tension atleast.9 and 1..{dir 75}z5e; fi endfor
 filldraw stroke pulled_super_arc.e(2,3)(.7superpull)
  & pulled_super_arc.e(3,4)(.5superpull) & p.e; fi  % arc and lower terminal
penlabels(0,1,2,3,4,5); endchar;

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