% lexslides
% 
% (c) Copyright 2002/07/13 Claudio Beccari
%
% Contains the redefinition of all slides glyphs containing l
% so as to modify it with a hook.
% The overall definitions are copied and modified from several
% ex* Metafont files with the ec fonts, copyright by Schwarz and Knappen
% in compliance with their copyright notice.
% This file is being invoked by lexroman.mf, a modied version of
% Schwarz and Knappen exroman.mf, wich in turn is being called by the
% driver files of the various modified slides fonts.
%



ecchar "The letter l with hook for slides";% jk,cb
beginchar("l",5u#,asc_height#,0); 
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,u#);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2u-.5shaved_stem);
y3=max(.5bar_height,2vair);
 pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2=x_height;
 filldraw stroke z1e--z2'e;  % upper terminal
 pickup fine.nib; interim superness:=more_super;
 pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u)+1.6u;
 pos5(vair,-75); top y5l=vround .2[top y4l,bar_height];
 x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair;
 filldraw stroke z2e..super_arc.e(3,4);  % stem and hook
 path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e;  % terminal
 if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0):
 filldraw stroke z4e{right}...{up}z5e;
 else: filldraw p; fi
penlabels(1,2,3,4,5); endchar;


ecchar "The letter l with hook for slides with acute"; % jk,cb
beginchar_twice(oct"250",5u#,asc_height#,0); 
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,u#);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2u-.5shaved_stem);
y3=max(.5bar_height,2vair);
 pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2=x_height;
 filldraw stroke z1e--z2'e;  % upper terminal
 pickup fine.nib; interim superness:=more_super;
 pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u)+1.6u;
 pos5(vair,-75); top y5l=vround .2[top y4l,bar_height];
 x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair;
 filldraw stroke z2e..super_arc.e(3,4);  % stem and hook
 path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e;  % terminal
 if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0):
 filldraw stroke z4e{right}...{up}z5e;
 else: filldraw p; fi
put_accent;
repeat_once;
penlabels(1,2,3,4,5); endchar;

ecchar "The letter l with hook for slides with hachek"; % from csotherl.mf (csfonts),cb
beginchar(oct"251",5u#,lc_acute_height#,0); l_width#:=5u#+2serif_fit#;
italcorr lc_acute_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,u#);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2u-.5shaved_stem);
y3=max(.5bar_height,2vair);
 pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2=x_height;
 filldraw stroke z1e--z2'e;  % upper terminal
 pickup fine.nib; interim superness:=more_super;
 pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u)+1.6u;
 pos5(vair,-75); top y5l=vround .2[top y4l,bar_height];
 x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair;
 filldraw stroke z2e..super_arc.e(3,4);  % stem and hook
 path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e;  % terminal
 if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0):
 filldraw stroke z4e{right}...{up}z5e;
 else: filldraw p; fi
penlabels(1,2,3,4,5);
dtl_hachek(x1r+u+.5pdot_diam)(y1);
endchar;

