% % lgrusi.mf % %% Cyrillic font container with T2 encoding beta-support % % This file is future part of lxfonts package % Version 3.5 // Patchlevel=0 % (c) O.Lapko % % This package is freeware product 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 all this package as well) and to save it under the same name. % % Content: % % Italic Russian letters from a to ya and yo % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (there are some letters with common witdh % they have comments as: v_width (the witdh of russian letter v) % and n_width (russian letter n) at the end of `cyrchar...' line) % LHver_check(3,5); % like |version_check| in ec lhchar "Italic Russian letter a"; cyrchar(a,9u#,x_height#,0); italcorr 1/3x_height#*slant+.5hair#+.5u#; adjust_fit(if monospace:0 else:-.35u#fi,0); % !cadj % ital_a; pickup fine.nib; pos0(hair,0); pos1(vair,90); pos2(curve,180); pos3(vair,270); pos4(stem,0); x4=x0; y4+.5stem=vround .98h; x1=x3=.5[x0,x2]; lft x2r=hround(1.5u-.5curve); rt x4r=hround(w-2.5u+.5stem); top y1r=h+oo; bot y3r=-oo; y0=y2=.5[y1,y3]; filldraw stroke super_arc.e(0,1) & pulled_arc.e(1,2) & pulled_arc.e(2,3) & super_arc.e(3,0); % bowl x5=x4; x7=w; hook_out(5,6,7); % closing hook filldraw circ_stroke z4e--z5e; % stem penlabels(0,1,2,3,4,5,6,7); endchar; lhchar "Italic Russian letter b"; cyrchar(b,9u#,asc_height#,0); italcorr asc_height#*slant+.5stem#-u#; %y->asc_height adjust_fit(if monospace: 0,0 else: -.35u#,-.35u# fi); numeric stem[]; stem1=.5[vair,curve]; stem2= max(fine.breadth,if serifs: hair else: vair fi); penpos1(vair,90); penpos3(vair',-90); penpos2(curve,180); penpos4(curve,0); x1=x3=.5w; y1r=x_height+oo; y3r=-oo; x2r=hround(1.5u-.5curve); x4r=w-x2r; 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; % o bowl pickup fine.nib; pos7(stem2,180); rt x7l=min(w-u,rt 4r-.1u); top y7=h; pos2'(stem2,180); lft x2'r=x2r; y2'=y2; if hefty: pos5(stem1,90); pos6(stem1,90); x5=max(x1l,lft x1); x6=x4+if monospace:-.5 else:+.5 fi fine; x6'=x6-.5stem1; top y6r=h; y5=y6 if 1/18(h-x_height)>=2:-1/18(h-x_height) fi; y6'=y6l; filldraw z6r---z6...z6'---z5l....{down}z2'l--z2'r{up}....z5r---cycle; % upper tail else: pos5(max(stem2,.7[fudged.hair,fudged.stem]),135); pos6(max(stem2,.9[fudged.hair,fudged.stem]),120); x5=max(.55[x2r,x1],x2l+.1u); forsuffixes $=l,r: z5'$=((x5,0)..(x5,h)) intersectionpoint (z2${up}...{right}z1$); endfor y5=max(y5'r+.7(y5'r-y5'l),h-.45(asc_height-x_height)); z6r=whatever[z5r,z7r]; x6=x7-1.2max(u,stem2); filldraw stroke z7e..z6e{z5-z6}..z5e....{down}z2'e; fi penlabels(0,1,2,3,4,5,6,7); endchar; lhchar "Italic Russian letter v (looks like B)"; cyrchar(v,9u#,x_height#,0); italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e adjust_fit(if monospace:0 else:-.35u# fi,0); pickup fine.nib; %numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo pos0(vair,-90); pos0'(vair,90); pos6(vair,90); pos1(heavy_hair,0); pos2(vair,90); pos3(curve,180); pos4(vair,270); pos5(curve,0); x0=x6=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x0'=x2=x4=.5(w+u); lft x3r=hround(1.5u-.5curve); x5l=x1l; y5=.5[y4,y0]; y0=y0'=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) & pulled_arc.e(3,4) & pulled_arc.e(4,5) & pulled_arc.e(5,0')...z6{left}; % main bowl penlabels(0,0',1,2,3,4,5,6); endchar; lhchar "Italic Russian letter g"; cyrchar(g,6.25u#,x_height#,0); italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e adjust_fit(if monospace:u#,u# else: 0.5u#,0.5u# fi); % ital_g; pickup fine.nib; x0l=hround eps; x0'=x0; x5r=good.x(w-eps); x6=x5; x2=.5w+2u; x3=.5w-2u; x1=x4=x7=.5[x3l,x2r]; y7=.5[y2,y3]; h-y0=y5; top y5l=vround .5bar_height; y6=bar_height; y0'=h-bar_height; h-y2=y3=1/4x_height; h-y1=y4; bot y4r=-oo; pos0(hair,320); pos1(vair,270); pos2(stem,180); pos3(stem,180); pos4(vair,270); pos5(hair,320); pos7(stem,135); path p.l,p.r; p.l=z0'..z0..z1{right}; p.r=z4{right}..z5..z6; filldraw stroke z0e{direction 1 of p.l} ...z1e{right}...{down}z2e...z7e...z3e{down}...z4e{right} ...{direction 1 of p.r}z5e; % main stroke %%% penlabels(0,1,2,3,4,5); endchar; lhchar "Italic Russian letter d"; cyrchar(d,9u#,asc_height#,0); italcorr .7asc_height#*slant-.15u#; % O+.35u adjust_fit(if monospace:0,0 else:-.35u#,-.35u#fi); numeric top_thickness,bot_thickness,side_thickness,pull; top_thickness=max(fine.breadth,vround(slab-2vair_corr)); bot_thickness=max(fine.breadth,vround(slab-vair_corr)); side_thickness=max(fine.breadth,hround 1/4[curve,cap_curve]); pull=min(.25,1.5superpull); pickup fine.nib; pos1(hair,140); pos2(vair,90); pos3(side_thickness,0); pos4(bot_thickness,-90); pos5(side_thickness,-180); pos6(vair,-270); lft x5r=lft x1r=w-rt x3r=hround max(.75u,1.5u-.5side_thickness); x4=x2+u=x6+.1u=.5w; y1=h-.35bar_height; top y2r=h+oo; y3=.5[y2,y4]; bot y4r=-oo; y5=.5[y4,y6]; top y6=x_height+oo; forsuffixes e=l,r: path p.e; p.e=z1e...{right}z2e; endfor path p; p=pulled_super_arc.l(3,4)(pull); numeric t; t=xpart(p intersectiontimes((x3r,y5)--(x4,y5))); pos7(thin_join,0); z7l=point t of p; (x,y6r)=whatever[z7l,z6l]; x6r:=max(x,.5[x5r,x6]); filldraw stroke subpath (.5,1) of p.e & pulled_super_arc.e(2,3)(superpull) & {{interim superness:=more_super; pulled_super_arc.e(3,4)(pull)}} & {{less_tense; pulled_super_arc.e(4,5)(pull) & pulled_super_arc.e(5,6)(pull)}} & z6e{right}...{direction t of p}z7e; % arc and bowl penlabels(1,2,3,4,5,6,7); endchar; lhchar "Italic Russian letter e"; cyrchar(e,8u#,x_height#,0); italcorr max(1/3x_height#*slant,x_height#*slant+.5(.2[hair#,stem#])-u#); %e adjust_fit(if monospace:0 else:-.35u#fi,0); % ital_e; pickup fine.nib; %numeric heavy_hair; heavy_hair=hround .2[hair,stem];%defined in lxpseudo pos0(vair,-90); pos1(heavy_hair,0); pos2(vair,90); pos3(curve,180); pos4(vair,270); pos5(hair,320); x0=rt x3l; rt x1r=hround(w-1.5u+.5heavy_hair); x2=x4=.5(w+u); lft x3r=hround(1.5u-.5curve); x5r=good.x(w-eps); x6=x5; y0=y3=y6=bar_height; y1=.5[y0,y2]; top y2r=h+oo; bot y4r=-oo; top y5l=vround .5bar_height; path p; p=z4{right}..z5..z6; filldraw stroke z0e{right}...z1e{up}...pulled_arc.e(2,3) & pulled_arc.e(3,4)...{direction 1 of p}z5e; % arc penlabels(0,1,2,3,4,5,6); endchar; lhchar "Italic Russian letter zh"; cyrchar(zh,20u#,x_height#,0); italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %c adjust_fit(-.5u#,0 if monospace:-.5u# fi); %zh_adj % ital_zh; if odd(fudged.stem-w): change_width; fi % symmetric & all three equal - AS pickup fine.nib; pos1(flare,0); pos2(hair,0); pos3(vair,90); pos4(curve,180); pos5(vair,270); pos6(hair,320); if monospace: x3=x5=.5[lft x4r,rt x2r]-eps; rt x2r=good.x (w+eps); else: x3=x5=good.x(w-3.5u); rt x2r=hround max(rt x3,w-u)+eps; fi lft x4r=hround max(.5w+.5stem+.5,w-6.5u-.5curve+eps); x6r=good.x(w+eps); x0=x6; y2=.5[bar_height,h]; top y3r=h+oo; bulb(3,2,1); % bulb bot y5r=-oo; y4=.5[y3,y5]; top y6l=vround .5bar_height; y0=bar_height; path p; p=z5{right}..z6..z0; filldraw stroke pulled_arc.e(3,4) & pulled_arc.e(4,5)...{direction 1 of p}z6e; % right arc pos12(flare,180); pos11(hair,180); pos10(vair,270); pos9(curve,360); pos8(vair,450); pos7(hair,500); if monospace: lft x11r=good.x (-eps); x10=x8=.5[lft x11r,rt x9r]+eps; else: x10=x8=3.5u; lft x11r=hround min(lft x10,u)-eps; fi rt x9r=hround min(.5w-.5stem-.5,6.5u+.5curve-eps); x7r=good.x (if not monospace:rt x11r-.67u fi-eps); x0'=x7; y11=h-.5[bar_height,h]; bot y10r=-oo; bulb(10,11,12); % bulb top y8r=h+oo; y9=.5[y10,y8]; bot y7l=vround (h-.65bar_height); y0'=bar_height; path p_; p_=z8{left}..z7..z0; filldraw stroke pulled_arc.e(10,9) & pulled_arc.e(9,8)...{direction 1 of p_}z7e; % left arc y13=bar_height; x13=x4; y14=y13; x14=w-x4; x15=x16=.5w; y15+.5stem=h+oo; bot y16=0; pos13(vair,90); pos14(vair,90); pos15(fudged.stem,0); pos16(fudged.stem,0); filldraw stroke z13e--z14e; filldraw circ_stroke z15e--z16e; % stem & cross %%% penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar; lhchar "Italic Russian letter z"; cyrchar(z,8u#,x_height#,0); italcorr if math_fitting:1/3x_height#*slant else:x_height#*slant-u# fi; %e adjust_fit(0,0); % ital_z; pickup fine.nib; pos0(flare,180); pos1(hair,180); pos2(vair,-90); pos7(curve,0); pos8(curve,0); pos4(vair,90); pos5(hair,160); pos3(vair,90); pos3'(vair,-90); pos9(vair,90); pos9'(vair,-90); x2=x4=.5(w-u); lft x1r=min(lft x2,hround(.25u))-eps; lft x5r=good.x x1r+.15u+eps; x6=x5; y1=.5bar_height; bot y2r=-oo; bulb(2,1,0); % bulb rt x7r=w-hround(1.5u-.5curve); rt x8r=w-hround(2u-.5curve); top y4r=h+oo; y7=.5[y2,y3]; y5r=y8=.5[y3,y4]; y6=bar_height; x3=x2; lft x9=hround min(lft x2-1-eps,rt x0l+1+eps); y3=y9=bar_height; z9'=z9; z3'=z3; path p; p=z4{left}..(x5,h-.52bar_height)..z6; filldraw stroke z9e{right}...pulled_arc.e(3,7) & pulled_arc.e(7,2); % lower arc filldraw stroke z9'e{right}...pulled_arc.e(3',8) & pulled_arc.e(8,4) ...{direction 1 of p}z5e; % upper arc %%% penlabels(0,1,2,3,4,5,7,8,9); endchar; lhchar "Italic Russian letter i (looks like u)"; cyrchar(i,10u#,x_height#,0); italcorr 1/3x_height#*slant+.5hair#+.5u#; %u adjust_fit(0,0); % ital_i; pickup fine.nib; interim superness:=more_super; x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); % left shstem; if monospace: pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal else: x0=0; hook_in(0,1,2)(skewed); fi % 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=-oo; y5=.57h; y6+.5stem=h; filldraw stroke z2'e{-u,-x_height} ...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 "Italic Russian letter i_shrt - short i (looks like breve u)"; cyrchar(i_shrt,10u#,x_height#+acc_height#,0); italcorr 1/3x_height#*slant+.5hair#+.5u#; %u adjust_fit(0,0); full_h:=h; h:=x_height; % ital_i; pickup fine.nib; interim superness:=more_super; x2=x3+.25u; pos3(stem,-180); lft x3r=hround(2.5u-.5stem); % left shstem; if monospace: pos0(vair,90); x0=good.x .5[0,x2]; top y0l=h; y2=2/3h; pos2(stem,0); filldraw stroke z2e{u,x_height}...{left}z0e; % terminal else: x0=0; hook_in(0,1,2)(skewed); fi % 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=-oo; y5=.57h; y6+.5stem=h; filldraw stroke z2'e{-u,-x_height} ...super_arc.e(3,4)...{up}z5e; % left stem and arc filldraw circ_stroke z6e--z7e; % right stem % the accent h:=x_height+acc_height; cbreve(.5w,0, 10,11,12,13,14,15,16); penlabels(0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16); endchar; lhchar "Italic Russian letter k"; cyrchar(k,9u#,x_height#,0); italcorr x_height#*slant; adjust_fit(0,0); % ital_k; pickup fine.nib; x2-.5stem=hround(2.5u-.5stem); %ihalfstem; if monospace: pos2(stem,0); top y2=h; else: x0=0; hook_in(0,1,2); fi % opening hook pos2'(stem,0); pos11(stem,0); z2'=z2; x11=x2'; y11-.5stem=-oo; filldraw circ_stroke z11e--z2'e; % left stem pos3(vair,90); x3=x11; y3=bar_height; pos4(vair,90); x4=w-2u; top y4r=x_height+oo; filldraw stroke z3e{right}..{right}z4e; % upper diagonal pos5(hair,0); pos6(flare,0); rt x5r=hround(w-.5u); y5+.5flare=vround(bot y4l-.03x_height); bulb(4,5,6); % bulb pos7(stem,0); pos8(vair,90); pos9(hair,180); x9+.5hair=hround(w+.5hair-eps); y9=1/3x_height; lft x7l=hround(w-2.75u-.5stem); y7=1/2y3; x8=w-1.2u; bot y8l=-oo; filldraw stroke z3e{right}...z7e{down} ...z8e{right}...{up}z9e; % lower diagonal %%% penlabels(1,2,3,4,5,6,7,8,9); endchar; lhchar "Italic Russian letter l"; cyrchar(l,9u#,x_height#,0); italcorr 1/3x_height#*slant+.5hair#+.5u#; %n adjust_fit(.5u#,0); % ital_l; pickup fine.nib; pos1(vair,-90); pos2(stem,180); pos3(hair,0); pos10(stem,0); pos4(vair,-90); pos5(hair,-180); pos6(flare,-180); top y1l=h+oo; x1=.5[x3,x2]; x3=3u; y3=.35h; y6-.5flare=.1h; lft x6r=-.25u; z5r=z6r; bot y4r=-oo; x4=max(.4[lft x6r,rt x3r],lft x6r+.5flare-eps); y10=.8h; lft x10l=lft x7l=hround(w-2.5u-.5stem); z10=z2; bulb(4,5,6); % bulb filldraw stroke pulled_arc.e(4,3) & super_arc.e(3,1) & super_arc.e(1,2); % left stem x9=w; hook_out(7,8,9); % hook filldraw stroke z10e--z7e; % right stem %%% penlabels(1,2,3,4,5,6,7,8,9,10); endchar; lhchar "Italic Russian letter m"; cyrchar(m,13u#,x_height#,0); italcorr 1/3x_height#*slant+.5hair#+.5u#; %u adjust_fit(if monospace:-.5u#,-1.5u# else:.5u#,0 fi); %wbulb_adj&rstem_adj %ital_m; pickup fine.nib; pos1(hair,0); pos6(stem,0); pos2(hair,0); pos3(vair,-90); pos4(hair,-180); pos5(flare,-180); x1=x2=3u; y2=.35h; top y1=h; bot y3r=-oo; lft x5r=-.25u; z4r=z5r; x3=min(lft x5r+flare,lft x2l-eps); y5-.5flare=.1h; bulb(3,4,5); % bulb filldraw stroke pulled_arc.e(3,2) & z2e--z1e; % left stem rt x7r=hround(w-2.5u+.5stem); x6=x7; top y6=h; % right_stem; _one:=7; _two:=8; _three:=9; if monospace: pos[_three](vair,90); pos[_one](stem,0); x[_three]=good.x .5[x[_one],w]; bot y[_three]l=0; y[_one]=1/3h; filldraw stroke z[_one]e{down}...{right}z[_three]e; % terminal else: x[_three]=w; hook_out([_one],[_two],[_three]); fi % opening hook % filldraw stroke z6e--z7e; % right stem % diagonals;m numeric stem[]; % thicknesses of the strokes stem1=hround(fudged.stem-stem_corr); stem2=min(stem1,hround(fudged.hair-stem_corr)); penpos10(stem1,0); penpos11(stem1,0); penpos12(stem2,0); penpos13(stem2,0); x10l=lft x1l; x11l=x12l; x13l=lft x7l; x11-x10=x13-x12; y10=y13=top y6; y11=y12; if hefty: y11=if monospace: vround 1/3h-.5stem1 else: oo fi; numeric upper_notch,lower_notch; upper_notch=h-notch_cut; lower_notch=y11+notch_cut; x1'=rt x1r; z1'=whatever[z10l,z11l]; x6'=lft x6l; z6'=whatever[z12r,z13r]; z0=whatever[z10r,z11r]=whatever[z12l,z13l]; fill z10l.. if y1'