%
% lgcspl.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:
%
%   Metafont program for the characters in positions of ligatures
%   for the "caps and small caps" fonts
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%   I,J
%   if roman_ec: FI,FL,FFI,FFL fi -- for T2* stuff only
%

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

lhchar "The letter I";
beginchar(oct"031",max(6u#,4u#+cap_stem#),cap_height#,0);
italcorr cap_height#*slant-.25u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
if serifs or slitex or monospace:
 dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut);  % upper serif
 dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut);  fi % lower serif
math_fit(0,.5ic#); penlabels(1,2); endchar;

lhchar "The letter J";
beginchar(oct"032",9u#,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; pos1(cap_stem',0); pos2(cap_stem',0);
top y1=h; rt x1r=hround(w-2u); x2=x1; y2=.21h;
if serifs: pos3(vair,-90); pos4(cap_hair,-180);
 pos5(flare+(cap_stem-stem),-180);
 bot y3r=-o; x3=.5[x4,x2]; y5=1/6h; rt x5l=hround 2.75u; z5r=z4r;
 filldraw stroke z1e--z2e&super_arc.e(2,3);  % stem and arc
 dish_serif(1,2,a,1/3,1.3cap_jut,b,1/3,.75cap_jut);  % serif
 pickup tiny.nib; bulb(3,4,5);  % bulb
else: filldraw stroke z1e--z2e;  % stem
 pickup fine.nib; pos3(cap_stem',0); z3=z2;
 pos4(flare,angle(6.5u,-h)); pos5(1.1flare,-100);
 bot y4r=-o; x4r=.5[x5r,x3r]; lft x5r=hround.75u; bot y5r=vround.06h-o;
 filldraw stroke z3e{down}....term.e(4,5,left,1,4); fi % arc and terminal
math_fit(0,.5ic#-.5u#); penlabels(1,2,3,4,5); endchar;

if roman_ec:

lhchar "The letter FF";
beginchar(oct"033",2(11.5u#-width_adj#),cap_height#,0);
italcorr cap_height#*slant-.25u#;
normal_adjust_fit(cap_serif_fit#,0);
h:=vround(h-stem_corr);
w':=11.5u-width_adj;
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps;
arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
pos5(cap_bar,-90); pos6(hair,0);
top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1;
pos0(cap_bar,90); pos7(hair,0);
z0=z5; x6=x7; y6-y5l=y0l-y7;
if serifs: rt x6r=hround(w'-4u+.5hair); 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
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi  % lower serif
% the second F
currentpicture:=currentpicture + currentpicture shifted (w',0);
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar;

lhchar "The letter FI";
beginchar(oct"034",11.5u#-width_adj#+max(6u#,4u#+cap_stem#),cap_height#,0);
italcorr cap_height#*slant-.25u#;
normal_adjust_fit(cap_serif_fit#,0);
h:=vround(h-stem_corr);
w':=11.5u-width_adj;
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps;
arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
pos5(cap_bar,-90); pos6(hair,0);
top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1;
pos0(cap_bar,90); pos7(hair,0);
z0=z5; x6=x7; y6-y5l=y0l-y7;
if serifs: rt x6r=hround(w'-4u+.5hair); 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
if serifs:
 nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi  % lower serif
% the I
xshift:=w';
w':=w-xshift;
pickup tiny.nib; pos11(cap_stem,0); pos12(cap_stem,0);
lft x11l=lft x12l=hround(xshift+.5w'-.5cap_stem); top y11=h; bot y12=0;
filldraw stroke z11e--z12e; % stem
if serifs or slitex or monospace:
 dish_serif(11,12,aa,1/3,1.05cap_jut,bb,1/3,1.05cap_jut);  % upper serif
 dish_serif(12,11,gg,1/3,1.05cap_jut,dd,1/3,1.05cap_jut);  fi % lower serif
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar;

lhchar "The letter FL";
beginchar(oct"035",(11.5u#-width_adj#)+11u#-width_adj#,cap_height#,0);
italcorr cap_height#*slant-.25u#;
normal_adjust_fit(cap_serif_fit#,0);
h:=vround(h-stem_corr);
w':=11.5u-width_adj;
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps;
arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
pos5(cap_bar,-90); pos6(hair,0);
top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1;
pos0(cap_bar,90); pos7(hair,0);
z0=z5; x6=x7; y6-y5l=y0l-y7;
if serifs: rt x6r=hround(w'-4u+.5hair); 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
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi  % lower serif
% the L
xshift:=w';
pickup tiny.nib; pos11(cap_stem,0); pos12(cap_stem,0);
lft x11l=lft x12l=hround xshift+max(2u,3u-.5cap_stem); top y11=h; bot y12=0;
filldraw stroke z11e--z12e; % stem
pickup crisp.nib; pos13(slab,-90); pos14(hair,0);
bot y13r=0; x13=x12; y14=y13l+7/6beak+eps; rt x14r=hround(w-.75u);
arm(13,14,eee,1.2beak_darkness,beak_jut);  % lower arm and beak
if serifs: dish_serif(11,12,aaa,1/3,cap_jut,bbb,1/3,1.25cap_jut);  % upper serif
 nodish_serif(12,11,ccc,1/3,cap_jut,ddd,1/3,.5cap_jut); fi  % lower serif
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar;

lhchar "The letter FFI";
beginchar(oct"036",2(11.5u#-width_adj#)+max(6u#,4u#+cap_stem#),cap_height#,0);
italcorr cap_height#*slant-.25u#;
normal_adjust_fit(cap_serif_fit#,0);
h:=vround(h-stem_corr);
w':=11.5u-width_adj;
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps;
arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
pos5(cap_bar,-90); pos6(hair,0);
top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1;
pos0(cap_bar,90); pos7(hair,0);
z0=z5; x6=x7; y6-y5l=y0l-y7;
if serifs: rt x6r=hround(w'-4u+.5hair); 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
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi  % lower serif
% the second F
currentpicture:=currentpicture + currentpicture shifted (w',0);
% the I
xshift:=2w';
w':=w-xshift;
pickup tiny.nib; pos11(cap_stem,0); pos12(cap_stem,0);
lft x11l=lft x12l=hround(xshift+.5w'-.5cap_stem); top y11=h; bot y12=0;
filldraw stroke z11e--z12e; % stem
if serifs or slitex or monospace:
 dish_serif(11,12,aa,1/3,1.05cap_jut,bb,1/3,1.05cap_jut);  % upper serif
 dish_serif(12,11,gg,1/3,1.05cap_jut,dd,1/3,1.05cap_jut);  fi % lower serif
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar;

lhchar "The letter FFL";
beginchar(oct"037",2(11.5u#-width_adj#)+11u#-width_adj#,cap_height#,0);
italcorr cap_height#*slant-.25u#;
normal_adjust_fit(cap_serif_fit#,0);
h:=vround(h-stem_corr);
w':=11.5u-width_adj;
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos3(slab,90); pos4(hair,0);
top y3r=h; x3=x1; rt x4r=hround(w'-.75u); y4=good.y(y3l-beak)-eps;
arm(3,4,e,beak_darkness,beak_jut);  % upper arm and beak
pos5(cap_bar,-90); pos6(hair,0);
top y5l=vround(.5[y2,y1]+.5cap_bar); x5=x1;
pos0(cap_bar,90); pos7(hair,0);
z0=z5; x6=x7; y6-y5l=y0l-y7;
if serifs: rt x6r=hround(w'-4u+.5hair); 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
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut);  % upper serif
 dish_serif(2,1,c,1/3,cap_jut,d,1/3,1.25cap_jut); fi  % lower serif
% the I
currentpicture:=currentpicture + currentpicture shifted (w',0);
% the L
xshift:=2w';
pickup tiny.nib; pos11(cap_stem,0); pos12(cap_stem,0);
lft x11l=lft x12l=hround xshift+max(2u,3u-.5cap_stem); top y11=h; bot y12=0;
filldraw stroke z11e--z12e; % stem
pickup crisp.nib; pos13(slab,-90); pos14(hair,0);
bot y13r=0; x13=x12; y14=y13l+7/6beak+eps; rt x14r=hround(w-.75u);
arm(13,14,eee,1.2beak_darkness,beak_jut);  % lower arm and beak
if serifs: dish_serif(11,12,aaa,1/3,cap_jut,bbb,1/3,1.25cap_jut);  % upper serif
 nodish_serif(12,11,ccc,1/3,cap_jut,ddd,1/3,.5cap_jut); fi  % lower serif
math_fit(0,ic#-2.5u#); penlabels(0,1,2,3,4,5,6,7,8,9,11,12); endchar;

fi % roman_ec

endinput;