ecchar "The letter crossed l with hook for slides"; % from pl_ml (plfonts),cb
beginchar_twice(oct"252",5u#,asc_height#,0);
 italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
 charwd_:=charwd;
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos2(shaved_stem,180);pos3(shaved_stem,180);
lft x2r=lft x3r=hround(2u-.5shaved_stem);
y3=max(.5bar_height,2vair);
 pickup tiny.nib; pos1(hround(shaved_stem-stem_corr),0);
 rt x1r=fine.rt x2l; top y1=h;
 penpos2'(x1r-x1l,0); x2'=x1; y2'=y2=x_height;
 filldraw stroke z1e--z2'e;  % upper terminal
 pickup fine.nib; interim superness:=more_super;
 pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u)+1.6u;
 pos5(vair,-75); top y5l=vround .2[top y4l,bar_height];
 x5l:=good.x x5l; x4l=1/3[x3l,x5l]; x4r:=1/3[x3r,x5r]; y3l:=y3l+.2vair;
 filldraw stroke z2e..super_arc.e(3,4);  % stem and hook
 path p; p=stroke z4e{right}..tension .9 and atleast 1..z5e;  % terminal
 if (xpart(z5l-precontrol 1 of p)<0) or (xpart(z5r-postcontrol 2 of p)<0):
 filldraw stroke z4e{right}...{up}z5e;
 else: filldraw p; fi
 penlabels(1,2,3,4,5);
 numeric unbalance;
 unbalance=1.1;
 numeric cross_fit#; 
 cross_fit#=serif_fit#+if is_bold: 1.5 else: 1.25 fi\\ u#;
 charwd:=charwd_;
 adjust_fit(cross_fit#,u#);
 numeric l_jut;
l_jut=.5stem+ 1.7u;
put_cross(l_jut,unbalance*l_jut);
repeat_once;
endchar;


ecchar "The ligature fl";
beginchar(oct"035",10u#+2letter_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,u#);
% This is the "f"
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pickup fine.nib; numeric bulb_diam, inner_jut;
 pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.3u; 
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround .5u-1;
pos3(bar,90); pos4(bar,90);
rt x4= hround 5.3u; 
pickup crisp.nib; filldraw stroke z3e--z4e;  % bar
% This is the "l" drawn to the right of the "f"
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos12(shaved_stem,180);pos13(shaved_stem,180);
lft x12r=lft x13r=hround(rt x4 + if is_bold: .5shaved_stem else: 1.3u fi);
y13=max(.5bar_height,2vair);
 pickup tiny.nib; pos11(hround(shaved_stem-stem_corr),0);
 rt x11r=fine.rt x12l; top y11=h;
 penpos12'(x11r-x11l,0); x12'=x11; y12'=y12=x_height;
 filldraw stroke z11e--z12'e;  % upper terminal
 pickup fine.nib; interim superness:=more_super;
 pos14(vair',-90); bot y14r=-oo; rt x15r=hround(w-u)+1.6u;
 pos15(vair,-75); top y15l=vround .2[top y14l,bar_height];
 x15l:=good.x x15l; x14l=1/3[x13l,x15l]; x14r:=1/3[x13r,x15r]; y13l:=y13l+.2vair;
 filldraw stroke z12e..super_arc.e(13,14);  % stem and hook
 path p; p=stroke z14e{right}..tension .9 and atleast 1..z15e;  % terminal
 if (xpart(z15l-precontrol 1 of p)<0) or (xpart(z15r-postcontrol 2 of p)<0):
 filldraw stroke z14e{right}...{up}z15e;
 else: filldraw p; fi
penlabels(1,2,3,4,11,12,13,14,15); endchar;

ecchar "The ligature ffl";
beginchar(oct"037",15u#+4letter_fit#,asc_height#,0);
italcorr asc_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(0,u#);
% These are the two "f"
pickup tiny.nib; pos1(stem',0); lft x1l=hround(2.5u-.5stem');
pos11(stem',0); lft x11l=hround(.5w-.5stem');
pickup fine.nib; numeric bulb_diam, inner_jut;
if serifs: bulb_diam=hround .8[stem,flare];
 pos2(bulb_diam,0); x2r=x11r-stem_corr;
 pos12(bulb_diam,0); x12r=x21r-stem_corr;
 y2+.5bulb_diam=.85[x_height,h+oo]; y12+.5bulb_diam=.9[x_height,h+oo];
 sloped_serif.l(21,22,g,1/3,eps,max(serif_drop,oo)); % erase excess at top
 if rt x1r+jut+.5u+2<=lft x11l-jut: inner_jut=jut;
 else: rt x1r+inner_jut+.5u+2=lft x11l-inner_jut; fi
else: pos2(5/7[vair,flare],90); top y2r=h; rt x2=hround 5.75u;
 pos12(5/7[vair,flare],90); y12=y2; rt x12=hround(.5w+2.8u); fi
f_stroke(1,2,a,b,c,jut,inner_jut); % left stem, arc, terminal, serif
f_stroke(11,12,d,e,f,inner_jut,inner_jut); % middle ditto
pickup crisp.nib; top y3r=top y4r=x_height; lft x3=hround.5u-1;
pos3(bar,90); pos4(bar,90);
rt x4=hround(.5w+2.8u); 
if hefty: pos3'(bar,90); x3'-x1=x4-x11; y3'=y3;
 pos4'(bar,90); x4'=x11; y4'=y4;
 filldraw stroke z3e--z3'e; filldraw stroke z4'e--z4e;  % bars
else: filldraw stroke z3e--z4e; fi  % bar
% This is the "l" drawn to the right of the second "f"
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup fine.nib; pos22(shaved_stem,180);pos23(shaved_stem,180);
lft x22r=lft x23r=hround(rt x4 + if is_bold: .5shaved_stem else: 1.3u fi);
y23=max(.5bar_height,2vair);
 pickup tiny.nib; pos21(hround(shaved_stem-stem_corr),0);
 rt x21r=fine.rt x22l; top y21=h;
 penpos22'(x21r-x21l,0); x22'=x21; y22'=y22=x_height;
 filldraw stroke z21e--z22'e;  % upper terminal
 pickup fine.nib; interim superness:=more_super;
 pos24(vair',-90); bot y24r=-oo; rt x25r=hround(w-u)+1.6u;
 pos25(vair,-75); top y25l=vround .2[top y24l,bar_height];
 x25l:=good.x x25l; x24l=1/3[x23l,x25l]; x24r:=1/3[x23r,x25r]; y23l:=y23l+.2vair;
 filldraw stroke z22e..super_arc.e(23,24);  % stem and hook
 path p; p=stroke z24e{right}..tension .9 and atleast 1..z25e;  % terminal
 if (xpart(z25l-precontrol 1 of p)<0) or (xpart(z25r-postcontrol 2 of p)<0):
 filldraw stroke z24e{right}...{up}z25e;
 else: filldraw p; fi
penlabels(1,2,3,4,11,12,21,22,23,24,25); endchar;
