%
% lgberstc.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 letters used in files beresta(r/e): file #3
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% List of letternames
%
% Lflap
% Lengma
% Lesh
% LVphi
% Lchi
% LVtheta
% Ltau
% Llig_ue
% Llig_uo
% Lnb
% Leth
% Lenya
% Lketen
%%%
% Cdej
% Cz_mtI
% Cz_mtII
% Cz_mtIII
% Cz_dsc
% Cl_mtl
% Cn_mtl
% Cn_bartl
%
% Cs_mtl
% Ct_mtl
% Ct_v
% Ctch
% Cchit
% Cc_tl
% Csh_lngst
%

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

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

lhchar "Lowercase Special letter Lengma";
cyrchar(Lengma,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);
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;

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

lhchar "Lowercase Special letter LVphi";
cyrchar(LVphi,11u#,x_height#,desc_depth#);
italcorr .7x_height#*slant;
adjust_fit(0,0); pickup fine.nib;
pos1(hair,-180); x1=x2+.75u; top y1=h;
pos2(hair,-180); lft x2r=hround .5u; y2=bar_height;
pos3(vstem,-90); x3=.5(w+u); bot y3r=-oo;
pos4(hair,0); rt x4r=hround(w-.5u); y4=y2;
pos5(vstem,90); x5=.52[x6,x4]; top y5r=h+oo;
pos6(hair,180); x6=x7; y6=1/3h;
pos7(stem,180); lft x7r=hround(.5w-.5u-.5stem); y7-.5stem=-d-o;
filldraw circ_stroke z7e---z6e...{right}z5e...{down}z4e...{left}z3e
 ...{up}z2e...{3(x1-x2),y1-y2}z1e;  % bowl and stem
penlabels(1,2,3,4,5,6,7); endchar;

lhchar "Lowercase Special letter Lchi";
cyrchar(Lchi,11u#,x_height#,desc_depth#);
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; x6=w-x1; x2=w-x5=u;
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; y4l=y5l+h/8; z3l=whatever[z2',z0]; z4r=whatever[z0,z5'];
filldraw stroke z1e{up}...z2e{right}...z3e{z4r-z3l}
 ..z4e{z4r-z3l}...{right}z5e...{up}z6e;  % major diagonal and hooks
x8=w-x7=2u; y7+.5hair=h; y8-.5hair=-d;
numeric theta; theta=angle(z7-z8)-90;
pos7(hair,theta); pos8(hair,theta);
filldraw z7l---z8l..z8r---z7r..cycle;  % minor diagonal
penlabels(0,1,2,2',3,4,5',5,6,7,8); endchar;

lhchar "Lowercase Special letter LVtheta";
cyrchar(LVtheta,9u#,asc_height#,0);
italcorr .5[bar_height#,x_height#]*slant+.5vair#+.5u#;
adjust_fit(0,0); pickup fine.nib;
numeric light_curve; light_curve=hround .5[stem,curve];
x0=0; x2-.5stem=hround(2.5u-.5stem); hook_in(0,1,2);  % opening hook
pos2'(stem,-180); z2'=z2; pos3(stem,-180); pos4(vair,-90);
pos5(light_curve,0); pos6(vair,90); pos7(hair,180); pos8(vair,270);
x3=x2; x4=x6=.5[x3,x5]; rt x5r=hround(w-1.5u+.5light_curve);
lft x7r=hround(3.25u-.5hair); x8+.5vair=hround(w+.5vair-epsilon);
y3=.4x_height; bot y4r=-oo; y5=.5[y4,y6]; top y6r=h+oo;
y7=.5[x_height,h]; y8=.5[bar_height,x_height];
filldraw stroke z2'e..{{interim superness:=hein_super; super_arc.e(3,4)}}
 & pulled_arc.e(4,5) & pulled_arc.e(5,6)
 ...{down}z7e...{4(x8-x7),y8-y7}z8e;  % bowl and loop
penlabels(0,a,1,2,3,4,5,6,7,8); endchar;

lhchar "Lowercase Special letter Ltau";
cyrchar(Ltau,9u#,x_height#,0);
italcorr x_height#*slant+.5stem#-u#;
adjust_fit(0,0); pi_stroke; % hook and bar
pos4(hair,0); pos5(stem,0);
x4=x5; x5-.5stem=hround(.5w-.5u-.5stem); y4=y2; y5-.5stem=-oo;
filldraw circ_stroke z5e--z4e;  % stem
penlabels(1,2,3,4,5); endchar;

lhchar "Lowercase Special letter Llig_ue";
cyrchar(Llig_ue,7.25u#+max(.75u#,.5curve#),x_height#,0);
italcorr .5[bar_height#,x_height#]*slant+.5min(curve#-1.5u#,0);
adjust_fit(5.5u#, if monospace:.5u# else: 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
%u
numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi;
if light_vair<fine.breadth: light_vair:=fine.breadth; fi
pickup tiny.nib; pos10(stem,0); pos20(stem,0);
lft x10l=l+letter_fit+hround(2.5u-.5stem); x10=x20;
if serifs: top y10=h+min(oo,serif_drop); else: top y10=h; fi
penpos20'(stem-fine,-180); z20'=z20; y20=.5bar_height;
penpos50(max(eps,light_vair-fine),-90); penpos60(thin_join-fine,0);
y60=2/3bar_height; x.b0=x10+5u-.5stem; lft x60l=tiny.lft x.b0;
filldraw stroke z10e--z20e;  % left stem
pickup fine.nib; bot y50r=-oo; x50l=x10+2.25u;
(s,y50r)=whatever[z50l,z60l]; x50r:=max(s,.5[x50,x20'r]);
path upath.r,upath.l; numeric upoint.r,upoint.l;
forsuffixes e=l,r: upath.e=z50e{right}...{up}z60e;
upoint.e=ypart((super_arc.r(3,4)) intersectiontimes upath.e); endfor;
filldraw stroke {{interim superness:=hein_super;
  pulled_arc.e(20',50)}} & subpath(0,upoint.e) of upath.e;  % arc
if serifs: sloped_serif.l(10,20,a,1/3,jut,serif_drop); fi % upper left serif
penlabels(0,1,2,3,4,510,20,20',50,60); endchar;

lhchar "Lowercase Special letter Llig_uo";
cyrchar(Llig_uo,9u#,x_height#,0);
italcorr .7x_height#*slant;
%adjust_fit(if monospace: .5u#,.5u# else: 0,0 fi);
adjust_fit(5.5u#,if monospace: .5u# else: 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
%u
numeric light_vair; light_vair=vair if hefty: -vround 2vair_corr fi;
if light_vair<fine.breadth: light_vair:=fine.breadth; fi
pickup tiny.nib; pos10(stem,0); pos20(stem,0);
lft x10l=l+letter_fit+hround(2.5u-.5stem); x10=x20;
if serifs: top y10=h+min(oo,serif_drop); else: top y10=h; fi
penpos20'(stem-fine,-180); z20'=z20; y20=.5bar_height;
penpos50(max(eps,light_vair-fine),-90); penpos60(thin_join-fine,0);
y60=2/3bar_height; x.b0=x10+5u-.5stem; lft x60l=tiny.lft x.b0;
filldraw stroke z10e--z20e;  % left stem
pickup fine.nib; bot y50r=-oo; x50l=x10+2.25u;
(q,y50r)=whatever[z50l,z60l]; x50r:=max(q,.5[x50,x20'r]);
path upath.r,upath.l; numeric upoint.r,upoint.l;
forsuffixes e=l,r: upath.e=z50e{right}...{up}z60e;
upoint.e=ypart((pulled_arc.r(2,3)) intersectiontimes upath.e); endfor;
filldraw stroke {{interim superness:=hein_super;
  pulled_arc.e(20',50)}} & subpath(0,upoint.e) of upath.e;  % arc
if serifs: sloped_serif.l(10,20,a,1/3,jut,serif_drop); fi % upper left serif
penlabels(1,2,3,4,10,20,20',50,60); endchar;

lhchar "Lowercase Special letter Lnb - like italic yat";
cyrchar(Lnb,13u#,x_height#,0);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); full_w:=w; w:=10u;
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
lft x1l=lft x2l=hround(2.5u-.5stem); top y1=h; bot y2=0;
filldraw stroke z2e--z1e;  % left stem
pickup fine.nib;
x4+.5stem=hround(w-2.5u+.5stem); x5=x4; ital_arch(2,3,4);  % arch
y5=.5bar_height; pos5(stem,0);
filldraw stroke z4e{down}..z5e;  % right stem
w:=full_w;
x23=x25=.5[x5,x24]; rt x24r=hround(w-u+.5curve);
bot y23r=-oo; top y25r=1.2bar_height+oo; y24=.5[y23,y25]; %y24=y5;
z7'=z5; pos7'(stem,-180);
z20=z5; pos20(hair,180); pos23(vair,-90); pos24(curve,0); pos25(vair,90);
filldraw stroke pulled_arc.e(7',23) & pulled_arc.e(23,24)
 & pulled_arc.e(24,25) & super_arc.e(25,20);  % bowl
if serifs: sloped_serif.l(1,2,a,1/3,jut,serif_drop); % upper left serif
dish_serif(2,1,b,1/3,jut,c,1/3,jut); fi % lower left serif
endchar;

lhchar "Lowercase  Special letter Leth";
cyrchar(Leth,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;
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;

lhchar "Lowercase  Special letter Lenya";
cyrchar(Lenya,10.5u#,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(3u-.5stem); x1l=x1'l=x2l=x2'l=x8l; x3=w+.5u-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; rt x7l=floor .75u 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;

if unknown italic: boolean italic; italic=false; fi
iff not italic:%
lhchar "Lowercase Special letter Lketen";
cyrchar(Lketen,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);
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); fi % lower left serif
% dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
% stuff added
z4'=z4; x8=x4; bot y8=-1/3d;
penpos8(rt x4r-lft x4l,0); penpos4'(rt x4r-lft x4l,0);
pickup tiny.nib; fill stroke z4'e--z8e;  % right stem continuation
 penpos5(vair,-90); penpos6(.7[hair,stem],-180);
 penpos7(.7[thin_join,vair],-270);
 x5=.5[x8,x6r]; y5r=-d-oo; y6=-2/3d;
 x6=hround (x8-min(2.65u,2u+.65stem)); z7=(x4'l,-.5vair);
 fill stroke pulled_arc.e(8,5)
 ...z6e{up}...{right}z7e;  % arc and bulb
penlabels(1,2,3,4,5,6,7,8); endchar;

iff italic:%
lhchar "Italic Special letter Lketen";
cyrchar(Lketen,10u#,x_height#,desc_depth#);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); pickup fine.nib;
x0=0; x1=x2; pos2(stem,0); lft x2l=hround(2.5u-.5stem); y2-.5stem=-oo;
hook_in(0,a,1); % opening hook
filldraw circ_stroke z2e--z1e; % left stem
x4+.5stem=hround(w-2.5u+.5stem); ital_arch(2,3,4); % arch
% stuff added
z4'=z4; x8=x4; bot y8=-1/3d;
penpos8(rt x4r-lft x4l,0); penpos4'(rt x4r-lft x4l,0);
pickup tiny.nib; fill stroke z4'e--z8e;  % right stem continuation
 penpos5(vair,-90); penpos6(.7[hair,stem],-180);
 penpos7(.7[thin_join,vair],-270);
 x5=.5[x8,x6r]; y5r=-d-oo; y6=-2/3d;
 x6=hround (x8-min(2.65u,2u+.65stem)); z7=(x4'l,-.5vair);
 fill stroke pulled_arc.e(8,5)
 ...z6e{up}...{right}z7e;  % arc and bulb
penlabels(0,a,1,2,3,4,5,6,7); endchar;

lhchar "Lowercase Special letter Cdej";
cyrchar(Cdej,10u# if not serifs:+.5width_adj# fi % d_width;n_width
 ,x_height#,sbeak#);
italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut
adjust_fit(serif_fit#
 if not serifs:+\\.5(stem#-u#),.5(stem#-u#)+ else:,fi\\ serif_fit#); %dl_adj
% lower_d;
pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0);
rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; %stem
numeric light_hair,light_stem,outer_jut;
light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi;
light_stem=max(tiny.breadth,min(fudged.stem,fudged.hair if hefty:-4stem_corr fi));
outer_jut=
   if serifs: max(limit_dist,1.1jut) else: hround (r-rt x2r-.5u) fi;
penpos3(light_hair,0); penpos0(light_hair,0); x0=x3-eps; y0=0; y3=h;
x3=1/3[w-rt x1r-1/8(outer_jut if not serifs:-.5(stem-u) fi),rt x1r]
    if not serifs: -.5(stem-u) fi +eps;
x4l=w-rt x1r-1/3outer_jut-eps; y4l=vair;
x2'=x2; y2'=if serifs: 1/2 else: 2/3 fi h;
penpos4(light_hair,angle((y2',-x2')-(y4l,-x4l))); if y4r<0: y4r:=0; fi
fill z4l{z2'-z4}...{up}diag_end(0l,3l,1,1,3r,0){down}
 ...{z4-z2'}z4r--cycle; %left stem
numeric inner_jut;
save slab; % lower.slab
if serifs:
 inner_jut=.5(x1l-lft x3r)+.5crisp+eps; prime_points_inside(3,0);
 slab:=Vround(vair-vair_corr); % lower.slab
 nodish_serif(3',0,a,1/3,jut,b,1/3,inner_jut);  % upper left serif
 nodish_serif(1,2,c,1/3,inner_jut,d,1/3,jut);  % upper right serif
else:
 pos3'(vair,90); pos1'(vair,90);
 lft x3'=x3l; top y3'r=top y1'r=h; rt x1'=x1;
 filldraw stroke z3'e--z1'e; fi % upper bar
% lower descenders
slab:=vair; % lower.slab
inner_jut:=.5(x2l+x2r-w)+eps;
%r_serif(2,1,e,1/3,inner_jut,f,1/3,beak_darkness,outer_jut,.6beak_jut); % right descender
% lower de_serif
pickup if serifs: crisp.nib
       else: pencircle scaled (3/5[fine,crisp]+eps) fi;
top y5-slab-eps=bot y0'+eps=tiny.bot y2;
bot y6=bot y7=-d;
lft x5=w-tiny.rt x1r-outer_jut;
lft x6=rt x7-light_stem-eps=lft x5-.6beak_jut;
pair beak_corner;
ypart beak_corner=y0'; beak_corner=z7+whatever*(z5-z6);
x8=w-x1+.5stem; x0'=w-x1+inner_jut; y8=y0';
filldraw z5--z6--z7{z5-z6}
    ...beak_darkness[beak_corner,.5[z7,z8]]
    ...{right}z8---z0'--(x0',y5)--cycle; % de_serif
if serifs:
   numeric bracket_height;
   bracket_height=min(y2+bracket,y1);
   if bracket_height>y4l:
      path p.r,p.l; y5:=top y5;
      p.r=(z4r{z2'-z4}...{up}z3r); p.l=(z4l{z2'-z4}...{up}z3l);
      forsuffixes e=l,r:
          z9e=((0,bracket_height)--(w,bracket_height)) intersectionpoint p.e;
      endfor
      vardef t (suffix @) =
          angle direction directiontime z9@ of p.@ of p.@ enddef;
      fill z9l{dir (t(l)+180)}...1/3[(x4l,y5),.5[z9l,z5]]{z5-z9l}
          ...{left}z5--(x5,y0')--z0'--(x0',y5)
          --(x9r+(light_stem/bracket_height)*(x4r-x4l),y5){left}
          ...{dir t(r)}z9r--cycle; % top part of de_serif
   fi
fi
%%%%%
slab:=vair; % lower.slab
nodish_serif(2,1,g,1/3,inner_jut,h,1/3,jut); % lower right serif
d:=desc_depth;
% l_tail(17);
_zero:=17; rt x17r=rt x2r+jut; y17=y2; pos17(fudged.stem-2stem_corr,0);
_one:=11; _two:=12; _three:=13; _four:=14; _five:=15;
%
pickup fine.nib;
pos[_five](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0);
pos[_one](tiny.rt x[_zero]r-tiny.lft x[_zero]l,0);
z[_five]=z[_zero]; x[_one]r=x[_five]r;
bot y[_one]=max(-1/3d,-d+vair'+eps);
if serifs:
 numeric bulb_diam;
 bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare]));
 pos[_two](vair',-90); pos[_three](hair,-180);
 pos[_four](bulb_diam,-180);
 x[_two]=.5[x[_one],x[_three]r];
 bot y[_two]r=-d-oo; y[_three]-.5bulb_diam=-.85d;
 z[_three]r=z[_four]r;
 rt x[_four]l=max(x[_zero]l-bulb_diam,
  floor x[_zero]-2.5u if monospace: / expansion_factor fi);
 (x,y[_two]r)=whatever[z[_two]l,z[_one]l];
 x[_two]r:=max(x,.5[x[_three]r,x[_two]]);
 filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]);
 bulb([_two],[_three],[_four]); % bulb
else:
 pos[_two](vair',-90); pos[_three](.6[vair',flare],-105);
 rt x[_three]r=x[_zero]-3u; bot y[_three]r=-d;
 bot y[_two]r=-d-oo; x[_two]=.4[x[_three]r,x[_zero]r];
 filldraw stroke z[_five]e--super_arc.e([_one],[_two])
  & term.e([_two],[_three],left,.8,4); fi
%%%
penlabels(0',1',1,2,3,4,5,6,9,10, 11,12,13,14,15,17); endchar;

lhchar "Lowercase  Special letter Cz_mtI";
cyrchar(Cz_mtI,8u#,x_height#,0);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p
adjust_fit(if monospace: .5u# else:.1u# fi,max(2u#,1.5u#+.5stem#));
numeric right_curve; if serifs: right_curve=curve-stem_corr;
 else: right_curve=curve-3stem_corr; fi
penpos2(vair,90); penpos3(right_curve-stem_corr,0);
penpos7(right_curve,0); penpos8(vair',-90);
y2r=h+oo; x2=x6l=x6r=x8=.5[u,x7]; x7r=hround(w-.6u);
x3r=min(rt x7r-1,hround(w-u)); y3=.5[y4l,y2l]+eps; y8r=-oo;
set_bar_axis; y4l=y5r=y6r=y2.bh; y6l=y5l=y4r=y1.bh; y5=y6=y0.bh;
if serifs: lft x1r=lft x9r=hround.5u;
 y1=min(bar_height+2vair'+2,.9[bar_height,h]-flare);
 y9=max(good.y(.5bar_height-.9),y8l+vair'); pos1(hair,180); pos9(hair,-180);
else: lft x1r=hround.6u; lft x9r=hround.5u;
 pos1(min(right_curve,1.2flare)-.2tiny,175); %hair
 pos9(right_curve-stem_corr-.2tiny,-175); %hair
 y1l=max(.76h,top y5r+eps); y9r=min(.25h,bot y5l-eps); fi
lft x5l=lft x5r=min(max(hround 2.2u,rt x1l+.5vair)+eps,lft x6l-fine);
y7=.5[y6l,y8l]; x4l=x4r=1/3[x5l,x3l];
fill stroke super_arc.e(2,3) & super_arc.e(3,4); % upper bowl
fill stroke z5e..super_arc.e(6,7) & super_arc.e(7,8); % lower bowl
pickup fine.nib;
fill z5r..
 if bot y5r>top y5l:(lft x5r,bot y5r)--(lft x5l,top y5l) else: (lft x5r,y5) fi
 ..z5l--cycle; % bar
pos2'(vair,90); z2'=z2; pos8'(vair',-90); z8'=z8;
filldraw stroke z1e{x2-x1,15(y2-y1)}....{right}z2'e; % tension atleast .95  upper bowl
if serifs: path upper_arc;
upper_arc=z1{x2-x1,15(y2-y1)}....{right}z2; % tension atleast .95
 pos20(.3[fine.breadth,hair],0); x20l=x1r; top y20=h+oo;
 x1'-x1l=2curve; y1'=y1;
 numeric t; t=xpart(upper_arc intersectiontimes (z20r--z1'));
 filldraw z1r--z20l--z20r--subpath(t,0) of upper_arc--cycle; fi % upper serif
% misc tail
bar_stroke(x6l,hround (r-1/3u));
penpos13(vair,90); penpos14(hair,180); penpos15(vair,90);
x15=x7r; y15=y13; z14=.5[z15,z11r]; z13l=z8r;
fill stroke z13e{right}...z15e{right}...z14e{up}...{right}z11e;
penlabels(0,1,2,3,4,5,6,7,8,9,10,13,14,15,20); endchar;

lhchar "Lowercase  Special letter Cz_mtII";
cyrchar(Cz_mtII,8u#,x_height#,0);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p
adjust_fit(if monospace: .5u# else:.1u# fi,max(1.5u#,u#+.5stem#));
numeric right_curve; if serifs: right_curve=curve-stem_corr;
 else: right_curve=curve-3stem_corr; fi
penpos2(vair,90); penpos3(right_curve-stem_corr,0);
penpos7(right_curve,0); penpos8(vair',-90);
y2r=h+oo; x2=x6l=x6r=x8=.5[u,x7]; x7r=hround(w-.6u);
x3r=min(rt x7r-1,hround(w-u)); y3=.5[y4l,y2l]+eps; y8r=-oo;
set_bar_axis; y4l=y5r=y6r=y2.bh; y6l=y5l=y4r=y1.bh; y5=y6=y0.bh;
if serifs: lft x1r=lft x9r=hround.5u;
 y1=min(bar_height+2vair'+2,.9[bar_height,h]-flare);
 y9=max(good.y(.5bar_height-.9),y8l+vair'); pos1(hair,180); pos9(hair,-180);
else: lft x1r=hround.6u; lft x9r=hround.5u;
 pos1(min(right_curve,1.2flare)-.2tiny,175); %hair
 pos9(right_curve-stem_corr-.2tiny,-175); %hair
 y1l=max(.76h,top y5r+eps); y9r=min(.25h,bot y5l-eps); fi
lft x5l=lft x5r=min(max(hround 2.2u,rt x1l+.5vair)+eps,lft x6l-fine);
y7=.5[y6l,y8l]; x4l=x4r=1/3[x5l,x3l];
fill stroke super_arc.e(2,3) & super_arc.e(3,4); % upper bowl
fill stroke z5e..super_arc.e(6,7); % & super_arc.e(7,8); % lower bowl
pickup fine.nib;
z7'=z7; x8''=x7'; bot y8''=0; pos7'(right_curve,0); pos8''(right_curve,0);
filldraw stroke z7'e--z8''e; % stem
fill z5r..
 if bot y5r>top y5l:(lft x5r,bot y5r)--(lft x5l,top y5l) else: (lft x5r,y5) fi
 ..z5l--cycle; % bar
pos2'(vair,90); z2'=z2; pos8'(vair',-90); z8'=z8;
filldraw stroke z1e{x2-x1,15(y2-y1)}....{right}z2'e; % tension atleast .95  upper bowl
if serifs: path upper_arc;
upper_arc=z1{x2-x1,15(y2-y1)}....{right}z2; % tension atleast .95
 pos20(.3[fine.breadth,hair],0); x20l=x1r; top y20=h+oo;
 x1'-x1l=2curve; y1'=y1;
 numeric t; t=xpart(upper_arc intersectiontimes (z20r--z1'));
 filldraw z1r--z20l--z20r--subpath(t,0) of upper_arc--cycle; fi % upper serif
% misc_tail
bar_stroke(x6r,hround (r-1/3u));
penpos13(vair,90); penpos14(hair,180);
x13r=x8''r; y13l=0; z14=.5[z13,z11r];
fill stroke z13e{right}...z14e{up}...{right}z11e;
penlabels(0,1,2,3,4,5,6,7,8,9,10,20); endchar;

lhchar "Lowercase  Special letter Cz_mtIII";
cyrchar(Cz_mtIII,8u#,x_height#,desc_depth#);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p
adjust_fit(if monospace: .5u#,.4u# else:.1u#,if serifs:0 else:-.2u# fi fi);
numeric right_curve; if serifs: right_curve=curve-stem_corr;
 else: right_curve=curve-3stem_corr; fi
penpos2(vair,90); penpos3(right_curve-stem_corr,0);
penpos7(right_curve,0); penpos8(vair',-90);
y2r=h+oo; x2=x6l=x6r=x8=.5[u,x7]; x7r=hround(w-.6u);
x3r=min(rt x7r-1,hround(w-u)); y3=.5[y4l,y2l]+eps; y8r=-oo;
set_bar_axis; y4l=y5r=y6r=y2.bh; y6l=y5l=y4r=y1.bh; y5=y6=y0.bh;
if serifs: lft x1r=lft x9r=hround.5u;
 y1=min(bar_height+2vair'+2,.9[bar_height,h]-flare);
 y9=max(good.y(.5bar_height-.9),y8l+vair'); pos1(hair,180); pos9(hair,-180);
else: lft x1r=hround.6u; lft x9r=hround.5u;
 pos1(min(right_curve,1.2flare)-.2tiny,175); %hair
 pos9(right_curve-stem_corr-.2tiny,-175); %hair
 y1l=max(.76h,top y5r+eps); y9r=min(.25h,bot y5l-eps); fi
lft x5l=lft x5r=min(max(hround 2.2u,rt x1l+.5vair)+eps,lft x6l-fine);
y7=.5[y6l,y8l]; x4l=x4r=1/3[x5l,x3l];
fill stroke super_arc.e(2,3) & super_arc.e(3,4); % upper bowl
fill stroke z5e..super_arc.e(6,7) & super_arc.e(7,8); % lower bowl
pickup fine.nib;
fill z5r..
 if bot y5r>top y5l:(lft x5r,bot y5r)--(lft x5l,top y5l) else: (lft x5r,y5) fi
 ..z5l--cycle; % bar
pos2'(vair,90); z2'=z2; pos8'(vair',-90); z8'=z8;
filldraw stroke z1e{x2-x1,15(y2-y1)}....{right}z2'e; % tension atleast .95  upper bowl
if serifs: path upper_arc;
upper_arc=z1{x2-x1,15(y2-y1)}....{right}z2; % tension atleast .95
 pos20(.3[fine.breadth,hair],0); x20l=x1r; top y20=h+oo;
 x1'-x1l=2curve; y1'=y1;
 numeric t; t=xpart(upper_arc intersectiontimes (z20r--z1'));
 filldraw z1r--z20l--z20r--subpath(t,0) of upper_arc--cycle; fi % upper serif
%
penpos18(hair,0); penpos28(hair,90); penpos38(hair,90);
x28=x8; x38=fine.lft x7r; y28=y38=-1/3d; y18=.5[y8r,y28r]; x18r=x8-.5(y8r-y28r);
fill stroke z8e{left}...z18e{down}...{right}z28e--z38e;
filldraw (x38,y38)--(x38,-d)--(.67[x28,x38],y28)--cycle;
penlabels(0,1,2,3,4,5,6,7,8,9,10,20); endchar;

lhchar "Lowercase Special letter Cz_dsc";
cyrchar(Cz_dsc,8u#,x_height#,0);
italcorr .5x_height#*slant+min(.5curve#-.85u#,-.1u#); %p
adjust_fit(if monospace: .5u#,.4u# else:.1u#,if serifs:0 else:-.2u# fi fi);
numeric right_curve;
if serifs: right_curve=curve-stem_corr;
 else: right_curve=curve-3stem_corr; fi
penpos2(vair,90); penpos3(right_curve-stem_corr,0);
penpos7(right_curve,0); penpos8(vair',-90);
y2r=h+oo; x2=x6l=x6r=x8=.5[u,x7]; x7r=hround(w-.6u);
x3r=min(rt x7r-1,hround(w-u)); y3=.5[y4l,y2l]+eps; y8r=-oo;
set_bar_axis; y4l=y5r=y6r=y2.bh; y6l=y5l=y4r=y1.bh; y5=y6=y0.bh;
if serifs: lft x1r=lft x9r=hround.5u;
 y1=min(bar_height+2vair'+2,.9[bar_height,h]-flare);
 y9=max(good.y(.5bar_height-.9),y8l+vair'); pos1(hair,180); pos9(hair,-180);
else: lft x1r=hround.6u; lft x9r=hround.5u;
 pos1(min(right_curve,1.2flare)-.2tiny,175); %hair
 pos9(right_curve-stem_corr-.2tiny,-175); %hair
 y1l=max(.76h,top y5r+eps); y9r=min(.25h,bot y5l-eps); fi
lft x5l=lft x5r=min(max(hround 2.2u,rt x1l+.5vair)+eps,lft x6l-fine);
y7=.5[y6l,y8l]; x4l=x4r=1/3[x5l,x3l];
fill stroke super_arc.e(2,3) & super_arc.e(3,4); % upper bowl
fill stroke z5e..super_arc.e(6,7) & super_arc.e(7,8); % lower bowl
pickup fine.nib;
fill z5r{left}
 if bot y5r>top y5l:..(lft x5r,bot y5r)--(lft x5l,top y5l).. else: ... fi
 {right}z5l--cycle; % bar
pos2'(vair,90); z2'=z2; pos8'(vair',-90); z8'=z8;
filldraw stroke z1e{x2-x1,15(y2-y1)}....{right}z2'e; % tension atleast .95  upper bowl
{{interim superness:=1.05superness;
filldraw stroke if serifs: super_arc.e(8',9) else:
z8'e{left}.. tension atleast .95 ..{x9-x8,15(y9-y8)}z9e fi}}; % lower bowl
if serifs: path upper_arc;
upper_arc=z1{x2-x1,15(y2-y1)}....{right}z2; % tension atleast .95
 pos20(.3[fine.breadth,hair],0); x20l=x1r; top y20=h+oo;
 x1'-x1l=2curve; y1'=y1;
 numeric t; t=xpart(upper_arc intersectiontimes (z20r--z1'));
 filldraw z1r--z20l--z20r--subpath(t,0) of upper_arc--cycle; fi % upper serif
%
penpos14'(slab,0); x14'l=fine.lft x9r; y14'=-d;
path lower_arc;
lower_arc=if serifs: {{interim superness:=1.05superness;
 super_arc.r(8',9)}} else:
 z8'r{left}.. tension atleast .95 ..{x9-x8,15(y9-y8)}z9r fi;
fill (fine.lft x9r,y9r)---z14'l...z14'r---subpath(.67,1) of lower_arc--cycle;
penlabels(0,1,2,3,4,5,6,7,8,9,10,20); endchar;

lhchar "Lowercase Special letter Cl_mtl";
cyrchar(Cl_mtl,10u# % if not serifs:+.5width_adj# fi % dl_width;n_width
 ,x_height#,0);
italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut
adjust_fit(serif_fit# if not serifs:+.5(stem#-u#) fi, %dl_adj
 max(u#,.5u#+.5stem#)); %
% lower_l;
pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0);
rt x1r=rt x2r=w-hround (2.5u-.5fudged.stem-eps); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; %stem
numeric light_hair,bot_vair,bulb_diam,left_jut;
light_hair=if hefty:.5[vair,fudged.hair] else: fudged.hair fi;
bot_vair=Vround(.5[vair,light_hair]);
bulb_diam=hround 7/8[hair,flare];
left_jut=
   if serifs: max(limit_dist,1.1jut) else: hround (w+serif_fit-rt x2r-.5u) fi;
x3=1/3[w-rt x1r-(1/8left_jut),rt x1r] if not serifs: -.5(stem-u) fi +eps;
if serifs:
 pos3(light_hair,0); pos4(light_hair,-90);
 pos6(bulb_diam,-180); pos5(hair,-180);
 top y3=h; y6-.5bulb_diam=.12desc_depth-eps; z6r=z5r;
 lft x6r=l+letter_fit+hround(.35u-.5);
 x4=max(lft x5r+.5bulb_diam,.4[lft x5r,rt x3r]);
 bot y4r=-1.5oo-eps; {{less_tense; bulb(4,5,6)}}; %bulb
 filldraw stroke z4e{right}
  ..controls (min(15/16[x4,x3],max(x4,lft x6r+1.75bulb_diam))+(x3e-x3),y4e)
  and (x3e,max(y4l,min(y6-.5,1/3h+eps))+1/3(y4e-y4))..{up}z3e; % left tail
else:
 pos3'(vair,90); pos1'(vair,90);
 lft x3'=x3-.5light_hair; rt x1'=x1r; top y3'r=top y1'r=h;
 filldraw stroke z3'e--z1'e; % upper bar
 pickup fine.nib; pos3(light_hair,0); pos4(bot_vair,-90); pos5(bot_vair,-90);
 bot y5r=0; x4=.67[x3l,x5];
 lft x5=l+letter_fit+hround(.35u-.5); bot y4r=bot y5r; y3=y3';
 filldraw stroke z3e{down}..controls (x3e,y5e+.35h)
  and (min(7/8[x4e,x3e],x4e+2light_hair+eps),y4e-eps)..{left}z4e--z5e; fi % left stem
%%%
if serifs:
 x0=x3; y0=0;
 numeric inner_jut; inner_jut=.5(x1l-x3r)+.5crisp+eps;
 save slab; slab:=vair; % lower.slab
 dish_serif(2,1,a,1/3,jut,b,1/3,jut);	%lower right serif
 slab:=Vround(vair-vair_corr); % lower.slab
 nodish_serif(1,2,c,1/3,inner_jut,d,1/3,jut); %upper right serif
 nodish_serif(3,0,e,1/3,1.05jut,f,1/3,inner_jut); fi % upper left serif
%%%%%
% misc_tail
bar_stroke(x2r,hround (r-1/3u));
penpos9(vair,90); penpos10(hair,180);
x9-jut=x2r; y9l=0; z10=.5[z9,z8r];
fill stroke z9e{right}...z10e{up}...{right}z8e;
penlabels(1,2,3,4,5,6);endchar;

lhchar "Lowercase  Special letter Cn_mtl (looks like H)";
cyrchar(Cn_mtl,10u# if serifs=false:+.5width_adj# fi,x_height#,0); % n_width
italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut
adjust_fit(serif_fit#,max(u#,.5u#+.5stem#));
% lower_n;
pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0);
pos3(fudged.stem,0); pos4(fudged.stem,0);
lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1;
top y1=top y3=h; bot y2=bot y4=0;
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
bar_stroke(x1,x3); % bar
%%%
if serifs:
 numeric inner_jut;
 if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut;
  else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi
 save slab; slab:=Vround(vair-vair_corr); % lower.slab
 dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut);	% upper left serif
 dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut);	% upper rt serif
 slab:=vair; % lower.slab
 dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut);	% lower left serif
 dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut); fi	% lower rt serif
%%%%%
% misc tail
bar_stroke(x4r,hround (r-1/3u));
penpos9(vair',90); penpos10(hair,180);
x9-jut=x4r; y9l=tiny.bot y4; z10=.5[z9,z8r];
fill stroke z9e{right}...z10e{up}...{right}z8e;
penlabels(1,2,3,4,5,6); endchar;

lhchar "Lowercase Special letter Cn_bartl";
cyrchar(Cn_bartl,10u# if serifs=false:+.5width_adj# fi,x_height#,desc_depth#); % n_width
italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut
adjust_fit(serif_fit#,
 if monospace:3.9u#else:if serifs:3.5u#else:3.3u#fi fi); %tail_adj
% lower_n;
pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0);
pos3(fudged.stem,0); pos4(fudged.stem,0);
lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1;
top y1=top y3=h; bot y2=bot y4=0;
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
bar_stroke(x1,x3); % bar
%%%
if serifs:
 numeric inner_jut[];
 if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut1=jut;
  else: rt x1r+inner_jut1+.5u+1=lft x3l-inner_jut1; fi
 save slab; slab:=Vround(vair-vair_corr); % lower.slab
 dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut1);	% upper left serif
 dish_serif(3,4,e,1/3,inner_jut1,f,1/3,jut);	% upper right serif
 slab:=vair; % lower.slab
 dish_serif(2,1,c,1/3,jut,d,1/3,inner_jut1);	% lower left serif
 dish_serif(4,3,g,1/3,inner_jut1,h,1/3,.5jut); fi%!!!% lower right serif
%%%%%
w:=w+3.5u;
% tail_part(4);
_zero:=4;
_one:=7; _two:=8; _three:=9; _four:=10; _five:=11;
_six:=12; _seven:=13; _eight:=14; _nine:=15;
%
pickup tiny.nib;
numeric bulb_diam;
bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,hround 7/8[hair,flare]));
set_bar_axis; y[_one]r=y[_two]r=y2.bh; y[_one]l=y[_two]l=y1.bh;
penpos[_three](max(currentbreadth+eps,curve if hefty:-3stem_corr fi),0);
y[_three]=.5[y[_one]r,-d];
x[_two]l=x[_two]r=w-4.75u; x[_one]l=x[_one]r=x[_zero];
x[_three]r=hround(w-u); x[_two]l:=x[_four]l:=x[_two]r-.25curve;
{{interim superness:=more_super;
 fill stroke super_arc.e([_three],[_two])..z[_one]e}};  % lobe
if serifs:
 z[_five]=z[_three]; pos[_five](curve if hefty:-3stem_corr fi,0);
 pos[_six](vair,-90); bot y[_six]r=-d-oo; y[_seven]-.5flare=-.85d;
 pos[_seven](hair,-180); pos[_eight](bulb_diam,-180);
 rt x[_eight]l=max(lft x[_zero]l-jut+bulb_diam,
  floor x[_three]-3.5u if monospace: / expansion_factor fi);
 z[_seven]r=z[_eight]r;
 x[_six]=max(rt x[_eight]l,.6[x[_five],x[_seven]r]);
 (x,y[_six]r)=whatever[z[_six]l,z[_five]l];
 x[_six]r:=max(x,.5[x[_seven]r,x[_six]]);
 filldraw stroke super_arc.e([_five],[_six]);
 bulb([_six],[_seven],[_eight]); % bulb
else:
 pickup fine.nib; z[_five]=z[_three];
 pos[_five](max(fine.breadth,curve if hefty:-3stem_corr fi),0);
 pos[_nine](vair',-90); pos[_six](.6[vair',flare],-105);
 rt x[_six]r=x[_three]-4.5u; bot y[_six]r=-d;
 bot y[_nine]r=-d-oo; x[_nine]=.35[x[_six]r,x[_three]r];
 filldraw stroke super_arc.e([_five],[_nine])
  & term.e([_nine],[_six],left,.75,4); fi
%%%
if serifs:
 if rt x2r+jut+.5u+1<=x[_three]r: inner_jut2=jut;
  else: rt x2r+inner_jut2+.5u+1=x[_three]r; fi
 save slab; slab:=vair; % lower.slab
 dish_serif(4,3,i,1/3,inner_jut1,j,1/3,inner_jut2); fi % lower rt serif
penlabels(1,2,3,4,5,6); endchar;

lhchar "Lowercase  Special letter Cs_mtl (looks like c)";
cyrchar(Cs_mtl,8u#,x_height#,0);
italcorr x_height#*slant-.2u#;
adjust_fit(if monospace: .5u# else: -.1u# fi,max(u#,.5u#+.5stem#));
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; % eng
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
%
% misc tail
bar_stroke(x3,hround (r-1/3u));
z5'=z5; if serifs: penpos5'(hair,180); else: penpos5'(.6[vair',flare],95); fi
fill stroke z5'e{if serifs: up else: dir 75 fi}...{right}z7e;
penlabels(0,1,2,3,4,5); endchar;

lhchar "Lowercase  Special letter Ct_mtl";
cyrchar(Ct_mtl,9u#-width_adj#,x_height#,0);
italcorr x_height#*slant-beak_jut#-.25u#;
adjust_fit(0,max(u#,.5u#+.5stem#));
if odd(stem-w): change_width; fi % symmetric & all three equal
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
lft x1l=lft x2l=hround(.5w-.5stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(vair,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w-.45u);
y4=good.y(y3l-beak/1.4)-eps;
arm(3,4,e,beak_darkness,.4beak_jut);  % right arm and beak
pos5(hair,180); x5=w-x4; y5=y4;
arm(3,5,f,beak_darkness,-.4beak_jut);  % left arm and beak
if serifs:
 save slab; slab:=Vround(vair-vair_corr); % lower.slab
 dish_serif(2,1,c,1/3,1.414jut,d,1/3,1.414jut);	% lower serif
 slab:=vair; % lower.slab
 nodish_serif(1,2,a,1/3,.5jut,b,1/3,.5jut); fi	% upper bracketing
%
% misc tail
bar_stroke(x2r,hround (r-1/3u));
penpos9(vair',90); penpos10(hair,180);
x9-1.414jut=x2r; y9l=0; z10=.5[z9,z7r];
fill stroke z9e{right}...z10e{up}...{right}z7e;
penlabels(1,2,3,4,5,6); endchar;

lhchar "Lowercase  Special letter Ct_v";
cyrchar(Ct_v,9u#-width_adj#,x_height#+acc_height#,0);
italcorr x_height#*slant-beak_jut#-.25u#;
adjust_fit(0,0); full_h:=h; h:=x_height;
if odd(stem-w): change_width; fi % symmetric & all three equal
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
lft x1l=lft x2l=hround(.5w-.5stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(vair,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w-.45u);
y4=good.y(y3l-beak/1.4)-eps;
arm(3,4,e,beak_darkness,.4beak_jut);  % right arm and beak
pos5(hair,180); x5=w-x4; y5=y4;
arm(3,5,f,beak_darkness,-.4beak_jut);  % left arm and beak
if serifs:
 save slab; slab:=vair; % lower.slab
 dish_serif(2,1,c,1/3,1.414jut,d,1/3,1.414jut);	% lower serif
 slab:=Vround(vair-vair_corr);%lower.slab
 nodish_serif(1,2,a,1/3,.5jut,b,1/3,.5jut); fi	% upper bracketing
% hacheck from dc
h:=full_h;
_zero:=11;
_one:=7; _two:=8; _three:=9; _four:=10;
y_move:=if serifs:0 else: x_height-1/12[x_height,min(asc_height,2x_height)]-o fi;
x_center:=x5l+2/3beak_jut;
%
h':=vround x_height+acc_height; % height of circumflex being inverted
hx:=vround acc_height+.75[x_height,min(asc_height,2x_height)];
if serifs: pickup crisp.nib;
 pos[_two]'(.5[vair,curve],90);
 top y[_two]'r=.75[x_height,min(asc_height,2x_height)]-x_height;
 pos[_two](.5[vair,curve],90);
 x[_two]=x_center;
 x[_one]=good.x x[_two]-2.25u if monospace: /expansion_factor fi;
 x[_three]=2x[_two]-x[_one];
 top y[_one]=top y[_three]
    = x_height+.5y[_two]'r+.5(.5[vair,curve]);
 y[_one]-y[_two]=.5y[_two]'r;
 pos[_one](hair,angle(z[_two]-z[_one])+90);
 pos[_three](hair,angle(z[_three]-z[_two])+90);
 filldraw stroke z[_one]e--z[_two]e--z[_three]e;  % diagonals
else: pickup fine.nib; pos[_one](vair,0); pos[_three](vair,0);
 x[_two]-x[_one]=x[_three]-x[_two]; pos[_two](stem,0);
 bot y[_two]=vround(y_move+1/12[x_height,min(asc_height,2x_height)]+o);
 x[_two]=x_center; top y[_one]=top y[_three]
  = y_move+.75[x_height,min(asc_height,2x_height)]+o;
 lft x[_one]l=hround(rt x[_two]r-0.5vair
   -3.25u if monospace: /expansion_factor fi);
 z[_zero]=whatever[z[_one]r,z[_two]r]=whatever[z[_two]l,z[_three]l];
 y[_four]l=y[_four]r=y[_two];
 x[_four]l=good.x .2[x[_two]l,x[_two]];
 x[_four]r-x[_two]=x[_two]-x[_four]l;
 filldraw z[_four]l--z[_one]l--z[_one]r--z[_zero]--
          z[_three]l--z[_three]r--z[_four]r--cycle; fi  % diagonals
penlabels(1,2,3,4,5,6,[_one],[_two],[_three],[_four]);
endchar;

lhchar "Lowercase Special letter Ctch";
cyrchar(Ctch,11u# if serifs=false:+.5width_adj# fi,x_height#,0); % n_width
italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut
adjust_fit(1.5u#-.5width_adj#,serif_fit#);
% lower_ch;
pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0);
pos3(fudged.stem,0); pos4(fudged.stem,0);
lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=w-x1;
top y1=top y3=h; bot y2=.3[y6,h]; bot y4=0; x5l=1/3[x1,x3];
y6=good.y (.48h if serifs:-.15(.5[hair,.7stem]) fi);
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
y5=y6; x6=x6'=x3;
if serifs: y6'=min(3/5h,y6-hair+1.05stem); fi
numeric middle_weight; middle_weight=.6[thin_join,vair];
penpos2'(fudged.stem,0); z2'=z2;
penpos5(middle_weight,90); penpos6(middle_weight,90); penpos6'(middle_weight,90);
if serifs:
 if((y6'-y6)>=middle_weight+1+eps):
  fill stroke pulled_arc.e(2',5) & z5e{right}...{.75(z5-z6)+z6'}z6'e;  % arc
 else:
  fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc
 numeric inner_jut; pickup tiny.nib;
 if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut;
  else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi
%%%
 save slab; slab:=Vround(vair-vair_corr); % lower.slab
 dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut);	% upper left serif
 dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut);	% upper right serif
 slab:=vair; % lower.slab
 dish_serif(4,3,g,1/3,inner_jut,h,1/3,jut);	% lower right serif
else: fill stroke pulled_arc.e(2',5) & z5e{right}...{right}z6e; fi % arc
%%%%%
% T part
pickup crisp.nib; top y15r=h; x15=x1; pos15(vair,90);
pos16(hair,180); lft x16r=l+letter_fit+hround.45u;
y16=good.y(y15l-1/2beak)-eps;
pos17(hair,0); x15-x16=x17-x15; y17=y16;
arm(15,16,q,2/3beak_darkness,-1/3beak_jut);
arm(15,17,r,2/3beak_darkness,1/3beak_jut);
penlabels(1,2,3,4,5,6); endchar;

lhchar "Lowercase  Special letter Cchit";
cyrchar(Cchit,9.5u#,x_height#,0);
italcorr 1/3x_height#*slant+.5hair#+.5u#;
adjust_fit(0,0); pickup fine.nib; interim superness:=more_super;
x0=0; x2=x3; pos3(stem,-180); lft x3r=hround(2.5u-.5stem);
hook_in(0,1,2)(skewed);  % opening hook
pos2'(stem,-180); z2'=z2;
pos4(vair,-90); pos5(hair,0); x4=.5[x3,x5];
pos6(stem,0); rt x6r=hround(w-2.5u+.5stem);
x5=x6=x7; x9=w; hook_out(7,8,9);  % closing hook
y3=.7[y4,y5]; bot y4r=.75bar_height; y5=.75h; y6+.5stem=h;
filldraw stroke z2'e...super_arc.e(3,4)...{up}z5e; % left stem and arc
filldraw circ_stroke z6e--z7e;  % right stem
penlabels(0,1,2,3,4,5,6,7,8,9); endchar;

lhchar "Lowercase Special letter Cc_tl";
cyrchar(Cc_tl,10u# if serifs=false:+.5width_adj# fi,x_height#, % n_width
	sbeak#);
italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut
adjust_fit(serif_fit#,serif_fit#);
pickup tiny.nib; pos1(fudged.stem,0); pos2(fudged.stem,0);
pos3(fudged.stem,0); pos4(fudged.stem,0);
lft x1l=lft x2l=hround (2.5u-.5fudged.stem-eps); x3=x4=w-x1;
top y1=top y3=h; bot y2=bot y4=0;
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
numeric inner_jut,right_jut;
if serifs:
 if rt x1r+jut+.5u+1<=lft x3l-jut: inner_jut=jut;
  else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi
 save slab; slab:=Vround(vair-vair_corr); % lower.slab
 dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut);	% upper left serif
 dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut);	% upper right serif
 inner_jut:=.5(x3l-x1r)+.5crisp+eps;
 slab:=vair; % lower.slab
 nodish_serif(2,1,c,1/3,jut,d,1/3,inner_jut);	% lower left serif
 nodish_serif(4,3,g,1/3,inner_jut,h,1/3,jut);	% lower left serif
else:
 pos2'(vair',90); pos4'(vair',90);
 lft x2'=lft x2l; bot y2'l=0;
 rt x4'=rt x4r+(2/3fudged.stem-2stem_corr); y4'=y2';
 filldraw stroke z2'e--z4'e; fi
right_jut=if serifs:jut else:2/3 fudged.stem-2stem_corr fi;
pickup fine.nib; x4''r=x4r+right_jut; y4''=0; pos4''(fudged.stem,0);
pos5'(hair,0); y5'=-d; x5'=x1;
filldraw stroke z4''e{down}...z5'e{-1,-1};
penlabels(1,2,3,4,5,6); endchar;

lhchar "Lowercase Special letter Csh_lngst";
cyrchar(Csh_lngst,14u#+.5width_adj#,x_height#,desc_depth#);
italcorr x_height#*slant-serif_fit#+jut#-2u#+.5stem#; %d->x_height+jut
adjust_fit(serif_fit#,serif_fit#);
if odd(fudged.stem-w): change_width; fi % symmetric & all three equal
pickup tiny.nib;
pos1(fudged.stem,0); pos2(fudged.stem,0); pos3(fudged.stem,0);
pos4(fudged.stem,0); pos4'(fudged.stem,0); pos5(fudged.stem,0);
pos6(fudged.stem,0);
lft x1l=lft x2l=hround(2.5u-.5fudged.stem-eps); x3=x4=x4'=w-x1;
top y1=top y3=h; bot y2=bot y4'=0; z5=.5[z1,z3]; z6=.5[z2,z4']; bot y4=-d;
filldraw stroke z1e--z2e; % left stem
filldraw stroke z3e--z4e; % right stem
filldraw stroke z5e--z6e; % center stem
if serifs: numeric inner_jut,fit; fit=.5u+1;
 if rt x1r+jut+fit<=lft x5l-jut: inner_jut=jut;
  else: rt x1r+inner_jut+fit=lft x5l-inner_jut; fi
 save slab; slab:=vair; % lower.slab
 dish_serif(1,2,a,1/3,jut,b,1/3,inner_jut);	% upper left serif
 dish_serif(5,6,i,1/3,inner_jut,j,1/3,inner_jut); % upper center serif
 dish_serif(3,4,e,1/3,inner_jut,f,1/3,jut);	% upper right serif
 inner_jut:=.5(x3l-x5r)+.5crisp+eps;
 slab:=vair; % lower.slab
 nodish_serif(2,1,c,1/3,jut,d,1/3,inner_jut);	% lower left serif
 nodish_serif(6,5,k,1/3,inner_jut,l,1/3,inner_jut); % lower center serif
 serif(4',3,g,1/3,-inner_jut);	% lower right serif
 dish_serif(4,3,m,1/3,inner_jut,n,1/3,jut); % lower right serif
else: pos2'(vair',90); pos4''(vair',90);
 lft x2'= lft x2l; rt x4''=rt x4r; y4''=y2'=0;
 filldraw stroke z2'e--z4''e; fi
penlabels(1,2,3,4,5,6); endchar;
