
  %% capitals.mf
  %% Copyright 2005 Laurie Field
  %
  % This work is LFB, version 1.0.
  %
  % This work may be distributed and/or modified under the
  % conditions of the LaTeX Project Public License, either version 1.3
  % of this license or (at your option) any later version.
  % The latest version of this license is in
  %   http://www.latex-project.org/lppl.txt
  % and version 1.3 or later is part of all distributions of LaTeX
  % version 2003/12/01 or later.
  %
  % This work has the LPPL maintenance status "maintained".
  % 
  % This Current Maintainer of this work is Laurie Field.
  %
  % This work consists of the files:
  %   
  %   example.tex
  %   lfbacc.tex
  %   
  %   accents.mf
  %   alpha.mf
  %   beta.mf
  %   capitals.mf
  %   charmap.mf
  %   delta.mf
  %   epsilon.mf
  %   eta.mf
  %   gamma.mf
  %   iota.mf
  %   kappa.mf
  %   khi.mf
  %   lambda.mf
  %   lfb.mf
  %   lfb5.mf
  %   lfb6.mf
  %   lfb7.mf
  %   lfb8.mf
  %   lfb9.mf
  %   lfb10.mf
  %   lfb11.mf
  %   lfb12.mf
  %   lfbb5.mf
  %   lfbb6.mf
  %   lfbb7.mf
  %   lfbb8.mf
  %   lfbb9.mf
  %   lfbb10.mf
  %   lfbb11.mf
  %   lfbb12.mf
  %   ligature.mf
  %   mu.mf
  %   nu.mf
  %   omega.mf
  %   omikron.mf
  %   others.mf
  %   phi.mf
  %   pi.mf
  %   psi.mf
  %   rho.mf
  %   serifs.mf
  %   sigma.mf
  %   sigmafin.mf
  %   tau.mf
  %   theta.mf
  %   upsilon.mf
  %   xi.mf
  %   zeta.mf
  %   
  % and the derived files:
  %   
  %   lfb5.tfm
  %   lfb6.tfm
  %   lfb7.tfm
  %   lfb8.tfm
  %   lfb9.tfm
  %   lfb10.tfm
  %   lfb11.tfm
  %   lfb12.tfm
  %   lfbb5.tfm
  %   lfbb6.tfm
  %   lfbb7.tfm
  %   lfbb8.tfm
  %   lfbb9.tfm
  %   lfbb10.tfm
  %   lfbb11.tfm
  %   lfbb12.tfm
  %   
  %   lfb5.600pk
  %   lfb6.600pk
  %   lfb7.600pk
  %   lfb8.600pk
  %   lfb9.600pk
  %   lfb10.600pk
  %   lfb11.600pk
  %   lfb12.600pk
  %   lfbb5.600pk
  %   lfbb6.600pk
  %   lfbb7.600pk
  %   lfbb8.600pk
  %   lfbb9.600pk
  %   lfbb10.600pk
  %   lfbb11.600pk
  %   lfbb12.600pk
  %

width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	z1=(1/2[x2,x12], ascender);
	z2=(width-xthick-.5thick, 0);
	z12=(xthick+.5thin, 0);
	singlestem(4,5,6,7,8)(z1, z2, 90-angle(z1-z2), thick, slab, xthick);
	z11=z4l+.5thin*dir(angle(z1-z12)-90); % cheap hack, but close enough
	singlestem(14,15,16,17,18)(z11, z12, 90-angle(z11-z12), thin, slab, xthick);
	
	penpos21(thin, angle(z11-z12));
	penpos22(thin, angle(z1-z2));
	y21=y22;
	z21=whatever[z11,z12];
	z22=4/7[z1,z2];
	penstroke z21e..z22e;
enddef;

beginchar(Alpha, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,11,12,21,22);
endchar;


