% This is  LOWERN.MF
% Version 1.0a 
% Date 8-SEP-1991
% 
% (c) 1991 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:
%
% n
%
% And the following on demand, i. e. if their code is known:
%
% n_tilde, n_acute, n_dot, n_uline, enj, eng
%
% Higher versions of this file might include more characters.

cmchar "The letter n";
beginchar("n",10u#,x_height#,0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut); % lower left serif
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
picture savedpicture;
savedpicture:=currentpicture;
penlabels(1,2,3,4); endchar;

iff known n_dot:
cmchar "The letter n with dot";
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
beginchar(n_dot,10u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
define_whole_blacker_pixels(dot_diam);
currentpicture:=savedpicture;
pickup tiny.nib;
pos88(dot_diam,0); pos99(dot_diam,90);
x88=x99=good.x(.5w); top y99r=h+1;
if bot y99l-x_height+oo<slab: y99l:=min(y99r-eps,x_height+oo+tiny+slab);fi
y88=.5[y99l,y99r]; dot(88,99);  % dot
penlabels(88,99);endchar;    

iff known n_uline:
cmchar "The letter n with bar below";
beginchar(n_uline,10u#,x_height#,0.875desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
currentpicture:=savedpicture;
numeric macron_breadth; macron_breadth:=Vround .2[vair,stem];
pickup if serifs: crisp.nib else: fine.nib fi;
pos91(macron_breadth,90); pos92(macron_breadth,90);
bot y91l=bot y92l=-d-o; lft x91=w-rt x92=hround 1.25u;
filldraw stroke z91e--z92e;  % bar
penlabels(91,92); endchar;

iff known n_tilde:
cmchar "The letter n with tilde";
beginchar(n_tilde,10u#,.75[x_height#,min(asc_height#,2x_height#)],0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
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;
 lft x1r=hround(1/6w);rt x4l=hround(5/6w); 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);
 lft x1r=hround(1/6w);rt x5l=hround(5/6w); 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 n_acute:
cmchar "The letter n with acute";
beginchar(n_acute,10u#,.75[x_height#,min(asc_height#,2x_height#)],0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
currentpicture:=savedpicture;
if serifs: pickup crisp.nib; x1=hround(.5w+2.5u-.5stem); 
  x2=hround(.5w-5/6u);
 y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
 numeric theta; theta=angle(z2-z1)+90;
 pos1(stem,theta); pos2(hair,theta);
 filldraw circ_stroke z1e--z2e;  % diagonal
else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
 rt x1r=hround(.5w+3u); lft x2l=hround(.5w-.25u-.5vair);
 top y1=h; bot y2=vround 2/3[h,x_height];
 filldraw stroke z1e--z2e; fi  % diagonal
penlabels(1,2); endchar;

savedpicture:=nullpicture;

iff known enj:
cmchar "The letter enj";                  % from wsuipa
beginchar(enj,12.5u#,x_height#,desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(3.4u-.35stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h+min(oo,serif_drop); bot y2=-.2d; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(4,3,e,1/3,inner_jut,f,1/3,jut); fi % lower right serif
%tail
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
define_whole_blacker_pixels(dot_diam);
 pickup tiny.nib; pos15(vair,-90); pos16(hair,-180);
 pos17(flare,-180);
 rt x17=u;
 x15=.5[x2,x16r]; bot y15r=-d+oo; y16-.5flare=-.85d;
 z16r=z17r;
 (x,y15r)=whatever[z15l,z2l]; x15r:=max(x,.5[x16r,x15]);
 filldraw stroke z2e{down}...pulled_super_arc.e(2,15)(.4superpull);
  bulb(15,16,17); % arc and bulb
penlabels(1,2,3,4,15,16,17); endchar;

iff known eng:
cmchar "The letter eng";                    % from wsuipa
beginchar(eng,10.2u#,x_height#,1.1desc_depth#);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
numeric shaved_stem; shaved_stem=hround(stem-2stem_corr);
pos1'(shaved_stem,0); pos2'(shaved_stem,0); pos3(stem,0);
lft x1l=hround(2.5u-.5stem); x1l=x1'l=x2l=x2'l; x3=w-x1;
top y1=h+min(oo,serif_drop); bot y2=0; y1=y1'; y2=y2';
filldraw stroke z1'e--z2'e;  % left stem
h_stroke(2,a,3,4);  % arch and right stem
if serifs: sloped_serif.l(1',2',b,1/3,jut,serif_drop); % upper left serif
 numeric inner_jut; pickup tiny.nib;
 if rt x2r+jut+.5u+1<=lft x4l-jut: inner_jut=jut;
 else: rt x2r+jut+.5u+1=lft x4l-inner_jut; fi
 dish_serif(2,1,c,1/3,jut,d,1/3,jut);fi % lower left serif
%tail
numeric dot_diam#; dot_diam#=max(dot_size#,cap_curve#);
define_whole_blacker_pixels(dot_diam);
 pickup tiny.nib; pos15(vair,-90); pos16(hair,-180); pos17(flare,-180);
 x15=.5[x4,x16r]; bot y15r=-d+oo; y16-.5flare=-.85d;
 z16r=z17r; rt x17r=x2r;
 (x,y15r)=whatever[z15l,z4l]; x15r:=max(x,.5[x16r,x15]);
 filldraw stroke z4e{down}...pulled_super_arc.e(4,15)(.4superpull);
  bulb(15,16,17); % arc and bulb
penlabels(1,2,3,4,15,16,17); endchar;


endinput;