% This is  LOWERIJ.MF
% Version 1.0e 
% Date 22-JUN-1993
% 
% (c) 1991, 1992, 1993 by J"org Knappen. See fc.rme for copying conditions

% This file is part of the fc-package 
% See fc.rme for more information
%
% J"org Knappen
% Institut f"ur Kernphysik
% Postfach 39 80
% D-W 6500 Mainz
% knappen@vkpmzd.kph.uni-mainz.de

% Contents:
%
% The following characters are generated without condition:
%
% \i, i, \j, j
%
% And the following on demand, i. e. if their code is known:
%
% i_umlaut, i_dotu, i_tilde, latin_iota, dotless_i_dotu
%
% Higher versions of this file might include more characters.


cmchar "Dotless letter i";           % cm
beginchar(oct"031",5u#,x_height#,0);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0;
filldraw stroke z1e--z2e;  % stem
if serifs or monospace: 
  sloped_serif.l(1,2,a,1/3,.95jut,serif_drop);  % upper serif
fi
if serifs:
 dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi  % lower serif
picture savedpicture; savedpicture:=currentpicture;
pos3(dot_diam,0); 
if serifs: x3r=max(x1r,x1+.5(dot_diam-tiny)-.2jut) else: x3=x1-.5 fi;
x3:=good.x(x3);
picture savedpicture;
savedpicture:=currentpicture;
savedpoint:=x3;
penlabels(1,2); endchar;

iff known dotless_i_dotu:
cmchar "The letter dotless i with dot below";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar(dotless_i_dotu,5u#,min(asc_height#,10/7x_height#+.5dot_diam#),
  0.875desc_depth#);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit# + .5dot_diam# -2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
currentpicture:=savedpicture;
pos88(dot_diam,0); pos99(dot_diam,90);
x88=x99=savedpoint; bot y99l=-d-1; 
if top y99r+oo>-slab: y99r:=max(y99l+eps,-oo-tiny-slab); fi
y88=.5[y99r,y99l];
dot(88,99); 
penlabels(88,99); endchar;

numeric savedpoint;

iff known i_tilde:
cmchar "The letter i with tilde";
beginchar(i_tilde,5u#,.75[x_height#,min(asc_height#,2x_height#)],0);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos11(stem',0); pos22(stem',0);
if odd(w-stem'): change_width; fi
currentpicture:=savedpicture;
if serifs: numeric theta; theta=angle(1/6(6u-vair),1/4(h-x_height));
 pickup crisp.nib; numeric mid_width; mid_width=.4[vair,stem];
 pos1(vair,theta+90); pos2(vair,theta+90);
 pos3(vair,theta+90); pos4(vair,theta+90);
 z2-z1=z4-z3=(mid_width-crisp)*dir theta;
 if not monospace: lft x1r=hround 0;rt x4l=hround w;
 else: lft x1r=hround u; rt x4l=hround(w-u); fi 
 top y4r=h;
 bot y1l=vround(bot y1l+min(2/3[x_height,h],y3l-.25vair)-top y1r);
 pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta;
 filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l
  --z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle;  % stroke
else: pickup fine.nib; pos1(vair,180); pos2(vair,90);
 pos3(.5[vair,slab],90); pos4(vair,90); pos5(vair,180);
 if not monospace: lft x1r=hround 0; rt x5l=hround w; 
 else: lft x1r=w-rt x5l=hround 5/6u; fi
  x2-x1=x3-x2=x4-x3=x5-x4;
 bot y1=bot y4l=vround(.75[x_height,h]-vair);
 top y2r=top y5=h; y3=.5[y2,y4];
 filldraw stroke z1e{up}...z2e{right}..z3e..{right}z4e...{up}z5e; fi % stroke
penlabels(1,2,3,4,5); endchar;

iff known i_umlaut:
cmchar "The letter i with trema";
numeric dot_diam#,dot_diam;
dot_diam#=max(dot_size#,cap_curve#);
beginchar(i_umlaut,5u#,.75[x_height#,min(asc_height#,2x_height#)],0);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
dot_diam=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr));
pickup tiny.nib; pos11(stem',0); pos22(stem',0);
if odd(w-stem'): change_width; fi
currentpicture:=savedpicture;
pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
pos3(dot_diam,0); penpos4(y2r-y2l,90); y3=y4=y1; 
if not monospace: x1=x2=w-x3=w-x4=good.x(.5w-2u); 
else: x1=x2=w-x3=w-x4=good.x(.5w-u); fi	
top y2r=h+1;
if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi
y1=.5[y2l,y2r]; dot(1,2);  % left dot
dot(3,4);  % right dot
penlabels(1,2,3,4); endchar;

savedpicture:=nullpicture;

cmchar "The letter i";           % cm
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("i",5u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit# + .5dot_diam# -2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
lft x1l=hround(.5w-.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=0;
filldraw stroke z1e--z2e;  % stem
pos3(dot_diam,0); pos4(dot_diam,90);
if serifs: x3r=max(x1r,x1+.5(dot_diam-tiny)-.2jut) else: x3=x1-.5 fi;
x3:=good.x(x3);
top y4r=h+1;
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi
x3=x4; y3=.5[y4l,y4r]; dot(3,4);  % dot
if serifs or monospace: 
  sloped_serif.l(1,2,a,1/3,.95jut,serif_drop);  % upper serif
fi
if serifs:   
  dish_serif(2,1,b,1/3,jut,c,1/3,.9jut); fi  % lower serif
picture savedpicture;
savedpicture:=currentpicture;
savedpoint:=x3;
penlabels(1,2,3,4); endchar;

iff known i_dotu:
cmchar "The letter i with dot below";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar(i_dotu,5u#,min(asc_height#,10/7x_height#+.5dot_diam#),
  0.875desc_depth#);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit# + .5dot_diam# -2u#;
adjust_fit(serif_fit#+stem_shift# if monospace:+.25u#fi,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
if odd(w-stem'): change_width; fi
currentpicture:=savedpicture;
pos88(dot_diam,0); pos99(dot_diam,90);
x88=x99=savedpoint; bot y99l=-d-1; 
if top y99r+oo>-slab: y99r:=max(y99l+eps,-oo-tiny-slab); fi
y88=.5[y99r,y99l];
dot(88,99); 
penlabels(88,99); endchar;

numeric savedpoint;
savedpicture:=nullpicture;

iff known latin_iota:
cmchar "The letter iota";    % jk
beginchar(latin_iota,6u#+max(u#,.5stem#),x_height#,0);
italcorr x_height#*slant if serifs: -.9u# else: -.4u# fi;
adjust_fit(0,if serifs: 0 else: -.5u# fi);
numeric shaved_stem; shaved_stem=hround(stem if hefty:-\\2stem_corr fi);
pickup tiny.nib; pos2'(shaved_stem,0); 
pos1(shaved_stem,0);pos2(shaved_stem,180); pos3(shaved_stem,180);
x1l=x2'l; z2=z2';  y1=0;
lft x2r=lft x3r=hround(2.5u-.5shaved_stem);
top y2=h if serifs:+min(oo,serif_drop) fi; y3=max(.5bar_height,2vair);
interim superness:=more_super;
pos4(vair',-90); bot y4r=-oo; rt x5r=hround(w-u);
if serifs: pos5(hair,0); y5=y3; x4l=.5[x3l,x5l];
 (x,y4r)=whatever[z4l,z5l]; x4r:=max(x,.5[x3r,x4]);
 filldraw stroke z2e..super_arc.e(3,4)...{up}z5e;  % stem and hook
 pickup crisp.nib; pos6(hair,0); pos5'(hair,0);
 x6=x5=x5'; top y6=max(vround .75bar_height,top y5); y5=y5';
 filldraw stroke z5'e--z6e;  % terminal
 pickup tiny.nib;
 sloped_serif.l(2',1,a,1/3,.95jut,serif_drop);  % upper serif
else: 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 fi;
penlabels(1,2,3,4,5,6); endchar;

cmchar "The letter j";   % cm
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar("j",5.5u#,min(asc_height#,10/7x_height#+.5dot_diam#),desc_depth#);
define_whole_blacker_pixels(dot_diam);
italcorr h#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+2stem_shift# if monospace:+\\.5u# fi,
 serif_fit#-2stem_shift# if monospace:-.5u# fi);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
rt x1r=hround(.5w+.25u+.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d;
filldraw stroke z1e--z2e;  % stem
pos3(dot_diam,0); pos4(dot_diam,90);
x3r=x1r; x3:=good.x(x3); top y4r=h+1; 
if bot y4l-top y1<slab: y4l:=min(y4r-eps,y1+tiny+slab); fi
x3=x4; y3=.5[y4l,y4r]; dot(3,4);  % dot
if serifs: sloped_serif.l(1,2,a,1/3,1.1jut,serif_drop);  % upper serif
 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
 x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
 if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi;
 (x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]);
 filldraw stroke z2e{down}...z5e{left};  bulb(5,6,7); % arc and bulb
else: pickup fine.nib; pos2'(stem',0); z2'=z2;
 pos6(.2[vair,stem'],-90); pos7(vair,-90);
 lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo);
 (x,y7l)=whatever[z7r,z3]; x7l:=x;
 z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r;
 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
 filldraw stroke z2'e..{down}z5e & super_arc.e(5,6)
  & z6e{left}..z7e; fi  % arc and terminal
penlabels(1,2,3,4,5,6,7); endchar;

cmchar "Dotless letter j";   % cm
beginchar(oct"032",5.5u#,x_height#,desc_depth#);
italcorr x_height#*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+2stem_shift# if monospace:+.5u# fi,
 serif_fit#-2stem_shift# if monospace:-.5u# fi);
pickup tiny.nib; pos1(stem',0); pos2(stem',0);
rt x1r=hround(.5w+.25u+.5stem'); x1=x2;
top y1=x_height if serifs: +min(oo,serif_drop) fi; bot y2=-1/3d;
filldraw stroke z1e--z2e;  % stem
if serifs: sloped_serif.l(1,2,a,1/3,1.1jut,serif_drop);  % upper serif
 pickup tiny.nib; pos5(vair,-90); pos6(hair,-180); pos7(flare,-180);
 x5=.5[x2,x6r]; bot y5r=-d-oo; y6-.5flare=-.88d;
 if monospace: lft x6r=0 else: z6r=z7r; rt x7l=floor .75u fi;
 (x,y5r)=whatever[z5l,z2l]; x5r:=max(x,.5[x6r,x5]);
 filldraw stroke z2e{down}...z5e{left};  bulb(5,6,7); % arc and bulb
else: pickup fine.nib; pos2'(stem',0); z2'=z2;
 pos6(.2[vair,stem'],-90); pos7(vair,-90);
 lft x7r=hround -.75u; bot y7r=vround 5/6(-d-oo);
 x3r=x1r; top y4r=min(2x_height,h+1);
 (x,y7l)=whatever[z7r,(x1,min(h,asc_height))]; x7l:=x;
 z5r=z2'r; (x2'l,y5l)=whatever[z7l,z5r]; x5l=x2'l; y5=y5r;
 x6r=.5[x7r,x5r]; x6l:=.5[x7l,x5l]; bot y6r=-d-oo;
 filldraw stroke z2'e..{down}z5e & super_arc.e(5,6)
  & term.e(6,7,left,1,4); fi  % arc and terminal
penlabels(1,2,5,6,7); endchar;

endinput;