width#:=9u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((xthick+.5thick,ascender),
		(xthick+.5thick,0), 0, 0, thick, slab, xthick);
	penpos11(slab, 90);
	penpos12(slab, 90);
	penpos13(thick, 0);
	penpos14(slab, -90);
	penpos15(slab, -90);
	penpos16(thick, 180);
	penpos17(slab, 90);
	penpos18(slab, 90);
	x11=x15=x18=x1;
	x12=x14=x17=5u;
	y11r=y12r=ascender;
	y14=y15=.55ascender;
	y17l=y18l=0;
	x13r=width-.5u;
	x16l=width;
	y13=1/2[y11,y15];
	y16=1/2[y15,y18];
	penstroke z11e..z12e{right}..z13e..{left}z14e..z15e;
	penstroke z15e..z14e{right}..z16e..{left}z17e..z18e;
enddef;

beginchar(Beta, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18);
endchar;


width#:=9u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((xthick+.5thick,ascender),
		(xthick+.5thick,0), 0, 0, thick, slab, xthick);
	
	barrightserif(11,12,13,14)
		((x1,ascender),(width,ascender),slab,thin,2u,small);
enddef;

beginchar(Gamma, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,11,12,13,14);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	z1=(1/2[x2,x12], ascender);
	z2=(width-.5thick, 0);
	z12=(.5thin, 0);
	z11=z1l+.5thin*dir(angle(z1-z12)-90); % cheap hack, but close enough
	% penpos's come last because angle needs a known pair at all times
	penpos1(thick, angle(z1-z2)-90); 
	penpos2(thick, 0);
	penpos11(thin, angle(z11-z12)-90);
	penpos12(thin, 0);
	penstroke z1e..z2e;
	penstroke z11e..z12e;
	
	penpos21(slab, angle(z11l-z12l));
	penpos22(slab, angle(z1l-z2l));
	z21l=(0,0); z22l=(width,0);
	penstroke z21e..z22e;
enddef;

beginchar(Delta, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,11,12,21,22);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((xthick+.5thick,ascender),
		(xthick+.5thick,0), 0, 0, thick, slab, xthick);
	
	barrightserif(11,12,13,14)
		((x1,ascender),(width-.5u,ascender),slab,thin,2u,small);
	fill z11r--z13r--(z13r+(0,-slab))--(z11r+(0,-slab))--cycle;
	barleftserif(15,16,17,18)
		((x1,0),(width,0),slab,thin,2.5u,small);
	fill z15r--z17r--(z17r+(0,slab))--(z15r+(0,slab))--cycle;
	
	numeric centreheight;
	centreheight=.52ascender;
	singlestem(19,20,21,22,23)
		((x1,centreheight),(width-2.5u,centreheight), 0, thin, slab, xthick);
enddef;

beginchar(Epsilon, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,22,23);
endchar;


width#:=9u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	numeric topinset;
	topinset=tiny;
	barleftserif(1,2,3,4)
		((width-topinset,ascender),(topinset,ascender),slab,thin,2u,small);
	barleftserif(5,6,7,8)
		((0,0),(width,0),slab,thin,2.5u,small);
	
	z9r=z1l+(0,1);
	z10l=z5l+(0,-1);
	penpos9(thick/sind(angle(z9r-z10l)), 0); % close enough, again
	penpos10(thick/sind(angle(z9r-z10l)), 0);
	penstroke z9e..z10e;
enddef;

beginchar(Zeta, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10);
endchar;


width#:=4xthick#+4thick#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((xthick+.5thick,ascender),
		(xthick+.5thick,0), 0, 0, thick, slab, xthick);
	stem(11,12,13,14,15,16,17,18)((width-xthick-.5thick,ascender),
		(width-xthick-.5thick,0), 0, 0, thick, slab, xthick);
	penpos20(thin, 90);
	penpos21(thin, 90);
	z20=whatever[z1,z2];
	z21=whatever[z11,z12];
	y20=y21=1/2ascender;
	penstroke z20e..z21e;
enddef;

