cmchar "The cyrillic letter A"; beginchar(CYR_A,13u#,cap_height#,0); adjust_fit(cap_serif_fit#,cap_serif_fit#); numeric left_stem,right_stem,outer_jut,alpha; right_stem=cap_stem-stem_corr; left_stem=min(cap_hair if hefty: -3stem_corr fi,right_stem); outer_jut=.8cap_jut; x1l=w-x4r=l+letter_fit+outer_jut+.5u; y1=y4=0; x2-x1=x4-x3; x3r=x2r+apex_corr; y2=y3=h+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 y0upper_notch: {left}(x3'-1,upper_notch){down}... fi {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal else: penpos5(whatever,90); penpos6(whatever,90); z7=z6l-(cap_hair,0) rotated (angle(z5-z6)-90); z5r=z7+whatever*(z5-z6); z6r=z7+whatever*(z5-z6); filldraw stroke z5e..z6e; fi % diagonal if serifs: numeric inner_jut; if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper left serif dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); fi % lower left serif math_fit(0,max(.5ic#-.5u#,0)); penlabels(1,2,2',3,3',4,5,6,7); endchar; cmchar "The cyrillic letter SHORT I"; beginchar(CYR_SHORT_I,13u#+width_adj#,1.3cap_height#,0); italcorr 1.3cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); adjust_fit(cap_serif_fit#,cap_serif_fit#); pickup tiny.nib; pos1(cap_stem',0); pos2(cap_stem',0); pos3(cap_stem',0); pos4(cap_stem',0); pickup tiny.nib; top y1=top y3=cap_height; bot y2=bot y4=0; x1=x2; x3=x4; x1l=w-x3r; rt x3r=hround min(w-2u,w-3u+.5fudged.cap_stem); filldraw stroke z1e--z2e; % left stem filldraw stroke z3e--z4e; % right stem if serifs: y5=cap_height-y6=.12cap_height; else: bot y5l=cap_height-top y6r=0; fi x5=rt x2r; x6=lft x3l; if hefty: numeric upper_notch,lower_notch,alpha; alpha=if monospace: 100 else: 90 fi; upper_notch=cap_height-cap_notch_cut; lower_notch=cap_notch_cut; penpos5(1.5cap_stem,alpha); penpos6(1.5cap_stem,alpha); x2'=rt x2r; z2'=whatever[z6r,z5r]; x3'=lft x3l; z3'=whatever[z5l,z6l]; fill z5l.. if y2'upper_notch: {left}(x3'-1,upper_notch){down}... fi {z5-z6}diag_in(6r,5r,1,5l)--cycle; % diagonal else: penpos5(whatever,90); penpos6(whatever,90); z6'=z6l-(cap_hair,0) rotated (angle(z5-z6)-90); z5r=z6'+whatever*(z5-z6); z6r=z6'+whatever*(z5-z6); filldraw stroke z5e..z6e; fi % diagonal if serifs: numeric inner_jut; if rt x1r+cap_jut+.5u+1<=lft x3l-cap_jut: inner_jut=cap_jut; else: rt x1r+inner_jut+.5u+1=lft x3l-inner_jut; fi dish_serif(1,2,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif dish_serif(2,1,c,1/3,cap_jut,d,1/3,inner_jut); % lower left serif dish_serif(3,4,e,1/3,inner_jut,f,1/3,cap_jut); % upper right serif dish_serif(4,3,g,1/3,inner_jut,h,1/3,cap_jut); % lower right serif if monospace: penpos7(.25vair,-90); else: penpos7(vair,-90); fi penpos8(.7vair,-180); penpos9(.75flare,-180); penpos10(.7vair,0); penpos11(.75flare,0); x7=.5[x8,x10]; bot y7r=.85h; x8=.5w-2u; x10=w-x8; y8=y11=.95h; bulb(7,8,9); % left bulb bulb(7,10,11); % right bulb else: pickup fine.nib; penpos7(.75vair,-90); penpos8(.75vair,-180); penpos10(.75vair,0); x7=.5[x8,x10]; y7=.9h; x8r=x1r; x10r=x3l; top y8=top y10=h; filldraw stroke z8e...z7e...z10e; fi math_fit(0,max(.5ic#-.5u#,0)); penlabels(1,2,2',3,3',4,5,6,7,8,9,10,11); endchar; cmchar "The cyrillic letter KA"; beginchar(CYR_KA,13.5u#,cap_height#,0); italcorr cap_height#*slant-.5u#; adjust_fit(cap_serif_fit#,cap_serif_fit#); numeric right_jut,stem[],alpha[]; if serifs: right_jut=.6cap_jut; else: right_jut=.4tiny; fi pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); lft x1l=lft x2l=hround max(2u,3u-.5fudged.cap_stem); top y1=h; bot y2=0; filldraw stroke z1e--z2e; % stem stem2=max(tiny.breadth,fudged.cap_stem-3stem_corr); stem1=max(tiny.breadth,fudged.hair if hefty:-3stem_corr fi); top y3=h; rt x3r=hround(r-letter_fit-u-right_jut); bot y6=0; rt x6r=hround(r-letter_fit-.75u-right_jut); x4=x1; y4=1/3h; alpha1=diag_ratio(1,.5(stem1-tiny),y3-y4,x3r-x4); penpos3(alpha1*(stem1-tiny),0); penpos4(whatever,-90); alpha2=diag_ratio(1,.5(stem2-tiny),y1-y6,x6r-x1); penpos6(alpha2*(stem2-tiny),0); forsuffixes $=l,r: y3'$=h; y6'$=0; z4$=z3'$+whatever*(z3-z4); z5$=z6'$+whatever*(z1-z6)=whatever[z3,z4]; endfor z5=.5[z5l,z5r]; z3'r=z3r+penoffset z3-z4 of currentpen+whatever*(z3-z4); % we have also |z3'l=z3l+penoffset z4-z3 of currentpen+whatever*(z3-z4)|;\] z6'r=z6r+penoffset z1-z6 of currentpen+whatever*(z1-z6); z6'l=z6l+penoffset z6-z1 of currentpen+whatever*(z1-z6); fill z4r--diag_end(4r,3'r,1,.5,3'l,4l)--z4l--cycle; % upper diagonal fill z5l--diag_end(5l,6'l,.5,1,6'r,5r)--z5r--cycle; % lower diagonal if serifs: numeric inner_jut; if rt x2r+cap_jut+.5u+1<=lft x6l-cap_jut: inner_jut=cap_jut; else: rt x2r+cap_jut+.5u+1=lft x6l-inner_jut; fi dish_serif(1,2,a,1/3,cap_jut,b,1/3,cap_jut); % upper stem serif dish_serif(2,1,c,1/3,cap_jut,d,1/3,cap_jut); % lower stem serif dish_serif(3,4,e,2/3,1.2cap_jut,f,1/2,right_jut)(dark); % upper diagonal serif dish_serif(6,5,g,1/2,inner_jut,h,1/3,right_jut)(dark);fi % lower diagonal serif math_fit(0,.5ic#); penlabels(1,2,3,4,5,6); endchar; cmchar "The cyrillic letter EL"; beginchar(CYR_EL,13u#,cap_height#,0); italcorr cap_height#*slant-cap_serif_fit# +.75cap_jut#-2.5u#+min(.5cap_stem#,u#); adjust_fit(0,cap_serif_fit#); pickup tiny.nib; numeric thin_stem; thin_stem=min(1.5cap_hair,cap_stem); if serifs: pos1(thin_stem,0); pos12(thin_stem,0); else: pos1(cap_hair,0); pos12(cap_hair,0); fi pos5(cap_stem,0); pos6(cap_stem,0); x1=.33w; top y1=h; x12=x1; y12=.5h; rt x5r=rt x6r=hround(w-3u+.5cap_stem); top y5=h; bot y6=0; filldraw stroke z5e--z6e; % right stem if serifs: numeric inner_jut; inner_jut:=.5(x5l-x1r); pos2(thin_stem,-90); pos3(thin_stem,-180); pos4(1.2flare,-180); bot y2r=-o; x2=.38[x4,x1]; y4=.15h; rt x4l=hround 2.5u; z4r=z3r; bulb(2,3,4); % bulb filldraw stroke z2e{right}...{up}z12e--z1e; % left stem and arc nodish_serif(1,12,a,1/3,cap_jut,b,1/3,inner_jut); % upper left serif nodish_serif(5,6,g,1/3,inner_jut,h,1/3,cap_jut); % upper right serif dish_serif(6,5,e,1/3,cap_jut,f,1/3,cap_jut); % lower right serif else: pos1'(slab,90); pos5'(slab,90); pos2(cap_hair,-90); pos3(cap_hair,-90); x2=.5u; x3=x2+u; bot y2r=0; bot y3r=-o; lft x1'=lft x1l; rt x5'=rt x5r; top y1'r=top y5'r=h; filldraw stroke z1'e--z5'e; % upper bar filldraw stroke z2e...z3e{right}...{up}z12e--z1e; % stem and arc fi math_fit(0,.5ic#-.5u#); penlabels(1,1',2,3,4,5,5',6,7); endchar; cmchar "The cyrillic letter EM"; beginchar(CYR_EM,16u#+width_adj#,cap_height#,0); italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); adjust_fit(cap_serif_fit#,cap_serif_fit#); numeric stem[]; % thicknesses of the four strokes stem1=hround(fudged.hair+stem_corr); stem2=hround(fudged.cap_stem-4stem_corr); stem3=hround(fudged.hair-stem_corr); stem4=hround(fudged.cap_stem-3stem_corr); if stem4