%
% lgslavl.mf
%
%% Cyrillic font container with T2 encoding beta-support
%
% This file is future part of lxfonts package
% Version 3.2 // Patchlevel=0
% (c) O.Lapko
%
% This package belongs to the public domain under conditions similar to
% those of D. E. Knuth specified for the Computer Modern family of fonts.
% In particular, only the authors are entitled to modify this file
% and to save it under the same name.
%
% Content:
%
% Lowercase Old Slav letters included in Unicode
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% List of letternames and their codes in Unicode
%
% omga          "61
% i_e           "65
% l_yus         "67
% il_yus        "69
% ib_yus        "6d
% ksi           "6f
% psi           "71
% fita          "73
% izh_dgr       "75
% uk            "77
% omga_rnd      "79
% omga_tlo      "7b
% ot            "7d
% koppa         "7f
%

LHver_check(3,2);  % like |version_check| in ec

lhchar "Lowercase Cyrillic letter omga - omega";
cyrchar(omga,12u#,x_height#,0);%omga width
italcorr x_height#*slant-.2u#;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); %o
full_w:=w; w:=.5w;
% lower_omega;
if odd(.6[vair',flare]-w): change_width; fi % symmetric & all three equal
if not serifs: interim superness:=more_super; fi
% omega_bowl;
pickup fine.nib;
pos2(vair',90); pos3(curve,180); pos4(vair',270);
x2=(.5(w+2.5u)); x4=(.5(w+u));
top y2r=vround(h+1.5oo); bot y4r=-oo;
lft x3r=(hround max(.6u,1.35u-.5curve)); y3=.5h; % eng
if serifs: pos1(hair,0); pos0(flare,0); pos5(.2[hair,stem],0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare);
 x5=w; y5=max(good.y(.5bar_height-.9),y4l+vair');
 rt x1r=min(2/3[x2,lft x5l],lft x5l-1);
 (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: pos5(.6[vair',flare],275); x5r=w;
 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) & term.e(4,5,right,.8,4); % arc and lower terminal
fi
%%%
% mirror + middle stem
forsuffixes $ = 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r:
 x.m$=l+(r-x$); y.m$=y$; endfor;
 lft x6l=min(lft x5l-1-eps,w-.5fudged.stem);
 x6r=l+(r-x6l); top y6l=top y6r=bar_height;
if serifs:
 filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull)
  & pulled_super_arc.e(.m3,.m4)(.5superpull)
  ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5e;  % arc and lower terminal
 path p.l,p.r; numeric t;
 p.l=z4r{right}..tension.9 and 1..{x5-x4,5(y5-y4)}z5r;
 p.r=z.m4r{left}..tension.9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r;
 t=xpart(p.r intersectiontimes p.l); if t<0: t:=1; fi
 filldraw reverse subpath(t,1) of p.r---z6r..z6l---subpath(t,1) of p.l..cycle; %middle stem
else:
 filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull)
  & pulled_super_arc.e(.m3,.m4)(.5superpull) & term.e(.m4,.m5,left,.8,4); % arc and lower terminal
 path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4);
 p.r=term.r(.m4,.m5,left,.8,4);
 t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l);
 filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem
fi
%%%%%
penlabels(1,2,3,4,5,6); endchar;

lhchar "Lowercase Cyrillic letter i_e - iot e (HC with mid-line)";
cyrchar(i_e,8u#,x_height#,0);
italcorr x_height#*slant-.2u#;
adjust_fit(if monospace: 4u# else: 4.5u# fi +serif_fit#, %li_part_adj
 if monospace:.5u# else:.1u# fi);
% lower_ukre;
set_bar_axis;
pickup fine.nib; pos2(vair',90); pos3(curve,180); pos4(vair',270);
x2=x4=(.5(w+u)); top y2r=vround(h+1.5oo); bot y4r=-oo;
lft x3r=(hround max(.6u,1.35u-.5curve)); y3=.5h;
if serifs:
 pos1(hair,0); pos5(hair,360);
 y1=min(y2.bh+.75flare-.25vair+eps,.9[bar_height,h]-.75flare);
 rt x1r=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 z1e{x2-x1,5(y2-y1)}...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
 pos6(.3[fine.breadth,hair],0); x6r=x1r; top y6=h+oo;
 x1r-x1'=1.5curve; y1'=y1;
 path upper_arc; upper_arc=z1{x2-x1,5(y2-y1)}..z2{left};
 numeric t; t=xpart(upper_arc intersectiontimes (z6l--z1'));
 filldraw z1r--z6r--z6l--subpath(t,0) of upper_arc--cycle; % barb
else:
 pos1(4/7[vair',flare],80); pos5(.6[vair',flare],275);
 rt x1r=hround(w-.6u);
 top y1r=vround .82[bar_height,top y2r];
 filldraw stroke term.e(2,1,right,.8,4);  % upper terminal
 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
%%%
% lukre_bar;
if (serifs=true) and (bar#<=.5curve#):
   x7r=x3l; x8r=min(lft x1l-.5hair,0.85[x3l,x1l]);
   y7l=y8l=y1.bh; y7r=y8r=y2.bh; x7l=x7r; x8l=x8r;
   numeric bar[];
   bar2=7/8[bar,fudged.stem-2stem_corr];
   penpos9(bar2,45); z9=.575[z7l,z8l];
   fill circ_stroke z8e{-2,-1}..{-2,1}z9e..{-2,-1}z7e; % curve /\/
else:
   bar_stroke(x3l,min(lft x1l-.5hair,0.85[x3l,x1l]));  % bar --
fi
%%%%%
save slab; % lower.slab
% barh_i_part(3);
_zero:=3;
_one:=10; _two:=11;
%
pickup tiny.nib;
pos[_one](stem,0); pos[_two](stem,0);
lft x[_one]l=lft x[_two]l=
    l+letter_fit+if not monospace: serif_fit+ fi hround (2.5u-.5stem-eps);
top y[_one]=h; bot y[_two]=0;
filldraw stroke z[_one]e--z[_two]e; % stem
bar_stroke(x[_one],x[_zero]); % bar
if serifs:
   slab:=Vround(vair-vair_corr); % lower.slab
   dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut); % upper serif
   slab:=vair; % lower.slab
   dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); % lower serif
fi
%%%%%
penlabels(1,1',2,3,4,5,6,7,8,9,10,11,12,13); endchar;

lhchar "Lowercase Cyrillic letter l_yus - little yus (A with midstem)";
cyrchar(l_yus,10u#+2stem#,x_height#,0);
adjust_fit(serif_fit#,serif_fit#);
% lower_amod;
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=.8jut; pickup tiny.nib; y1=y4=0;
x1l=w-x4r=l+letter_fit+outer_jut+.25u+eps;
%
x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+.5[apex_oo,apex_o];%+apex_o+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
penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
if hefty: y5r else: y5 fi =.5y0;
y5r-y5l=y6r-y6l=.6[thin_join,vair];
penstroke z5e--z6e; % bar line
pickup tiny.nib; x7=.5[x5,x6]; top y7=y5; bot y8=0;
pos7(max(tiny.breadth+eps,.7[thin_join,stem]),0);
pos8(max(tiny.breadth+eps,.7[thin_join,stem]),0);
x7=x8; filldraw stroke z8e--z7e; % middle stem
if serifs: prime_points_inside(8,7); numeric inner_jut;
 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
 save slab; slab:=vair; % lower.slab
 dish_serif(1',2,a,1/2,outer_jut,b,.6,.6inner_jut)(dark); % left serif
 dish_serif(4',3,c,1/2,.6inner_jut,d,1/3,outer_jut);	  % right serif
 dish_serif(8,7,e,1/3,.6inner_jut,f,1/3,.6inner_jut); fi  % middle serif
%%%%%
penlabels(1,1',2,3,4,4',5,6,7,8); endchar;

lhchar "Lowercase Cyrillic letter il_yus - iot little yus";
cyrchar(il_yus,10u#+2stem#,x_height#,0);
adjust_fit(if monospace:4u# else:4.75u# fi+serif_fit#,serif_fit#);
% lower_amod;iot
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=.8jut; pickup tiny.nib; y1=y4=0; x1l=w-x4r=outer_jut+.25u+eps;
%
x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+.5[apex_oo,apex_o];%+apex_o+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
penpos5(whatever,angle(z2-z1)); z5=whatever[z1,z2];
penpos6(whatever,angle(z3-z4)); z6=whatever[z3,z4]; y6=y5;
if hefty: y5r else: y5 fi =.5y0;
y5r-y5l=y6r-y6l=.6[thin_join,vair];
penstroke z5e--z6e; % bar line
pickup tiny.nib; x7=.5[x5,x6]; top y7=y5; bot y8=0;
pos7(max(tiny.breadth+eps,.7[thin_join,stem]),0);
pos8(max(tiny.breadth+eps,.7[thin_join,stem]),0);
x7=x8; filldraw stroke z8e--z7e; % middle stem
if serifs: prime_points_inside(8,7); numeric inner_jut;
 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
 save slab; slab:=vair; % lower.slab
 dish_serif(1',2,a,1/2,outer_jut,b,.6,.6inner_jut)(dark); % left serif
 dish_serif(4',3,c,1/2,.6inner_jut,d,1/3,outer_jut);	  % right serif
 dish_serif(8,7,e,1/3,.6inner_jut,f,1/3,.6inner_jut); fi  % middle serif
%%%%%
x9=x5; y9=.5[y5l,y5r]; save slab;
% i_part(9);
_zero:=9;
_one:=10; _two:=11; _three:=12; _four:=13;
%
pickup tiny.nib; pos[_one](stem,0); pos[_two](stem,0);
lft x[_one]l=lft x[_two]l=
	l+letter_fit+if not monospace: serif_fit+ fi hround(2.5u-.5stem-eps);
top y[_one]=h; bot y[_two]=0;
filldraw stroke z[_one]e--z[_two]e; % stem
if serifs:
 slab:=Vround(vair-vair_corr); % lower.slab
 dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut);	% upper serif
 slab:=vair; % lower.slab
 dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); fi % lower serif
x[_three]=x[_zero]; x[_four]=x[_one];
y[_three]=y[_four]=y[_zero]; pickup fine.nib;
penpos[_three](.6[thin_join,vair],90);
penpos[_four](.6[thin_join,vair],90); %fi
fill stroke z[_three]e--z[_four]e; % bar
%%%
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13); endchar;

iff not specific:%
lhchar "Lowercase Cyrillic letter ib_yus - iot big yus (`roman')";
cyrchar(ib_yus,15u#,x_height#,0);
adjust_fit(.75u#+
        if monospace: 4u# else: 4.5u# fi +serif_fit#, %li_part_adj+.75u
 serif_fit#);
if odd(fudged.stem-w): change_width; fi % symmetric & all three equal
% lowerr_yus;
% ltop_yus;
set_bar_axis; numeric stem[];
stem1=fudged.stem-3stem_corr; stem2=min(stem1,fudged.hair);
penpos1(stem1,0); penpos2(stem2,0); penpos3(stem1,0); penpos4(stem2,0);
x1l=w-x2r=hround(.2w-.5tiny-.5)-eps; y1=y2=h; y3=y4=3/5[y1.bh,y2.bh];
x3l=hround(.5w-.5stem1); x3r=x4r;
z0=whatever[z4l,z2l]=whatever[z1r,z3r];
if hefty: y0:=y2.bh;
 fill z3l--diag_end(3l,1l,1,1,1r,3r){z3r-z1r}
  ...{down}(x0-.5,y0)..(x0+.5,y0){up}...
  {z2l-z4l}diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; % diagonals
else: fill z3l--diag_end(3l,1l,1,1,1r,3r)--z0--
  diag_end(4l,2l,1,1,2r,4r)--z4r--cycle; fi % diagonals
penpos5(stem1,0); x5=x3; y5=0;
fill z3l--diag_end(3l,5l,1,1,5r,3r)--z3r--cycle; %middle stem
z6=whatever[z4,z2]; z7=whatever[z1,z3]; y6=y7=good.y(y1-vair);
fill z1--z7--z6--z2--cycle; % upper bar
% lyus_rbowl;
 numeric stem[],alpha[],right_jut;
 right_jut=if serifs:.6jut else:.4tiny fi;
 y10l=y1.bh; y10r=y2.bh; x10l=x10r=x3; y9=y12=min(bot y10l-.5,.85y10l);
 rt x8r=w-lft x11l=hround(r-letter_fit-.3u-right_jut); bot y8=bot y11=y5;
 stem2=max(tiny.breadth,fudged.stem-3stem_corr);
 alpha2=diag_ratio(1,.5(stem2-tiny),h-y8,x8r-x3);
 penpos8(alpha2*(stem2-tiny),0); penpos11(alpha2*(stem2-tiny),0);
 forsuffixes $=l,r:  y8'$=0; y11'$=0; endfor
 z8'r=z8r+penoffset (x3,h)-z8 of currentpen+whatever*((x3,h)-z8);
 z8'l=z8l+penoffset z8-(x3,h) of currentpen+whatever*((x3,h)-z8);
 z11'r=z11r+penoffset (x3,h)-z11 of currentpen+whatever*((x3,h)-z11);
 z11'l=z11l+penoffset z11-(x3,h) of currentpen+whatever*((x3,h)-z11);
 z8'=.5[z8'l,z8'r];  z11'=.5[z11'l,z11'r];
 z9=z8'+whatever*((x3,h)-z8); z12=z11'+whatever*((x3,h)-z11);
 penpos9(stem-2stem_corr,0); penpos12(stem-2stem_corr,0);
 fill z10l{right}...{z8'l-z9l}z9l--diag_end(9l,8'l,.5,1,8'r,9r)
  --z9r{z9r-z8'r}...{left}z10r--cycle; % right diagonal
 fill z10r{left}...{z11'l-z12l}z12l--diag_end(12l,11'l,1,.5,11'r,12r)
  --z12r{z12r-z11'r}...{right}z10l--cycle; % left diagonal
%%
save slab; % lower.slab
if serifs: numeric inner_jut; prime_points_inside(5,3);
 if rt x5r+jut+.5u+1<=lft x8l-jut: inner_jut=jut;
  else: rt x5r+jut+.5u+1=lft x8l-inner_jut; fi
 slab:=vair; % lower.slab
 dish_serif(11,12,a,1/3,right_jut,b,1/2,inner_jut)(dark); % diagonal serif
 dish_serif(8,9,e,1/2,inner_jut,f,1/3,right_jut)(dark);	  % diagonal serif
 dish_serif(5',3,c,1/3,.75jut,d,1/3,.75jut); fi		  % middle serif
%%%%%
% barh_i_part(3);
_zero:=3;
_one:=13; _two:=14;
%
pickup tiny.nib;
pos[_one](stem,0); pos[_two](stem,0);
lft x[_one]l=lft x[_two]l=
    l+letter_fit+if not monospace: serif_fit+ fi hround (2.5u-.5stem-eps);
top y[_one]=h; bot y[_two]=0;
filldraw stroke z[_one]e--z[_two]e; % stem
bar_stroke(x[_one],x[_zero]); % bar
if serifs:
   slab:=Vround(vair-vair_corr); % lower.slab
   dish_serif([_one],[_two],s,1/3,jut,t,1/3,jut); % upper serif
   slab:=vair; % lower.slab
   dish_serif([_two],[_one],u,1/3,jut,v,1/3,jut); % lower serif
fi
%%%%%
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar;

% like CYR_.z or numeral 3
lhchar "Lowercase Cyrillic letter ksi";
cyrchar(ksi,if serifs:7.5u#else:8u#fi,x_height#+.5acc_height#,desc_depth#);
bh#:=min(bar_height#,1.14x_height#-bar_height#); define_pixels(bh);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p
adjust_fit(0 if monospace:+\\.5u#,.5u#+else:,fi\\.5serif_fit#); h:=x_height;
set_bar_axis; y4l=y5l=y6r=y2.bh; y4r=y5r=y6l=y1.bh; y4=y5=y6=y0.bh;
pickup fine.nib; numeric right_curve,low_curve;
right_curve=if serifs: curve-stem_corr else: curve-3stem_corr fi;
low_curve=if serifs: stem-stem_corr else:.5[vair,stem]-3stem_corr fi;
penpos2(vair,90); penpos3(.5[hair,curve],0);
y2r=h+oo; x2=x8=.5[u,w-.6u-.5stem]; x1r=hround.625u;
x7r=hround(w-.6u); x3r=min(x7r-1,hround(w-u));
x5r=x5l=min(x1r+flare+if not serifs:.5 fi hair-fine,x2)+eps;
y3=.5[y4l,y2l]; x4l=x4r=1/3[x5l,x3l]; x6l=x6r=hround.5[.5u,w-.8u];
{{interim superness:=if serifs:more_super else:hein_super fi;
 fill stroke super_arc.e(2,3)}};
fill stroke  super_arc.e(3,4)..z5e; % upper bowl
numeric theta; theta=-90+angle(28u,x_height); slope:=x_height/28u;
penpos9(low_curve,theta); pos9'(low_curve,theta); z9=z9';
x7r-x7l=hround.5[vair,stem];
x9=x10=2.2u; x11=.5w-.5u; bot y9=-.15d; z9'=z9; bot y10l=-d-oo;
ellipse_set(6l,7l,8l,9l); ellipse_set(6r,7r,8r,9r);
{{less_tense; fill stroke z9e---z8e...{up}z7e...{left}z6e}}; % main stroke
if serifs: pos1(hair,180); pos0(flare,180); pos2'(vair,90); z2'=z2;
 y1=min(bh+.5flare+2vair+2,.9[bh,h]-.5flare);
 cyrbulb(2',1,0); % bulb
 pos10(vair,90); pos11(vair,135); y11=min(-3/4d-oo,y7l);
 filldraw stroke z11e{x10-x11,2(y10-y11)}
  ...z10e{left}...z9'e{z8e-z9e}; % tail
 % "hachek"
 penpos14(vair',90); penpos15(whatever,0);
 x14=x6l; y14=h+oo-eps;
 x6l-x15=x16-x6l=good.x 2.25u; y15=y16=h+.5acc_height+oo;
 penpos16(.25[vair,curve],angle(z16-z14)+90);
 z15l=z14l+whatever*(z14-z15); (x15r,y)=z14r+whatever*(z14-z15);
 fill stroke z15e--z14e{z16r-z14}..{.5right}z16e;  % diagonals
else: pos1(min(right_curve,1.2flare)-.2tiny,175); pos2'(vair,90);
 z2'=z2; y1l=max(.76h,top y5r+eps);
 filldraw stroke z1e{x2-x1,5(y2-y1)}...{right}z2'e;
 pos10(vair,45);
 filldraw stroke z10e{left}...z9'e{z8e-z9e}; % tail
 % "hachek"
 pickup pencircle scaled min(.5fine,.15vair);
 pos14(vair,0); pos16(vair,0); pos15(stem,0);
 x8-x14=x16-x8+eps; bot y15=h+oo-eps; x15=x6l;
 top y14=top y16=h+.5acc_height+oo; lft x14l=hround(rt x15r-3.25u-.5vair);
 z0=whatever[z14r,z15r]=whatever[z15l,z16l];
 filldraw z15l--z14l--z14r--z0--z16l--z16r--z15r--cycle; fi % diagonals
pickup fine.nib;
fill z5l{left}..if bot y5l>top y5r:(lft x5l,bot y5l)---(lft x5r,top y5r)
 else: (lft x5l,y5){down} fi ..{right}z5r--cycle; % bar
penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar;

lhchar "Lowercase Cyrillic letter psi";
cyrchar(psi,11.5u#,asc_height#,desc_depth#);
italcorr x_height#*slant;
if odd(stem'-w): change_width; fi % symmetric & all three equal
% ksi bowl;
adjust_fit(0 if monospace:-\\.5u#,-.5u#+ else:,fi\\ 0);
if odd(w-stem'): change_width; fi
pickup fine.nib; interim superness:=more_super;
lft x0=w-rt x8=hround .5u; x2=w-x6=x3+.25u;
pos3(curve,-180); pos5(curve,0); lft x3r=hround(2u-.5curve); x5=w-x3;
pos0(vair,90); pos1(vair,90); pos2(stem,0);
pos8(vair,90); pos7(vair,90); pos6(stem,180);
top y0r=top y1r=x_height+oo; y2=y6=3/4x_height; y7=y8=y0;
x1=w-x7=x2-1.25u;
filldraw stroke z0e{right}...z1e{right}...{-u,-x_height}z2e;  % right hook
filldraw stroke z8e{left}...z7e{left}...{u,-x_height}z6e;  % left hook
pos2'(stem,-180); z2'=z2; pos6'(stem,0); z6'=z6;
pos4(vair,-90); x4=.5w; y3=y5=.7[y4,.57x_height]; bot y4r=-oo;
filldraw stroke z2'e{-u,-x_height}...super_arc.e(3,4)&super_arc.e(4,5)
...{-u,x_height}z6'e;
%%%%%
% f stem
pickup tiny.nib; pos9(stem',0); pos10(stem,0);
pos0'(stem',0); pos1'(stem,0); z1'l=z0'l; x0'=x9; x1'=x10;
lft x9l=hround(.5w-.5stem'); top y9=h; % if serifs: +min(oo,serif_drop) fi;
numeric edge; edge=rt x10r;
y1'=ypart(((edge,body_height+2dot_size)--(edge,-o))
	intersectionpoint(z3r{down}...{right}z4r...{up}z5r));
pickup tiny.nib; bot y10=-d;
filldraw stroke z9e--z0'e--z1'e--z10e;  % stem
pickup crisp.nib; pos12(hair,0); pos11'(stem,0);
z11'=z10; x12l=x11'l; bot y12=0;
filldraw stroke z11'e--z12e;  % point
if serifs: numeric outer_jut; outer_jut=if monospace:1.414 fi jut;
 sloped_serif.l(9,0',a,1/3,outer_jut,serif_drop);  % upper serif
 dish_serif(10,1',b,1/3,outer_jut,c,1/3,outer_jut); fi  % lower serif
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar;

% WNCYR shape without serifs
lhchar "Lowercase Cyrillic letter fita (looks like Theta)";
cyrchar(fita,if serifs: 8u# else: 9u# fi,x_height#,0);
italcorr .7x_height#*slant-.5u#;
adjust_fit(0,0);
numeric light_curve; light_curve=hround(curve-2stem_corr);
penpos1(vair,90); penpos3(vround(vair+.5vair_corr),-90);
penpos2(light_curve,180); penpos4(light_curve,0);
x2r=hround max(.5u,1.25u-.5curve);
x4r=w-x2r; x1=x3=.5w; y1r=h+o; y2=y4=.5h-vair_corr; y3r=-o;
penstroke pulled_super_arc.e(1,2)(.5superpull)
 & pulled_super_arc.e(2,3)(.5superpull)
 & pulled_super_arc.e(3,4)(.5superpull)
 & pulled_super_arc.e(4,1)(.5superpull) & cycle;  % bowl
% hstroke
bar_stroke(x2,x4);  % bar
penlabels(1,2,3,4,5,6); endchar;

% for shape, see Knizhnay Shrift p 58  Bodoni, Parma 1818
lhchar "Lowercase Cyrillic letter izh_dgr - izhitsa double grave";
cyrchar_twice(izh_dgr,if serifs: 9.5u# else:9u# fi,x_height#,0);
italcorr x_height#*slant+.25u#;
adjust_fit(serif_fit# if monospace:+.5u#fi,
 if serifs: max(.75u#,.25u#+.5flare#) else:max(0,.5stem#-.5u#) fi); % lizh_adj
begingroup
% lower_izh;
numeric left_stem,right_stem,outer_jut,alpha,bulb_diam;
left_stem=stem-stem_corr; bulb_diam=7/8[hair,flare];
right_stem=min(hair if hefty:-2stem_corr fi,left_stem);
outer_jut=.75jut; x1l=l+letter_fit+outer_jut+.25u; x4r=w-x1l; y1=y4=h;
x2-x1=x4-x3; x2l+apex_corr=x3l; y2=y3=-apex_o;
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];
penpos4'(alpha*right_stem,0); penpos5(vair,90);
x5=if serifs: .5[x4',x6r] else:x6r fi; y5r=h+oo;
x6r=hround(r-.35u);
y6=max(vround(y5r-.25tiny-.5flare),
  min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare)); %zh bulb h
z4'=whatever[z3,z4]; y4'=min(y6-.5hair,8/5bar_height)-eps;
if serifs: penpos6(hair,0); penpos7(flare,0);
 cyrbulb(5,6,7); fi % bulb
if y0>cap_notch_cut: y0:=cap_notch_cut;
 fill z0+.5right{up}...{z4-z3}z4'l...{right}
      if serifs: z5r--z5l
      else:
         (.5[x4,x4r],y5r)--(fine.lft x5r,y5r)..(x5r,fine.bot y5r)--
         (x5l,fine.top y5l)..(fine.lft x5l,y5l) fi
  {left}...z4'r{z3-z4}
  --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--z4'l{z4-z3}...{right}z5r--z5l{left}...{z3-z4}z4'r
  --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);
 if rt x1'r+jut+.5u+1<=lft x4l-jut+.5tiny: inner_jut=jut;
  else: rt x1'r+inner_jut+.5u+1=lft x4l-inner_jut+.5tiny; fi
 save slab; slab:=Vround(vair-vair_corr); % lower.slab
 dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut); fi % left serif
%%%%%
endgroup;
% the accent
if monospace: hpos_corr=-2u; put_gravis; hpos_corr=2u; put_gravis;
else: hpos_corr=-1.5u; put_gravis; hpos_corr=1.5u; put_gravis; fi
repeat_once;
penlabels(0,1,2,3,4,5,6,7); endchar;

% modified numeral 8
lhchar "Lowercase Cyrillic letter uk";
cyrchar(uk,if serifs: 9.75u# else:10.5u# fi,asc_height#,0);
italcorr asc_height#*slant-.5u#;
adjust_fit(serif_fit# if monospace:+\\.5u#,.5u#+ else:,fi\\ serif_fit#);
% lower_uk;
numeric top_thickness,mid_thickness,bot_thickness,upper_side,lower_side,theta;
top_thickness=max(fine.breadth,vround(slab-2vair_corr));
if serifs:
 bot_thickness=max(fine.breadth,vround(slab-vair_corr));
 upper_side=max(fine.breadth,hround(.5[hair,stem]-stem_corr));
 lower_side=hround(.5[hair,stem]+stem_corr);
else:
 bot_thickness=vair';
 upper_side=max(fine.breadth,hround(.3[vair',stem]-stem_corr));
 lower_side=hround(.3[vair',stem]+stem_corr); fi
 x0=.5w; y0=if serifs:.7x_height else:bar_height fi; %h;%%%%%%%%%%%%%%
pickup fine.nib; theta=90-angle(20u,h); slope:=-h/20u;
if lower_side>1.2upper_side: upper_side:=lower_side; fi
pos1(top_thickness,-90); pos6(bot_thickness,-90);
x1=x6=.5w; top y1l=h+o; bot y6r=-o; pos0(fudged.stem-2stem_corr,theta);
lft x2l=w-rt x8l=hround 1.25u; lft x7r=w-rt x5r=hround 1.75u if not serifs:+.5u fi;
x2r-x2l=if serifs:fudged.stem else:upper_side fi-fine;
x5r-x5l=lower_side-fine;
ellipse_set(1l,2l,3l,0l); ellipse_set(1r,2r,3r,0r);
ellipse_set(6l,5l,4l,0l); ellipse_set(6r,5r,4r,0r);
numeric tau; tau=max(.8,.20710678/(superness-.5));
y2r:=y2l+serif_drop;
filldraw stroke z2e{down}
 ..z3e---z4e..z5e{down}..tension atleast tau..z6e{left};  % S stroke
pos7(lower_side,180); pos8(upper_side,180);
y7=.5[y5l,y5r]; y8=.5[y2l,y2r]; pos9(vair,90); z9=z0;
filldraw stroke z8e{down}
 ..tension atleast tau and atleast 1..{-18u,-.618h}z9e; % upper right stroke
filldraw stroke z6e{left}..tension atleast tau..z7e{up}
 ..tension atleast tau and atleast 1..{18u,.5h}z9e;% lower left stroke
if serifs:
% italic bulb
 z8'=z8; pos8'(upper_side,0);
 y1'+.5curve=h+oo; x1'=x8-max(u,.5u+.5curve);
 numeric theta; theta=angle(4(x8'-x1'),y8'-y1'); pos1'(curve,theta+90);
 filldraw z1'l{dir theta}..tension atleast 1 and 1..{down}z8'l
  --z8'r{up}...{-dir theta}z1'r..cycle;  % bulb
% from sloped serif
 pos12(slab,90); lft x12=x2l-.5jut; y12r=y2r-serif_drop; z14=z2l;
 filldraw z2r--z12r--z12l{right}
  ...1/3[(x14,y12l),.5[z12l,z14] ]{z14-z12l}
  ...{down}z14--(x2r,y14)--cycle; % sloped serif
else: pos10(flare,225); x10r=x1; y10l=h+oo;
 filldraw stroke z8e{up}...z10e; fi
%%%%%
penlabels(0,1,2,3,4,5,6,7,8,9,9',10,11,12); endchar;

lhchar "Lowercase Cyrillic letter omga_rnd - omega round";
cyrchar(omga_rnd,11u#,x_height#,0); %f width - eps
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);
if serifs: interim superness:=1.05 superness;
 else: interim superness:=1.075 superness; fi
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
% dots
if serifs: pickup crisp.nib; else: pickup fine.nib; fi
numeric bulb_diam; bulb_diam=hround 7/8[hair,flare];
z5=z1r; z6=z3r; x5'=x6'=x1; pos5(bulb_diam,0); pos6(bulb_diam,0);
bot y5'=max(.5h+1,bot y1l-.7bulb_diam);
top y6'=min(.5h-1,top y3l+.7bulb_diam);
pos6'(min(bulb_diam,vstem),0);
pos5'(min(bulb_diam,vstem),0);
filldraw circ_stroke z5e--z5'e; filldraw circ_stroke z6e--z6'e; %dots
penlabels(1,2,3,4,5,6); endchar;

lhchar "Lowercase Cyrillic letter omga_tlo - omega titlo";
cyrchar(omga_tlo,12u#,x_height#+acc_height#,0); %omga width
italcorr .7x_height#*slant;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); %o
full_w:=w; w:=.5w; full_h:=h; h:=x_height;
% lower_omega;
if odd(.6[vair',flare]-w): change_width; fi % symmetric & all three equal
if not serifs: interim superness:=more_super; fi
% omega_bowl;
pickup fine.nib;
pos2(vair',90); pos3(curve,180); pos4(vair',270);
x2=(.5(w+2.5u)); x4=(.5(w+u));
top y2r=vround(h+1.5oo); bot y4r=-oo;
lft x3r=(hround max(.6u,1.35u-.5curve)); y3=.5h; % eng
if serifs: pos1(hair,0); pos0(flare,0); pos5(.2[hair,stem],0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare);
 x5=w; y5=max(good.y(.5bar_height-.9),y4l+vair');
 rt x1r=min(2/3[x2,lft x5l],lft x5l-1);
 (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: pos5(.6[vair',flare],275); x5r=w;
 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) & term.e(4,5,right,.8,4); % arc and lower terminal
fi
%%%
% mirror + middle stem
forsuffixes $ = 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r:
 x.m$=l+(r-x$); y.m$=y$; endfor;
 lft x6l=min(lft x5l-1-eps,w-.5fudged.stem);
 x6r=l+(r-x6l); top y6l=top y6r=bar_height;
if serifs:
 filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull)
  & pulled_super_arc.e(.m3,.m4)(.5superpull)
  ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5e;  % arc and lower terminal
 path p.l,p.r; numeric t;
 p.l=z4r{right}..tension.9 and 1..{x5-x4,5(y5-y4)}z5r;
 p.r=z.m4r{left}..tension.9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r;
 t=xpart(p.r intersectiontimes p.l); if t<0: t:=1; fi
 filldraw reverse subpath(t,1) of p.r---z6r..z6l---subpath(t,1) of p.l..cycle; %middle stem
else:
 filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull)
  & pulled_super_arc.e(.m3,.m4)(.5superpull) & term.e(.m4,.m5,left,.8,4); % arc and lower terminal
 path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4);
 p.r=term.r(.m4,.m5,left,.8,4);
 t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l);
 filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem
fi
%%%%%
% the accent
w:=full_w; h:=full_h;
% low_palatal(expr .5w+u,0,-o);
x_center:=.5w+u; x_move:=0; y_move:=-o;
_one:=8; _two:=9; _three:=10; _four:=11;
_five:=12; _six:=13; _seven:=14; _eight:=15; _nine:=16;
%
% frown part
pickup fine.nib; numeric frown_width,flare_width;
frown_width=max(fine.breadth,.6[thin_join,vair]);
flare_width=max(fine.breadth,.5[thin_join,flare]);
penpos[_one](frown_width,180); penpos[_three](frown_width,0);
penpos[_two](frown_width,90);
top y[_two]r=y_move+x_height+max(if serifs:.75 fi acc_height,frown_width+1);
x[_two]=x_center-u; lft x[_one]r=hround(x[_two]-1.5u-0.5frown_width);
rt x[_three]r=hround(x[_two]+1.5u+0.5frown_width);
bot y[_one]=bot y[_three]=y_move+vround
   max(x_height+oo+tiny,1/3[x_height,h]+oo-.5frown_width);
%fill stroke z[_one]e{up}...z[_two]e{right}...{down}z[_three]e;  % stroke
% tilde part
penpos[_five](frown_width,180); penpos[_seven](frown_width,90);
penpos[_seven]'(flare_width,0);
bot y[_six]l=y[_two]r+.5flare_width;
rt x[_five]l=x[_one]r-.5flare_width;
x[_six]=x[_two]+.25u; x[_six]-x[_five]l=x[_seven]'l-x[_six];
rt x[_seven]=max(x[_six]+5.5u
 if monospace:/expansion_factor fi,x[_three]r+.5frown_width);
penpos[_six](flare_width,90);
bot y[_five]=bot y[_seven]'=bot y[_one]; bot y[_seven]l=x_height+oo;
forsuffixes e=l,r: path p.e;
p.e=(x[_five]e,y[_five]e+.5fine){up}
 ...z[_six]e{right}...{down}z[_seven]'e; endfor
fill subpath(0,1.5) of p.l..tension.85..
 {right}(x[_seven]l-.5fine,y[_seven]l)
 ...z[_seven]...(x[_seven]r-.5fine,y[_seven]r){left}
 ..tension.85..reverse subpath(0,1.6) of p.r...z[_five]...cycle;  % stroke
%%%
penlabels(1,2,3,4,5,6, 8,9,10,11,12,13,14,15,16); endchar;

lhchar "Lowercase Cyrillic letter ot";
cyrchar(ot,12u#,x_height#+acc_height#,0);%omga width
italcorr .7x_height#*slant;
adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi); %o
full_w:=w; w:=.5w; full_h:=h; h:=x_height;
% lower_omega;
if odd(.6[vair',flare]-w): change_width; fi % symmetric & all three equal
if not serifs: interim superness:=more_super; fi
% omega_bowl;
pickup fine.nib;
pos2(vair',90); pos3(curve,180); pos4(vair',270);
x2=(.5(w+2.5u)); x4=(.5(w+u));
top y2r=vround(h+1.5oo); bot y4r=-oo;
lft x3r=(hround max(.6u,1.35u-.5curve)); y3=.5h; % eng
if serifs: pos1(hair,0); pos0(flare,0); pos5(.2[hair,stem],0);
 y1=min(bar_height+.5flare+2vair'+2,.9[bar_height,h]-.5flare);
 x5=w; y5=max(good.y(.5bar_height-.9),y4l+vair');
 rt x1r=min(2/3[x2,lft x5l],lft x5l-1);
 (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: pos5(.6[vair',flare],275); x5r=w;
 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) & term.e(4,5,right,.8,4); % arc and lower terminal
fi
%%%
% mirror + middle stem
forsuffixes $ = 2l,2,2r,3l,3,3r,4l,4,4r,5l,5,5r:
 x.m$=l+(r-x$); y.m$=y$; endfor;
 lft x6l=min(lft x5l-1-eps,w-.5fudged.stem);
 x6r=l+(r-x6l); top y6l=top y6r=bar_height;
if serifs:
 filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull)
  & pulled_super_arc.e(.m3,.m4)(.5superpull)
  ..tension .9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5e;  % arc and lower terminal
 path p.l,p.r; numeric t;
 p.l=z4r{right}..tension.9 and 1..{x5-x4,5(y5-y4)}z5r;
 p.r=z.m4r{left}..tension.9 and 1..{x.m5-x.m4,5(y.m5-y.m4)}z.m5r;
 t=xpart(p.r intersectiontimes p.l); if t<0: t:=1; fi
 filldraw reverse subpath(t,1) of p.r---z6r..z6l---subpath(t,1) of p.l..cycle; %middle stem
else:
 filldraw stroke pulled_super_arc.e(.m2,.m3)(.7superpull)
  & pulled_super_arc.e(.m3,.m4)(.5superpull) & term.e(.m4,.m5,left,.8,4); % arc and lower terminal
 path p.l,p.r; numeric t; p.l=term.r(4,5,right,.8,4);
 p.r=term.r(.m4,.m5,left,.8,4);
 t=ypart(((x6l,0)--(x6l,h)) intersectiontimes p.l);
 filldraw reverse subpath(t,1) of p.r---z6r--z6l---subpath(t,1) of p.l..cycle; %middle stem
fi
%%%%%
% the accent
% low_te(6);
_zero:=7; x7=.5[x6l,x6r];
_one:=8; _two:=9; _three:=10; _four:=11; _five:=12;
%
if serifs: pickup crisp.nib;
 else: pickup pencircle scaled min(.5fine,.15vair); fi
numeric stem[]; stem1=if hefty: fudged.hair-2stem_corr else: .7[vair,stem] fi;
stem2=if serifs: vair else: max(currentbreadth+eps,.6[thin_join,vair]) fi;
stem3=if serifs: hair else: max(currentbreadth+eps,.6[thin_join,vair]) fi;
pos[_one](stem1,0); pos[_two](stem1,0);
lft x[_one]l=lft x[_two]l=hround(x[_zero]-.5stem1);
numeric mid_thickness;
mid_thickness=vround if serifs:1/4 else: 1/3 fi[vair,stem];
bot y[_two]=bot y[_four]=bot y[_five]=
  vround max(h+o+max(tiny,.5mid_thickness),1/3[h,h+acc_height]+o-.5mid_thickness);
top y[_one]=top y[_three]r=max(h+acc_height,bot y[_two]+1.5vair);
filldraw stroke z[_one]e--z[_two]e; % stem
pos[_three](stem2,90); pos[_four](stem3,0); pos[_five](stem3,180);
x[_three]=x[_one];
rt x[_four]r=hround(x[_zero]+2.5u if monospace:/expansion_factor fi+.5vair);
x[_four]-x[_three]=x[_three]-x[_five];
z[_four]'=beak_darkness[(x[_four]l,y[_three]l),
 .5[(x[_one]r,y[_three]l),z[_four]l] ];
z[_five]'=beak_darkness[(x[_five]l,y[_three]l),
 .5[(x[_one]l,y[_three]l),z[_five]l] ];
filldraw z[_four]r--z[_four]l{up}...z[_four]'
 ...{left}(x[_one]r,y[_three]l)--(x[_one]r,y[_three]l){left}...z[_five]'
 ...{down}z[_five]l--z[_five]r---
 (x[_five]r,y[_three]r)---(x[_four]r,y[_three]r)---cycle;
%%%
penlabels(1,2,3,4,5,6, 8,9,10,11,12); endchar;

lhchar "Lowercase Cyrillic letter koppa (looks like c with tail)";
cyrchar(koppa,8u#,x_height#,desc_depth#);
italcorr x_height#*slant-.2u#;
adjust_fit(if monospace: .5u#,.5u# else: -.1u#,0 fi);
pickup fine.nib; pos2(vair,90);
x2=.5(w+u); top y2l=vround(h+1.5oo);
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
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); fi % upper terminal
numeric theta; theta=-90-angle(27u,x_height); slope:=x_height/-27u;
pos5(fudged.stem-4stem_corr,theta);
pos6(max(fine.breadth,.6[thin_join,vair]),135);
lft x3r=hround max(.6u,1.35u-.5curve); x3l-x3r=hround.8[vair,fudged.stem]-fine;
x5+u=x6=w-2u; y5=.1d; bot y6l=-d-oo;
ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r);
{{less_tense;
 filldraw stroke z6e{right}...z5e---z4e...{up}z3e...{right}z2e}}; % main stroke
penlabels(0,1,2,3,4,5,6); endchar;