beginchar(Eta, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	penpos1(thick, 0);
	penpos2(thin, 90);
	penpos3(thick, 180);
	penpos4(thin, -90);
	y1=y3=ascender/2;
	x2=x4=width/2;
	x1l=0; x3l=width;
	y2l=0; y4l=ascender;
	penstroke z1e..z2e..z3e..z4e..cycle;
	
	stem(5,6,7,8,9,10,11,12)((3u,1/2ascender),(width-3u,1/2ascender),
		0, 0, thick, slab, xthick);
enddef;

beginchar(Theta, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
endchar;


width#:=2xthick#+1thick#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((1/2width,ascender),(1/2width,0),
		0, 0, thick, slab, xthick);
enddef;

beginchar(Iota, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10);
endchar;


width#:=12u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((xthick+.5thick,ascender),
		(xthick+.5thick,0), 0, 0, thick, slab, xthick);
	
	z9=3/7[z8,z5];
	z10=(width-thin-xthick-.5thin, ascender);
	singlestem(11,12,13,14,15)(z9, z10, 90-angle(z10-z9), thin, slab, xthick);
	
	z19=whatever[z9,z10];
	z19=z20+whatever*(dir(angle(z10-z9)+90));
	z20=(width-xthick-.5thick, 0);
	singlestem(21,22,23,24,25)(z19, z20, 90-angle(z19-z20), thick, slab, xthick);
enddef;

beginchar(Kappa, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,21,22,23,24,25);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	z1=(1/2[x2,x12], ascender);
	z2=(width-xthick-.5thick, 0);
	z12=(xthick+.5thin, 0);
	singlestem(4,5,6,7,8)(z1, z2, 90-angle(z1-z2), thick, slab, xthick);
	z11=z4l+.5thin*dir(angle(z1-z12)-90); % cheap hack, but close enough
	singlestem(14,15,16,17,18)(z11, z12, 90-angle(z11-z12), thin, slab, xthick);
enddef;

beginchar(Lambda, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,11,12);
endchar;


width#:=4xthick#+5thick#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	oneandlefthalfstem(1,2,3,4,5,6,7,8)((xthick+.5thin,ascender),
		(xthick+.5thin,0), 0, 0, thin, slab, xthick);
	oneandrighthalfstem(11,12,13,14,15,16,17,18)((width-xthick-.5thick,ascender),
		(width-xthick-.5thick,0), 0, 0, thick, slab, xthick);
	
	z20l=z4r-(thin,0);
	z21l=1/2[z7l,z16l]+(0,thin);
	numeric topwidth;
	topwidth*cosd(angle(z20l-z21l)-90)=thick; % close enough
	
	z22l=z13r;
	z23l=z21l;
	numeric topwidthright;
	topwidthright*cosd(angle(z22l-z23l)-90)=thin; % again, close enough
	penpos22(topwidthright, 0);
	penpos23(topwidthright, 0);
	penstroke z22e..z23e;
	
	penpos20(topwidth, 0);
	penpos21(whatever, angle(z22r-z23l));
	z20r-z21r=whatever*(z20l-z21l);
	penstroke z20e..z21e;
enddef;

beginchar(Mu, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23);
endchar;


width#:=4xthick#+4thick#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	oneandlefthalfstem(1,2,3,4,5,6,7,8)((xthick+.5thin,ascender),
		(xthick+.5thin,0), 0, 0, thin, slab, xthick);
	singlestem(11,12,13,14,15)((width-xthick-.5thin,0),
		(width-xthick-.5thin,ascender), 0, thin, slab, xthick);
	z20=z4r;
	z21l=z11r;
	numeric topwidth;
	topwidth*cosd(angle(z20-z21l)-90)=thick; % again, close enough
	penpos20(topwidth, 0);
	penpos21(whatever, 90);
	z20r-z21r=whatever*(z20l-z21l);
	penstroke z20e..z21e;
enddef;

