% % lgt2lou.mf % %% Cyrillic font container with T2 encoding beta-support % % This file is future part of lxfonts package % Version 3.5 // Patchlevel=1 % (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: % % Uppercase Cyrillic letters 0--127 for T2 encoding % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % List of letternames and their codes in T2 % % X2 T2A T2B T2C % % AE "41 A "8c - - Ligature AE % ABH_CH "44 D - - "91 Abkhasian che (same as lower e with hook) % ABH_CH_dsc "45 E - - "92 Abkhasian che descender % K_vcrs "46 F "8b - - Ka vertically crossed % K_hcrs "47 G - - "8b Ka horisontally crossed % L_dsc "48 H - "8a "8a El with descender % M_dsc "4c L - - "88 Em with descender % ABH_HA "4e N - - "97 Abkhasian kha % P_tl "4f O - - "80 Pe with tail % % R_dsc "50 P - - "85 Er with descender % LAT_Q "51 Q - - - Latin letter Q % T_dsc "52 R - - "82 Te with descender % TETSE "54 T - - "81 Ligature Te-Tse % CH_vcrs "56 V "97 - - Che vertically crossed % LAT_W "57 W - - - Latin letter W % % N_ltl "1c - - "99 En with left tail % DELTA "1e - "86 - Delta % M_tl - - - "8e Em with tail % R_gcrs - - - "86 Er grave crossed % S_acrs - - - "91 Es acute crossed % G_crsdsc - - "80 - Ghe crossed with descender % H_hcrs - - "94 - Kha horisontally crossed % % SEMISN - - - "93 Semi Soft Sign % I_shdsc - - - "94 I Short with descender % R_tl - - - "9b Er with tail % LHver_check(3,5); % like |version_check| in ec lhchar "Uppercase Cyrillic letter AE - ligature AE"; cyrchar(AE,16u#,cap_height#,0); if is_small_cap: getcharcode(ae); fi italcorr cap_height#*slant-beak_jut#-.5u#; adjust_fit(cap_serif_fit#,0); numeric left_stem,amid_stem,outer_jut,alpha; amid_stem=max(tiny.breadth,hround .9[mfudged.hair,mfudged.cap_stem]); pickup tiny.nib; pos1(amid_stem,0); pos2(amid_stem,0); lft x1l=lft x2l=hround(if monospace or hefty:.55 else:.5 fi\\w-.75u); top y1=h; bot y2=0; filldraw stroke z1e--z2e; % stem pickup crisp.nib; pos3(slab,90); pos4(mfudged.hair,0); top y3r=h; x3=x1; rt x4r=hround(w-u); y4=good.y(y3l-beak)-eps; arm(3,4,e,beak_darkness,beak_jut); % upper arm and beak pos5(cap_bar,-90); pos6(mfudged.hair,0); x5=x1; top y5l=vround(if hefty:.52 else:.48 fi\\[y2,y1]+.5cap_bar); pos0(cap_bar,90); pos7(mfudged.hair,0); z0=z5; x6=x7; y6-y5l=y0l-y7; if serifs and not(monospace and hefty): rt x6r=hround(w-3.65u+.5mfudged.hair); y6=good.y(y5l+.6beak)+eps; rt x9r=hround(w-.5u); else: rt x6r=hround(w-1.5u); y6=y5l+eps; rt x9r=hround(w-.75u); fi arm(5,6,f,beak_darkness,0); arm(0,7,g,beak_darkness,0); % middle arm and serif pos8(slab if not serifs:+2stem_corr fi,-90); pos9(mfudged.hair,0); bot y8r=0; x8=x2; y9=good.y(y8l+7/6beak)+eps; arm(8,9,h,beak_darkness,1.5beak_jut); % lower arm and beak left_stem=if monospace:fudged.hair else: cap_hair fi if hefty: -3stem_corr fi; outer_jut=.8cap_jut; x11l=l+letter_fit+outer_jut+.5u; y11=0; x12=x1l-apex_corr-if monospace:2 fi\\u; y12=h; alpha=diag_ratio(1,.5left_stem,y12-y11,x12-x11l); penpos11(alpha*left_stem,0); penpos12(alpha*left_stem,0); fill diag_end(12l,11l,1,1,11r,12r) --diag_end(11r,12r,1,1,12l,11l)--cycle; % diagonal y10=h-slab; z10=whatever[z11,z12]; fill z10--(x1,y10)--(x1,h)--z12--cycle; % link penpos13(whatever,angle(z2-z1)); z13=whatever[z11,z12]; penpos14(cap_band,90); x14=x0; y13l=y14l; y13r=y14r; if hefty: y14r=.4h; else: y14=y0; fi penstroke z13e--z14e; % bar line if serifs: numeric inner_jut; pickup tiny.nib; prime_points_inside(11,12); if rt x11'r+cap_jut+.5u+1<=lft x2l-.75cap_jut: inner_jut=cap_jut; else: rt x11'r+inner_jut+.5u+1=lft x2l-.75inner_jut; fi dish_serif(11',12,i,1/2,outer_jut,j,.6,inner_jut)(dark); % lower left serif nodish_serif(1,2,a,1/3,cap_jut+x1l-x12,b,1/3,.5cap_jut); % upper serif nodish_serif(2,1,c,1/3,.75inner_jut,d,1/3,.5cap_jut); fi % lower middle serif penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar; lhchar "Uppercase Cyrillic letter ABH_CH - lower e hook"; cyrchar(ABH_CH,(11.25u#+max(.75u#,.5cap_curve#)), cap_height#,0); if is_small_cap: getcharcode(abh_ch); fi italcorr .7cap_height#*slant-.4u#; %O+.1u adjust_fit(1.5dot_size#-tiny# %if serifs:max(1.5u,u#+.5flare#) if monospace: +\\1.25u#,-.25u#+ else:,fi\\ 0); %large_e;`large e' shape (ecfonts) numeric left_curve,right_curve; left_curve=right_curve+3stem_corr=cap_curve if not serifs: -1.5stem_corr fi; if right_curve=middle_weight+1+eps): fill stroke pulled_arc.e(2',5) & z5e{right}...{.75(z5-z6)+z6'}z6'e; else: fill stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc numeric inner_jut; pickup tiny.nib; 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(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 else: filldraw stroke pulled_arc.e(2',5) & z5e--z6e; fi % arc %%%%% % vcross pickup crisp.nib; pos7(bar,0); pos8(bar,0); lft x7l=lft x8l=hround(.5[x1r,x3l]-.5bar); top y8-bot y7=.5cap_height; .5[y7,y8]=y6; filldraw stroke z7e--z8e; penlabels(1,2,3,4,5,6); endchar; lhchar "Uppercase Cyrillic letter W"; cyrchar(LAT_W,18u#,cap_height#,0); if is_small_cap: getcharcode(lat_w); fi italcorr cap_height#*slant+.25u#; adjust_fit(cap_serif_fit#,cap_serif_fit#); numeric stem[],outer_jut,upper_notch,alpha,mid_corr; outer_jut=.7cap_jut; x1l=w-x8r=l+letter_fit+outer_jut+.25u; stem1=fudged.cap_stem-stem_corr; stem4=min(fudged.hair if hefty:-2stem_corr fi,stem1); stem2=stem4 if hefty:-2stem_corr fi; stem3=stem1 if hefty:-2stem_corr fi; x2-x1=x4-x3=x6-x5=x8-x7; x2l+apex_corr=x3l; x6l+apex_corr=x7l; y1=y8=h; y2=y3=y6=y7=-apex_o; y4=y5=if monospace: vround .6 fi\\ h; mid_corr=if monospace or hefty:-apex_corr else: 1/3jut fi; alpha=diag_ratio(4,stem2-stem3+stem4,y1-y2,x8r-x1l+mid_corr-2apex_corr); penpos1(alpha*stem1,0); penpos2(alpha*stem1,0); penpos3(alpha*stem2,0); penpos4(alpha*stem2,0); penpos5(alpha*stem3,0); penpos6(alpha*stem3,0); penpos7(alpha*stem4,0); penpos8(alpha*stem4,0); x4l-x1l=floor(x4l-x1l+.5(x5r+mid_corr-x4r)); % |x5r+mid_corr| $\approx$ |x4r| z23=whatever[z1r,z2r]=whatever[z3l,z4l]; z45=whatever[z3r,z4r]=whatever[z5l,z6l]; z67=whatever[z5r,z6r]=whatever[z7l,z8l]; upper_notch=y4-cap_notch_cut; fill diag_end(1l,2l,1,1,3r,4r){z4-z3} ...if y45cap_notch_cut:(x67,cap_notch_cut)+.5right{down} --(x67,cap_notch_cut)+.5left{up} else: z67&z67 fi ...{z5-z6}special_diag_end(6,5,4,3){z3-z4} ...if y23>cap_notch_cut:(x23,cap_notch_cut)+.5right{down} --(x23,cap_notch_cut)+.5left{up} else: z23&z23 fi ...{z1-z2}diag_end(2r,1r,1,1,1l,2l)--cycle; % diagonals if serifs: numeric inner_jut[]; pickup tiny.nib; prime_points_inside(1,2); prime_points_inside(5,6); prime_points_inside(8,7); if monospace: inner_jut1=inner_jut4=1.5cap_jut; elseif hefty: inner_jut1=inner_jut4=cap_jut; else: fill diag_end(6r,5r,1,1,5l,6l)--.9[z5l,z6l] ..{z5-z6}.1[z5r,z6r]--cycle; % middle stem inner_jut2=.7inner_jut1; inner_jut4=1.1inner_jut3; if rt x1'r+cap_jut+.5u+1<=lft x5'l-.7cap_jut: inner_jut1=cap_jut; else: rt x1'r+inner_jut1+.5u+1=lft x5'l-inner_jut2; fi if rt x5'r+cap_jut+.5u+1<=lft x8'l-1.1cap_jut: inner_jut3=cap_jut; else: rt x5'r+inner_jut3+.5u+1=lft x8'l-inner_jut4; fi dish_serif(5',6,e,1/3,inner_jut2,f,1/2,inner_jut3); fi % middle serif dish_serif(1',2,a,1/3,outer_jut,b,1/2,inner_jut1); % left serif dish_serif(8',7,c,.6,inner_jut4,d,1/2,outer_jut)(dark); fi % right serif penlabels(0,1,2,3,4,5,6,7,8,23,45,67); endchar; lhchar "Uppercase Cyrillic letter N_ltl - EN with left tail"; cyrchar(N_ltl,13.5u#,cap_height#,desc_depth#); if is_small_cap: getcharcode(n_ltl); fi italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); adjust_fit(cap_serif_fit#,cap_serif_fit#); % upper_n; pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0); pos3(cap_stem,0); pos4(cap_stem,0); lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); 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 penpos5(cap_bar,90); penpos6(cap_bar,90); x5=x1; x6=x3; y5=y6=.52h; fill stroke z5e--z6e; % bar %%% 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); fi % lower right serif %%%%% % L_tail(2)x; _zero:=2; _one:=7; _two:=8; _three:=9; _four:=10; _five:=11; % 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+if serifs: vair' else: slab fi+eps); if serifs: numeric bulb_diam; bulb_diam=max(currentbreadth+eps,min(.82d-1-eps,flare+(cap_stem-stem))); 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=vround max(-.85d,y[_two]r+eps)+eps; z[_three]r=z[_four]r; %rt x[_four]l=floor x[_zero]-2u if monospace: / expansion_factor fi;%2.5u lft x[_four]r=-1/3u if monospace: / expansion_factor fi;%2.5u %filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); forsuffixes e=l,r: z[_one]'e=((0,y[_four])--(w,y[_four])) intersectionpoint (z[_five]e--pulled_arc.e([_one],[_two])); endfor if lft x[_one]'l>rt x[_four]l+max(1,.5vair+.5): filldraw stroke z[_five]e--pulled_arc.e([_one],[_two]); else: x[_one]'l:=min(rt x[_four]l+max(1,hround(.5vair+.5)),rt x[_one]'r-vair)+.5fine-eps; filldraw z[_five]r--pulled_arc.r([_one],[_two])--z[_two]l{right} ..z[_one]'l{up}..{up}z[_five]l--cycle; fi bulb([_two],[_three],[_four]); % bulb else: pos[_two](slab,-90); pos[_three](flare,-105); rt x[_three]r=x[_zero]-2.5u; bot y[_three]r=-d;%4u bot y[_two]r=-d-o; 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(1,2,3,4,5,6, 7,8,9,10,11); endchar; iff serifs: lhchar "Uppercase Cyrillic letter DELTA - Lowercase Greek delta"; cyrchar(DELTA,10u#-width_adj#,asc_height#,0); if is_small_cap: getcharcode(delta); fi italcorr .9asc_height#*slant+.5hair#-1.5u#; adjust_fit(0,0); pickup fine.nib; x0=-u; y0=1.1h; numeric light_flare; light_flare=3/4[vair,flare]; x1=w-2u-.5light_flare; y1=h-.5light_flare; numeric theta; theta=angle (z1-z0); pos1(light_flare,theta-90); pos2(.2[vair,light_flare],-90); x2=x3+2u; y2=h; x4=.5w+.5u; x6=.55[x7,x5]; top y8r=1/4[x_height,cap_height]+o; z4=z8; pos6(vround(vair+1.5vair_corr),-90); pos7(cap_stem,-180); pos8(vair',-270); pos3(1/3[hair,cap_stem],angle(z4-z0)+60); pos4(cap_stem,angle(z4-z0)+45); pos5(cap_stem,15); z3=1/3[z4,(x0,.5[y0,h])]; y5+.05x_height=y7=.5[y6,y8]; bot y6=-o; lft x7r=hround(1.4u-.5cap_stem); rt x5r=hround(w-u); z35=point 1.5 of (z1{z0-z1}...z2....z3{z4-z0});%{(z0-z1)rotated 90}); pos35(hair,angle(.5[z4,z1]-z0)); filldraw stroke z1e{z0-z1e}....z2e...z35e..z3e{z4e-z0}%{(z0-z1)rotated 90} ...z4e{z4e-.8[z4,z0]} ....z5e{down}...pulled_arc.e(6,7) & pulled_arc.e(7,8); % hook and bowl filldraw z1r{z1r-z0}...z1l{z0-z1l}--cycle; % bulb math_fit(-.3x_height#*slant+.5curve#-u#,.7x_height#*slant-.5u#); penlabels(0,1,2,3,35,4,5,6,7,8); endchar; iff not serifs: lhchar "Uppercase Cyrillic letter delta - Lowercase Greek delta"; cyrchar(DELTA,11u#-2width_adj#,asc_height#,0); italcorr .9asc_height#*slant+.5hair#-1.5u#; adjust_fit(0,0); pickup fine.nib; x0=-u; y0=1.1h; numeric light_flare; light_flare=3/4[vair,flare]; x1=w-2u-.5light_flare; y1=h-.5light_flare; numeric theta; theta=angle (z1-z0); pos1(light_flare,theta-90); pos2(.2[vair,light_flare],-90); x2=x3+2u; y2=h; x4=.5w+.5u; x6=.5[x7,x5]; top y8r=1/4[x_height,cap_height]+o; z4=z8; pos6(vround(vair+1.5vair_corr),-90); pos7(cap_stem,-180); pos8(vair',-270); pos3(vair,angle(z4-z0)+90); pos4(.5[vair,cap_stem],angle(z4-z0)+90); pos5(fudged.stem,0); z3=1/3[z4,(x0,.5[y0,h])]; y5=y7=.5[y6,y8]; bot y6=-o; lft x7r=hround(1.4u-.5stem); rt x5r=hround(w-1.4u+.5stem); z35=point 1.5 of (z1{z0-z1}...z2....z3{z4-z0}); pos35(vair,angle(.5[z4,z1]-z0)); filldraw stroke z1e{z0-z1e}...z2e..z35e..z3e{z4e-z0} ...z4e{z4-.8[z4,(x0,h)]} ... {{interim superness:=more_super; pulled_arc.e(5,6) & pulled_arc.e(6,7) & pulled_arc.e(7,8)}}; % hook and bowl math_fit(-.3x_height#*slant+.5curve#-u#,.7x_height#*slant-.5u#); penlabels(0,1,2,3,35,4,5,6,7,8); endchar; lhchar "Uppercase Cyrillic letter M_tl - M tail"; cyrchar(M_tl,16u#+width_adj#,cap_height#,desc_depth#); if is_small_cap: getcharcode(m_tl); fi italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); adjust_fit(cap_serif_fit#,cap_serif_fit#); % upper_m; 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.5cap_curve#) or (cap_bar<3): penpos[_two](cap_bar,90); x[_four]=.5[x[_zero],w-if serifs:1.5u else:2.5u fi]+.5u; y[_one]=y[_two]=.52h; x[_two]=x[_four]; else: penpos[_two](1/18[cap_bar,cap_curve],90); x[_four]=.5[x[_zero],w-1.5u]+.5u; y[_one]l=y[_two]l-.35cap_bar=.52h-.5cap_bar; x[_two]=x[_four]-.35u; fi x[_two]l:=x[_two]l-.5u; x[_four]l:=x[_four]l-.5u; fill stroke z[_five]e..super_arc.e([_four],[_three]) & super_arc.e([_three],[_two])..z[_one]e; % lobe %%% % hcross pickup crisp.nib; pos8(bar,90); pos9(bar,90); lft x8=w-x9-4u; %hround 1/3u if serifs:-serif_fit fi; x9=hround(w-2.65u); %x4; %1r+2.5u; top y8r=top y9r=vround .85h;%vround x_height+eps; filldraw stroke z8e--z9e; % cross bar %%%%% penlabels(1,2,3,4,5,6,7,8,9,10); endchar; lhchar "Uppercase Cyrillic letter I_shdsc - SHORT I WITH DESCENDER"; cyrchar(I_shdsc,13.5u#,cap_height#+acc_height#, % N_width if is_ogonek: desc_depth# else: cap_sbeak# fi); %udesc/og_depth if is_small_cap: getcharcode(i_shdsc); fi italcorr cap_height#*slant-cap_serif_fit#+cap_jut#-2.5u#+min(.5cap_stem#,u#); adjust_fit(cap_serif_fit#,cap_serif_fit#); full_h:=h; h:=cap_height; % upper_i; pickup tiny.nib; pos1(fudged.cap_stem,0); pos2(fudged.cap_stem,0); pos3(fudged.cap_stem,0); pos4(fudged.cap_stem,0); lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); 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 stem[],alpha[]; if hefty: numeric upper_notch,lower_notch; stem1=fudged.hair-stem_corr; upper_notch=y6-cap_notch_cut-eps; lower_notch=y5+cap_notch_cut+eps; if monospace: x5r =rt x1r; x6l =lft x3l; y5=vround(slab+eps); y6=vround(h-slab-eps); alpha1=diag_ratio(1,stem1,y5-y6,x5r-x6l); penpos5(min(2fudged.cap_stem,alpha1*stem1),0); penpos6(min(2fudged.cap_stem,alpha1*stem1),0); x5'=lft x1l; z5'=whatever[z5l,z6l]; x6'=rt x4r; z6'=whatever[z5r,z6r]; x5l:=x5'; x6r:=x6'; y5l:=y5'; y6r:=y6'; else: y5l=0; y6r=h; x5=x1r; x6=x3l; penpos5(stem1,0); penpos6(stem1,0); fi x2'=rt x1r; z2'=whatever[z5l,z6l]; x3'=lft x4l; z3'=whatever[z5r,z6r]; fill z5l.. if y2'>lower_notch: {right}(x2'+1,lower_notch){up}... fi {z6-z5}diag_in(5l,6l,1,6r)--z6r.. if y3'