beginchar(Nu, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20,21);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	numeric topinset;
	topinset=.5u;
	barleftserif(1,2,3,4)
		((.5width,ascender),(topinset,ascender),medthick,thin,1.5u,small);
	barrightserif(5,6,7,8)
		((.5width,ascender),(width-topinset,ascender),medthick,thin,1.5u,small);
	fill z3r--z7r--(z7r+(0,-medthick-1))--(z3r+(0,-medthick-1))--cycle;
	
	barleftserif(11,12,13,14)
		((.5width,0),(width,0),medthick,thin,2u,small);
	barrightserif(15,16,17,18)
		((.5width,0),(0,0),medthick,thin,2u,small);
	fill z13r--z17r--(z17r+(0,medthick+1))--(z13r+(0,medthick+1))--cycle;
	
	stem(21,22,23,24,25,26,27,28)((2u,.52ascender),(width-2u,.52ascender),
		0, 0, thick, slab, xthick);
enddef;

beginchar(Xi, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,21,22,23,24,25,26,27,28);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	penpos1(thick, 0);
	penpos2(thin, 90);
	penpos3(thick, 180);
	penpos4(thin, -90);
	y1=y3=ascender/2;
	x2=x4=width/2;
	x1l=0; x3l=width;
	y2l=0; y4l=ascender;
	penstroke z1e..z2e..z3e..z4e..cycle;
enddef;

beginchar(Omikron, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4);
endchar;


width#:=4xthick#+4thick#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((xthick+.5thick,ascender),
		(xthick+.5thick,0), 0, 0, thick, slab, xthick);
	stem(11,12,13,14,15,16,17,18)((width-xthick-.5thick,ascender),
		(width-xthick-.5thick,0), 0, 0, thick, slab, xthick);
	penpos20(slab, 90);
	penpos21(slab, 90);
	z20r=z3r; z21r=z14r;
	penstroke z20e..z21e;
enddef;

beginchar(Pi, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22);
endchar;


width#:=9u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((xthick+.5thick,ascender),
		(xthick+.5thick,0), 0, 0, thick, slab, xthick);
	penpos11(slab, 90);
	penpos12(slab, 90);
	penpos13(thick, 0);
	penpos14(slab, -90);
	penpos15(slab, -90);
	x11=x15=x1;
	x12=x14=5u;
	y11r=y12r=ascender;
	y14=y15=1/2ascender;
	x13r=width;
	y13=1/2[y11,y15];
	penstroke z11e..z12e{right}..z13e..{left}z14e..z15e;
enddef;

beginchar(Rho, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	barrightserif(1,2,3,4)
		((0,ascender),(width-.5u,ascender),slab,thin,2u,small);
	
	z9l=z1l;
	z10=(.5width,.55ascender);
	penpos9(thick/sind(angle(z9l-z10)-90), 0);
	penpos10(thick/sind(angle(z9l-z10)-angle(z10)), angle(z10));
	penstroke z9e..z10e;
	
	z11l=z10r;
	z12l=(0,0);
	penpos11(thin/sind(angle(z9l-z10)-angle(z10)), angle(z9l-z10)-180);
	penpos12(thin/sind(angle(z10)), 0);
	penstroke z11e..z12e;
	
	barleftserif(5,6,7,8)
		((x12r+thick*sind(90-angle(z10))/sind(angle(z10)),0),
		(width,0),thick,thin,2u,small);
	fill z12l--z5l--z5r--cycle;
enddef;

beginchar(Sigma, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	stem(1,2,3,4,5,6,7,8)((.5width,ascender),
		(.5width,0), 0, 0, thick, slab, xthick);
	
	barrightserif(11,12,13,14)
		((x1,ascender),(width,ascender),slab,thin,2u,small);
	barleftserif(15,16,17,18)
		((x1,ascender),(0,ascender),slab,thin,2u,small);
enddef;

beginchar(Tau, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
endchar;


width#:=8u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	singlestem(1,2,3,4,5)((.5width,.5ascender),
		(.5width,0), 0, thick, slab, xthick);
	
	penpos6(medthin, 0);
	z6l=(0,ascender);
	penstroke z6e..{down}z1e;
	
	numeric diameter;
	diameter=1.5u;
	penpos7(thin, -90);
	y9=y7r=ascender-1/2diameter;
	x7=width-diameter;
	y8=ascender;
	x8=x10=width-.5diameter;
	x9=width;
	y10=ascender-diameter;
	
	fill z1{up}..tension 1.3..z7l..z8..z9..z10..z7r & z7r..{down}z1r--cycle;
enddef;

beginchar(Upsilon, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	penpos1(thick, 0);
	penpos2(thin, 90);
	penpos3(thick, 180);
	penpos4(thin, -90);
	y1=y3=ascender/2;
	x2=x4=width/2;
	x1l=0; x3l=width;
	y2l=ascender-y4l=2u;
	penstroke z1e..z2e..z3e..z4e..cycle;
	
	stem(11,12,13,14,15,16,17,18)((1/2width,ascender),(1/2width,0),
		0, 0, thick, slab, xthick);
enddef;

beginchar(Phi, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,11,12,13,14,15,16,17,18);
endchar;


width#:=4xthick#+4thick#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	z20=(thin+xthick+.5thick,ascender);
	z21=(width-xthick-.5thick,0);
	z22=(width-thin-.5thin-xthick,ascender);
	z23=(.5thin+xthick,0);
	stem(1,2,3,4,5,6,7,8)(z20, z21,
		90-angle(z20-z21), 90-angle(z20-z21), thick, slab, xthick);
	stem(11,12,13,14,15,16,17,18)(z22, z23,
		90-angle(z22-z23), 90-angle(z22-z23), thin, slab, xthick);
	penpos20(thin, 90);
	penpos21(thin, 90);
enddef;

beginchar(Khi, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19);
endchar;


width#:=10u#;
extra#:=3letterspace#;
define_pixels(width, extra);

def gen_letter =
	penpos1(medium, 225);
	penpos2(medthin, 90);
	penpos3(thick, 0);
	penpos4(thick, 0);
	penpos5(thin, 90);
	penpos6(thin, 135);
	penpos7(thick, 180);
	penpos8(tiny, 180);
	
	offset=1/2(ascender-x_height);
	y2r=x_height-tiny+offset;
	y1l=y2l-thick;
	y3=y2l-thin;
	y4=y3-2u;
	y5l=0+offset;
	y7=1/2(y8-offset)+offset;
	y8=x_height+offset;
	x1r=0;
	x2=x1+medium;
	x4l=x3l=x2+thin;
	x5=(x3r+width)/2;
	x7r=width;
	x8r=x7r-thin;
	
	fill z1l..tension 1.8..z2l..z3l---z4l..z5l..z7l..z8l
		--z8r..z7r..z5r..z4r---z3r..z2r..tension 1.5..z1r--cycle;
	
	stem(11,12,13,14,15,16,17,18)((x5-.1u,ascender),(x5-.1u,0),
		0, 0, thick, slab, xthick);
enddef;

beginchar(Psi, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18);
endchar;


width#:=10u#;
extra#:=2letterspace#;
define_pixels(width, extra);

def gen_letter =
	barleftserif(1,2,3,4)
		((.6width,0),(width,0),thick,thin,2u,small);
	barrightserif(5,6,7,8)
		((.4width,0),(0,0),thick,thin,2u,small);
	
	penpos9(thin, 0);
	penpos10(thin, 0);
	penpos11(thin, 0);
	penpos12(thin, 0);
	z9=z5r; z11=z1r;
	z10-z9=z12-z11=(0, 2thick);
	penstroke z9e..z10e;
	penstroke z11e..z12e;
	
	penpos13(thin, 90);
	penpos14(thick, 0);
	penpos15(thin, -90);
	penpos16(thick, 180);
	penpos17(thin, 90);
	z13r=z10r; z17r=z12l;
	z15l=(.5width, ascender);
	y14=y16=.5[y13l,y15l];
	x14l=0; x16l=width;
	penstroke z13e..{up}z14e..z15e..z16e{down}..z17e;
enddef;

beginchar(Omega, width#+extra#, ascender#, 0);
gen_letter; penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17);
endchar;
