%frank_ruehl.mf
%This is an attempt to mimic the widespread Frank-Ruehl font.
%[Hebrew pronunciation: Frank-Ruehl rhymes with "sunk wheel"].
%
%shinwidth# =6.25pt#; height# =6pt#; em#  = 10pt#;
shinwidth# =6pt#; height# = 5.76pt#; em#  = 10pt#;
%shinwidth# =5.225pt#; height# =5pt#; em#  = 10pt#;
depth# = .225height#;
digitheight# := 1.1*height#;
ver# = height#/40;
hor# =  ver#;
side# = height#/20;
penwidth# =  1.0hor#; serifpenwidth# =  2hor#;
serifheight# =  3.5hor#;


define_pixels(shin,height,depth,digitheight);
define_pixels(thick,ver,hor,side);
define_blacker_pixels(penwidth,serifpenwidth,serifheight);
pen serifpen, softpen;
serifpen = pencircle scaled serifpenwidth;
softpen = pencircle scaled penwidth;
alpha = angle(1,3);

%serif.mf
string normal, thin, sharp, wide;	%different kinds of serif, e.g.:
normal:= "normal";
thin:=	"thin";	
sharp:=	"sharp";	
wide:=	"wide";	
pen previous_pen;			%to keep the previous data.
pair previous_pen_top, previous_pen_bot;%to keep the previous data.

def serif (expr kind)(suffix $,i,j)(expr serifheight)=
previous_pen := currentpen;
previous_pen_top := (0,pen_top);
previous_pen_bot := (0,pen_bot);
thickness :=  length(z$r - z$l);
serifhor := thickness/10.4;
serifver := thickness/10.4;
seriftilt := angle(z$r - z$l) - 90;
serifdistance :=		%the "horizontal" distance of the top
				%from the given point $.
if	kind = normal:	3.3serifhor
elseif	kind = thin:	1.2serifhor
elseif	kind = sharp:	1.2serifhor
elseif	kind = wide:	3.3serifhor
else:			wrongkind
fi;
serifwidth :=
if	kind = normal:	2.2serifhor
elseif	kind = thin:	2.2serifhor
elseif	kind = sharp:	1.8serifhor
elseif	kind = wide:	2.2serifhor
else:			wrongkind
fi;

pickup serifpen;
top z$t = z$r + (-serifdistance, serifheight) rotated seriftilt;
lft z$d = z$  + (-(serifwidth+serifdistance), .5serifheight)
				rotated seriftilt;
top z$b = z$r + previous_pen_top;
bot z$g = z$l + previous_pen_bot;
x$a = 
	if x$t+ 1.0serifheight <	x$r: x$r;
	else:				x$t+ 1.0serifheight;
	fi
top z$a =
whatever[z$r + previous_pen_top,z.i + previous_pen_top];

filldraw
z$g{z$l-z.j}
if	kind = normal:
..z$d{dir (90 + seriftilt)}..
{dir seriftilt}z$t..z$t{dir (-85 + seriftilt)}
..{dir seriftilt}z$a--cycle;
elseif	kind = thin:
..tension 1 and 1.5 ..z$d
{dir (90 + seriftilt)}..{dir (60 + seriftilt)}z$t..
z$t{dir (-85 + seriftilt)}..tension .8
..{dir seriftilt}z$a--cycle;
elseif	kind = sharp:
..tension 1.7 ..z$d
{dir (90 + seriftilt)}..{dir (60 + seriftilt)}z$t..
z$t{dir (-80 + seriftilt)}..tension .8
..{dir seriftilt}z$a--cycle;
elseif	kind = wide:
..z$d{dir (90 + seriftilt)}..
{dir seriftilt}z$t..z$t{dir (-85 + seriftilt)}
..{dir seriftilt}z$a--cycle;
else:			wrongkind
fi;
labels($,$t,$d);
labels($g,$a,$b);
pickup previous_pen
enddef;


%coding.mf
%hebcodebegin := 224;	%for newcode
%hebcodebegin := 128;	%for pccode
string charname;

def Charcode (expr charname) =
    if charname = "aleph" :	hebcodebegin + 0
elseif charname = "beth" :	hebcodebegin + 1
elseif charname = "guimel" :	hebcodebegin + 2
elseif charname = "daleth" :	hebcodebegin + 3
elseif charname = "hei" :	hebcodebegin + 4
elseif charname = "vav" :	hebcodebegin + 5
elseif charname = "zain" :	hebcodebegin + 6
elseif charname = "heth" :	hebcodebegin + 7
elseif charname = "teth" :	hebcodebegin + 8
elseif charname = "yod" :	hebcodebegin + 9
elseif charname = "kaffinal" :	hebcodebegin + 10
elseif charname = "kaf" :	hebcodebegin + 11
elseif charname = "lamed" :	hebcodebegin + 12
elseif charname = "memfinal" :	hebcodebegin + 13
elseif charname = "mem" :	hebcodebegin + 14
elseif charname = "nunfinal" :	hebcodebegin + 15
elseif charname = "nun" :	hebcodebegin + 16
elseif charname = "samech" :	hebcodebegin + 17
elseif charname = "ain" :	hebcodebegin + 18
elseif charname = "pefinal" :	hebcodebegin + 19
elseif charname = "pe" :	hebcodebegin + 20
elseif charname = "zadikfinal" :hebcodebegin + 21
elseif charname = "zadik" :	hebcodebegin + 22
elseif charname = "kof" :	hebcodebegin + 23
elseif charname = "resh" :	hebcodebegin + 24
elseif charname = "shin" :	hebcodebegin + 25
elseif charname = "tav" :	hebcodebegin + 26
elseif charname = "exclamation_mark" :	33
elseif charname = "percent" :		37
elseif charname = "left_parenthesis" :	40
elseif charname = "right_parenthesis" :	41
elseif charname = "makafgadol" :	45
elseif charname = "period" :		46
elseif charname = "slash" :		47
elseif charname = "colon" :		58
elseif charname = "=" :			61
elseif charname = "+" :			43
elseif charname = "question_mark" :	63
elseif charname = "zero" :	48
elseif charname = "one" :	49
elseif charname = "two" :	50
elseif charname = "three" :	51
elseif charname = "four" :	52
elseif charname = "five" :	53
elseif charname = "six" :	54
elseif charname = "seven" :	55
elseif charname = "eight" :	56
elseif charname = "nine" :	57
elseif charname = "backslash" :		108
else:				charname
;
fi
enddef;

def ymybeginchar (expr charname)(text myarguments) = %does not work
hide(iii := 0; myarg[2] := 0;
for blab = myarguments: myarg[incr iii] := blab; endfor
net_width := myarg[1];
net_depth := myarg[2])
beginchar(Charcode(charname), net_width*shinwidth# + 2side#, height#, net_depth*shinwidth#); 
leftend := round(side);
rightend := round(w - side);
if proofing > 0: lattice(height/34.8, height/34.8); fi	%remove this line!
pickup softpen;
enddef;


def mybegingenchar (expr charcode,net_width,sharp_height,sharp_depth) =
beginchar(charcode, net_width*shinwidth# + 2side#,sharp_height,sharp_depth); 
leftend := round(side);
rightend := round(w - side);
if proofing > 0: lattice(height/34.8, height/34.8); fi	%remove this line!
pickup softpen;
enddef;


def mybeginextrchar (expr charname,net_width,sharp_height,sharp_depth) =
beginchar(Charcode(charname), net_width*shinwidth# + 2side#,sharp_height,sharp_depth); 
leftend := round(side);
rightend := round(w - side);
if proofing > 0: lattice(height/34.8, height/34.8); fi	%remove this line!
pickup softpen;
enddef;


def mybeginchar (expr charname, net_width) =
beginchar(Charcode(charname), net_width*shinwidth# + 2side#,height#,0); 
charname;
leftend := round(side);
rightend := round(w - side);
if proofing > 0: lattice(height/34.8, height/34.8); fi	%remove this line!
pickup softpen;
enddef;

def digitbeginchar (expr charname, net_width) =
beginchar(Charcode(charname), net_width*shinwidth# + 2side#,digitheight#,0); 
charname;
leftend := round(side);
rightend := round(w - side);
if proofing > 0: lattice(height/30, height/30); fi	%remove this line!
pickup softpen;
enddef;


def six_and_nine =
penpos1(.412thick,90); 
penpos2(7hor,0); 
penpos3(.412thick,-90); 
penpos4(6.5hor,180); 
penpos0(7.5hor,180); 
penpos5(6.5hor,180); 
penpos6(2.5hor,135); 

pair middlepoint;	middlepoint = .5(leftend + rightend, h);
mid := .65h;

x1 = .5[leftend,rightend] + 1hor;	top y1r = mid;
x3 = .5[leftend,rightend] + 2hor;	bot y3r = 0;
y2 = .5mid;
lft x0r = leftend; rt x2r = rightend;
y5 = y1r + 3ver; x5l = x0l + 3hor;
x4l = x0l + 2hor;
y4 = 7ver;
x6r = rightend - 8hor;	top y6r = h;
y0 = .5[y4,y5];

path the_six;
the_six =
z0l..z1r{right}..z2r{down}..z3r{left}..z4r..z0r{up}..z5r..z6r..z6r--
z6l..z6l..z5l...z0l{down}...z4l..z3l{right}..z2l{up}..z1l{left}..
{down}z0l--cycle
enddef;

%CHARACTERS:

beginchar(32, 0.429shinwidth#,height#,0); "space";
;
endchar;


mybeginchar("exclamation_mark",0.45);

%the period:
x1 =  x3 - .25hor;		top y1 = thick; 
rt x2 = rightend - 6hor;		y2 = y4 + .5ver;
x3 = .5[x4,x2];			bot y3 = 0;
lft x4 = rt x2 - 8hor;	y4 = .5[y1,y3];

filldraw
z1--z2--z3--z4--cycle;

%the bar:
penpos7(2serifheight,0);
x6 = x7 = x8 = x1;
top y6 = h + serifheight;
top y7 = h;
bot z8 = top z1 + (0, 2ver);

filldraw
z8..tension 5 ..z7l..z6..z7r..tension 5 ..z8..cycle;
penlabels(1,2,3,4,5,6,7,8);
endchar;


mybegingenchar(34,0.52, 1.18height#,0); "doublequote";
penpos1(6.3hor, 0);
penpos2(3.3hor, 0);
lft x1l = leftend + 5.5hor; top y1 = height + 6ver;
lft x2l = leftend;  y2 = height - thick;

filldraw
z2l..{up}z1l..tension 4 ..z1r{down}..z2r..z2r..z2l..cycle;

penpos3(6.3hor, 0);
penpos4(3.3hor, 0);

x3l - x1l = x4l - x2l;
lft x3l - rt x1r = 2hor;
y3 = y1;	y4 = y2;

filldraw
z4l..{up}z3l..tension 4 ..z3r{down}..z4r..z4r..z4l..cycle;
penlabels(1,2,4,3);
endchar;


mybeginchar("percent",.94);
penpos1(.3thick,135); 
penpos2(2.5hor,-40); 
penpos3(.24thick,-120); 
penpos4(5hor,150); 


x1r = leftend + 10hor;		top y1r = h;
x3r = leftend + 7hor;		bot y3r = .5h - ver;
y2l = .75h + 3ver;
y4 = .75h - 3ver;
lft x4r = leftend;
rt x2r = leftend + 18hor;

filldraw z1r{right}..tension .9 ..z2r{down}..z3r{left}..z4r{up}..cycle;
unfill z1l{right}..z2l{down}..z3l{left}..z4l{up}..cycle;


addto currentpicture also currentpicture
	shifted (rightend - rt x2r, - bot y3r);

penpos5(penwidth + 2hor,0);
penpos6(penwidth + 2hor,0);
rt x5r = rightend - 7hor;		top y5r = h;
lft x6l = leftend + 6hor;		bot y6l =  -ver;
slope := 20;
filldraw
z1r{dir -slope}..{dir slope}z5l--
z5r{dir (180 + slope)}..{dir (180 -slope)}z1--cycle;
penstroke z5e--z6e;
penlabels(0,1,2,3,4,5,6,7,8);
endchar;

mybegingenchar(39,0.3, 1.18height#,0); "quote";
penpos1(6.3hor, 0);
penpos2(3.3hor, 0);
lft x1l = leftend + 5.5hor; top y1 = height + 6ver;
lft x2l = leftend;  y2 = height - thick;

filldraw
z2l..{up}z1l..tension 4 ..z1r{down}..z2r..z2r..z2l..cycle;
penlabels(1,2,3);
endchar;

mybeginchar("left_parenthesis",.2);
penpos1(.5hor,0); 
penpos2(.26thick,0); 
penpos3(.5hor,0); 

protrusion := 4ver;
rt x1r = rt x3r = rightend;
top y1 = h + protrusion;
bot y3 = -protrusion;
lft x2l = leftend;		y2 = .5[y1,y3];

filldraw z1l{(z2l - z1l) xscaled 3}...z2l
...{(z3l - z2l) xscaled 3}z3l
--z3r{(z2r - z3r) xscaled 3}...z2r
...{(z1r - z2r) xscaled 3}z1r--cycle;
penlabels(1,2,3);
endchar;

mybeginchar("right_parenthesis",.2);
penpos1(.5hor,0); 
penpos2(.26thick,0); 
penpos3(.5hor,0); 

protrusion := 4ver;
lft x1l = lft x3l = leftend;
top y1 = h + protrusion;
bot y3 = -protrusion;
rt x2r = rightend;		y2 = .5[y1,y3];

filldraw z1l{(z2l - z1l) xscaled 3}...z2l
...{(z3l - z2l) xscaled 3}z3l
--z3r{(z2r - z3r) xscaled 3}...z2r
...{(z1r - z2r) xscaled 3}z1r--cycle;
penlabels(1,2,3);
endchar;


mybeginchar("+",0.6);
barwidth := .515thick;
penpos1(barwidth,90);
penpos2(barwidth,90);
penpos3(barwidth, 0);
penpos4(barwidth, 0);
lft x1 = leftend;
rt x2 = rightend;
bot y1l = bot y2l = 12.5ver;
x3 = x4;	y3 - y4 = x2 - x1;
.5[z1,z2] = .5[z3,z4]; 
filldraw
z1r--z2r--z2l--z1l--cycle;
filldraw
z3r--z4r--z4l--z3l--cycle;
penlabels(1,2,3,4);
endchar;


mybegingenchar(44,0.2986,height#,.255height#); "comma";
x1 =  x3 - .5hor;		top y1 = 1.65thick; 
rt x2 = rightend;		y2 = y4 + .5ver;
x3 = .5[x4,x2];			bot y3 = 0;
lft x4 = rightend - 12.5hor;	y4 = .5[y1,y3];

penpos5(.3hor, -20);
lft x5l = leftend; bot y5r = -d;
z6 = .2[z3,z4];
filldraw
z1--z2{dir -110}..z5r..z5r--z5l..z5l..tension infinity and 2
..{z4-z3}z6--z4--cycle;
penlabels(1,2,3,4,5,6);
endchar;

mybegingenchar(130,0.5, height#,.6*height#); "patach";
penpos1(5ver,90);
penpos2(5ver,90);
lft x1 = leftend;
rt x2 = rightend;
bot y1l = bot y2l = - d;

filldraw
z1r--z2r--z2l--z1l--cycle;
penlabels(1,2);
endchar;

mybegingenchar(131,0.3,height#,.6*height#); "chirik";
penpos1(5ver,90);
x1 = .5[leftend,rightend];
bot y1l = - d;
filldraw z1l..z1r..cycle;
penlabels(1,2);
endchar;

mybegingenchar(132,0.3,height#,.8height#); "shwa";
penpos1(5ver,90);
penpos2(5ver,90);
x1= x2 = .5[leftend,rightend];
bot y1l = - d;
bot y2l = top y1r +3ver;
filldraw z1l..z1r..cycle;
filldraw z2l..z2r..cycle;
penlabels(1,2);
endchar;

mybegingenchar(133,0.4,height#,height#); "kubutz";
penpos1(5ver,90);
penpos2(5ver,90);
penpos3(5ver,90);
bot y1l = - d;
bot y2l = top y1r +2ver;
bot y3l = top y2r +2ver;
x2= .5[leftend,rightend];
kubutzdist := .8(y2 - y1);
x1- x2 = x2 - x3 = kubutzdist;
filldraw z1l..z1r..cycle;
filldraw z2l..z2r..cycle;
filldraw z3l..z3r..cycle;
penlabels(1,2,3);
endchar;

mybegingenchar(134,0.3,height#,.6height#); "tzere";
penpos1(5ver,90);
penpos2(5ver,90);
.5[x1,x2] = .5[leftend,rightend];
x2 - x1 = 10hor;
bot y1l = bot y2l = - d;
filldraw z1l..z1r..cycle;
filldraw z2l..z2r..cycle;
penlabels(1,2);
endchar;

mybegingenchar(135,0.72,height#,0); "dagesh";
penpos1(5ver,90);
x1 = .5[leftend,rightend];
y1 = .5h;
filldraw z1l..z1r..cycle;
penlabels(1,2);
endchar;

mybeginchar("makafgadol",0.7592);
%not the correct makaf in the font, but appropriate to combine
%letters with numbers.
penpos1(.515thick,90);
penpos2(.515thick,90);
lft x1 = leftend;
rt x2 = rightend;
bot y1l = bot y2l = thick + 2.7ver;

filldraw
z1r--z2r--z2l--z1l--cycle;
penlabels(1,2);
endchar;


mybeginchar("period",0.2986);
x1 =  x3 - .5hor;		top y1 = 1.65thick; 
rt x2 = rightend;		y2 = y4 + .5ver;
x3 = .5[x4,x2];			bot y3 = 0;
lft x4 = rt x2 - 12.5hor;	y4 = .5[y1,y3];

filldraw
z1--z2--z3--z4--cycle;
penlabels(1,2,3,4);
endchar;

mybeginchar("slash",0.75);
penpos1(penwidth + .206thick,0);
penpos2(penwidth + .206thick,0);
rt x1r = rightend;	y1 = h + 3ver;
lft x2l =  leftend;	y2 = 0;
penstroke z1e--z2e;

penlabels(1,2,3,4);
endchar;

mybeginchar("backslash",0.75);
penpos1(penwidth + .206thick,0);
penpos2(penwidth + .206thick,0);
lft x1l =  leftend;	y1 = h + 3ver;
rt x2r = rightend;	y2 = 0;
penstroke z1e--z2e;

penlabels(1,2,3,4);
endchar;

digitbeginchar("zero",0.68);
penpos1(.41thick,90); 
penpos2(8hor,0); 
penpos3(.41thick,-90); 
penpos4(8hor,180); 


x1 = x3 = .5[leftend,rightend]; top y1r = h;  bot y3r = 0;
y2 = y4 = .5h;
lft x4r = leftend; rt x2r = rightend;

filldraw z1r...z2r...z3r...z4r...cycle;
unfill z1l...z2l...z3l...z4l...cycle;
filldraw
z1r{right}...z2r...{left}z3r--z3l{right}...z2l...{left}z1l--cycle;
filldraw
z3r{left}...z4r...{right}z1r--z1l{left}...z4l...{right}z3l--cycle;
penlabels(1,2,3,4,5,6,7,8);
endchar;

digitbeginchar("one",.425); 
strong = 7.0hor;
footwidth = 3.25ver;
penpos0(2.0hor,-90); 
penpos1(.8strong,0); 
penpos3(strong,0); 
penpos4(strong + 2footwidth,0); 
penpos5(strong + 2footwidth,0); 

lft x0 = leftend;
rt x4r = rt x5r = rightend;
rt x1r = rt x3r = rt x4r - footwidth;
top y1 = h;
y2 = top y1  - 9ver;
y0r = y2 - ver;
bot y5 = 0;
y4 = 3ver;
y3 = y4 + ver;
x2 = x3l;


filldraw
z0l{dir 30}..{dir 60}z1l--z1r--z3r--z4r--z5r--
z5l--z4l--z3l--z2--z0r--cycle;
penlabels(0,1,2,3,4,5,6,7,8);
endchar;

digitbeginchar("two",.65);
penpos0(2.0hor,150); 
penpos1(.515thick,60); 
penpos2(7hor,0); 
penpos6(2hor,180); 

lft x0r = leftend;
y0l = height - 7ver;
top y1r = h;
x1r = .5[leftend,rightend];
rt x2r = rightend - 3hor; y2r = height - 8ver;
lft x3l = leftend; y3l = .515thick;
rt x3r = x3l + 4.5hor; y3r = .722thick;
x4 = x3l; bot y4 = 0;
x5l = rightend - 6hor;		bot y5l = 0;
x5r =  rightend - 8hor;		y5r = y3r;
rt x6l = rightend;		top y6 = thick;

filldraw z0r{dir 55}..z1r{right}..z2r{down}..{dir (180 + 40)}z3r
--z5r---z6r--z6l--z5l--z4--
z3l{dir (40 + eps)}..{up}z2l..{left}z1l ..{dir (180 + 55)}z0l--cycle;
penlabels(0,9,1,2,3,4,5,6,7,8);
endchar;

digitbeginchar("three",.58);
under := .5ver;
penpos0(2.0hor,150); 
penpos1(.7thick,45); 
penpos2(8hor,25); 
penpos3(2.5hor,-80); 
penpos4(2.5hor,-80); 
penpos6(6.5hor,210); 
penpos7(7.5hor,180); 
penpos8(4.5hor,120); 
penpos9(3hor,0); 

lft x0r = leftend;
y0l = height - 7ver;
top y1r = h;
x1l = .5[leftend,rightend];
rt x2r = rightend - hor; y2l = height - 7ver;
lft x4 = leftend + 5hor; bot y4r = .5h;
x3 = x4 + 3hor;	y3r = y4r + .5ver;
rt x6l = rightend - 3ver;		y6l = y4r;
rt x7l = rightend; y7 = 13ver;
x8r = .5[leftend,rightend] - 3hor; bot y8l = -under;
lft x9l = leftend;		y9 = 11ver;
x10 = x9;	y10 = y9 + ver;

path upperhalf, lowerhalf;
upperhalf =  
z0r{dir 50}..z1r{right}..z2r{down}..z3r{dir 190}..z4r
--z4l..z3l..{up}z2l..{left}z1l ..{dir (180 + 50)}z0l--cycle;
filldraw upperhalf; 
z5 = point 2.7 of upperhalf;

filldraw
z5{dir -10}..z6l..z7l{down}..z8l{left}..{up}z9l..z10..
z9r{dir -95}..z8r{right}..z7r{up}..z6r..{dir 180}z3r--cycle;
penlabels(0,1,2,3,4,5,6,7,8,9);
endchar;

digitbeginchar("four",.7);
strong := 7.0hor;
medium := 5hor;
footwidth := 3.25ver;
penpos1(.8strong,0); 
penpos3(strong,0); 
penpos4(strong + 2footwidth,0); 
penpos5(strong + 2footwidth,0); 

rt x4r = rt x5r = rightend - 3.5hor;
rt x1r = rt x3r = rt x4r - footwidth;
top y1 = h;
y2 = top y1  - 9ver;
bot y5 = 0;
y4 = 3ver;
y3 = y4 + ver;
x2 = x3l;

penpos0(medium,-90);
lft x0 =  leftend;		bot y0r = bot y6l = 12.5ver;
x6l = rightend - 3hor;
x6r =  rightend - 4hor;		y6r = y0l;
rt x7 = rightend;		y7 = y6r + 2ver;

filldraw
z0l--z1l--z1r--z3r--z4r--z5r--
z5l--z4l--z3l--z2--z0r--cycle;
filldraw
z0r--z6l--z7--z6r--z0l--cycle;
penlabels(0,1,2,3,4,5,6,7,8);
endchar;

digitbeginchar("five",.58);
under := .5ver;
penpos1(3hor,180); 
penpos4(2.5hor,-45); 
penpos5(6.0hor,-135); 
penpos6(6.5hor,210); 
penpos7(7.5hor,180); 
penpos8(4.5hor,120); 
penpos9(3hor,0); 

medium := 5hor;

top y1r = h;
x1r = leftend + 7.5hor;
lft x4 = leftend + 4hor; bot y4r = .5h - 1.5ver;
x5l = .5[leftend,rightend] + 3hor;
top y5l = .5h + 7ver;
rt x6l = rightend - 3ver;		y6l = y4r;
rt x7l = rightend; y7 = 15ver;
x8r = .5[leftend,rightend] - 3hor; bot y8l = -under;
lft x9l = leftend;		y9 = 11ver;
x10 = x9;	y10 = y9 + ver;


penpos0(medium,90);
x0r = x1r;		top y0r = top y16r = h;
x16l = rightend - 3hor;	y16l = y0l;
x16r =  rightend - 4hor;
rt x17 = rightend;		y17 = y16r + 2ver;
x3 = x4l + 3hor;	y3 = y4l;

filldraw
z4l{z1r-z4l}..z5l{right}..z7l{down}..z8l{left}..{up}z9l..z10..
z9r{dir -95}..z8r{right}..z7r{up}..z5r{left}..{dir -120}z4r--cycle;
penlabels(0,1,2,3,4,5,6,7,8,9);

filldraw
z1r--z4l--z3--z1l--cycle;
filldraw
z0l--z16l--z17--z16r--z0r--cycle;
penlabels(0,16,17);
endchar;


digitbeginchar("six",0.68);
six_and_nine;
filldraw the_six;
penlabels(0,1,2,3,4,5,6,7,8);
endchar;

digitbeginchar("seven",.56);
upperbar := 7ver;
madrega := 2ver;

penpos1(3hor,180); 
penpos6(5hor,0); 
penpos7(8.5hor,0); 

lft x1r = lft x2r = leftend + .5hor;
bot y1 = h - upperbar - madrega;
top y2r = top y3r = h;
x2l = x1l;	bot y2l = bot y3l = h- upperbar;
rt x4 = rightend;		top y4 = h + .75ver;
rt x3r = rightend - .5hor;
x6 = .5[leftend,rightend] - 2hor; y6 = h/2 - 5ver;
lft x7l = leftend;	bot y7 = -.5ver;
(x3l-x3r)/(x6-x3r) = (y3l-y3r)/(y6-y3r); 

filldraw
z2r--z3r--z3l--z2l--z1l--z1r--cycle;

filldraw
z4--z6l{z6l-z4}..{down}z7l--z7r{up}..{z4-z6r}z6r--z4..cycle;
penlabels(0,1,2,3,4,5,6,7,8);
endchar;


digitbeginchar("eight",0.72);
penpos1(1hor,135); 
penpos2(4hor,180); 
penpos3(.35thick,-90); 
penpos4(7hor,15); 
penpos5(.65thick,45); 
penpos6(7hor,15); 
penpos7(.46thick,-90); 
penpos8(6.5hor,180); 
penpos9(1.5hor,135); 

mid := .65h;

x5 = .5[leftend,rightend] + 1hor;	top y5r = mid;
z1r = z5;
rt x2l = rightend - 3ver; y2l = h - 10ver;
x3 = .5[leftend,rightend];	top y3l = h;
lft x4l = leftend + 2ver; y4l = h - 10ver;

rt x6r = rightend;	y6r = .5mid;
x7 = x5;		bot y7r = 0;
lft x8r = leftend;	y8 = .5mid;
z9l= z5l;

filldraw 
z1l..z2l{up}..z3l{left}..z4l{down}..z5l..z6l{down}..z7l{left}
..z8l{up}..{dir 0}z9l--z9r..
z9r..z8r{down}..z7r{right}..z6r{up}..z5r..z4r{up}..z3r{right}
..z2r{down}..z1r--cycle;
penlabels(0,1,2,3,4,5,6,7,8,9);
endchar;

digitbeginchar("nine",0.68);
six_and_nine;
filldraw the_six rotatedaround(middlepoint, 180);
endchar;

mybeginchar("colon", 0.333);
x1 = x3 - .5hor; 		top y1 = 1.65thick; 
rt x2 = rightend;		y2 = y4 + .5ver;
x3 = .5[x4,x2];			bot y3 = 0;
lft x4 = rt x2 - 12.5hor; 	y4 = .5[y1,y3];

z11 - z1 = z12 - z2 = z13 - z3 = z14 - z4 = z0;
lft x14 = leftend; top y11 = h;

filldraw
z1--z2--z3--z4--cycle;
filldraw
z11--z12--z13--z14--cycle;
penlabels(1,2,3,4);
penlabels(11,12,13,14);
endchar;

mybegingenchar(59,0.333,height#,.255height#); "semicolon";
x1 = x3 - .5hor; 		top y1 = 1.65thick; 
rt x2 = rightend;		y2 = y4 + .5ver;
x3 = .5[x4,x2];			bot y3 = 0;
lft x4 = rt x2 - 12.5hor; 	y4 = .5[y1,y3];

penpos5(.3hor, -20);
lft x5l = leftend; bot y5r = -d;
z6 = .2[z3,z4];
filldraw
z1--z2{dir -110}..z5r..z5r--z5l..z5l..tension infinity and 2
..{z4-z3}z6--z4--cycle;
penlabels(1,2,3,4,5,6);

z11 - z1 = z12 - z2 = z13 - z3 = z14 - z4 = z0;
lft x14 = leftend; top y11 = h;

filldraw
z11--z12--z13--z14--cycle;
penlabels(1,2,3,4);
penlabels(11,12,13,14);
endchar;


mybeginchar("=",0.7592);
barwidth := .515thick;
penpos1(barwidth,90);
penpos2(barwidth,90);
penpos3(barwidth,90);
penpos4(barwidth,90);
lft x1 = lft x3 = leftend;
rt x2 =rt x4 = rightend;
bot y1l = bot y2l = thick;
bot y3l = bot y4l = top y1r + barwidth;

filldraw
z1r--z2r--z2l--z1l--cycle;
filldraw
z3r--z4r--z4l--z3l--cycle;
penlabels(1,2,3,4);
endchar;


mybeginchar("question_mark",0.45);
x1 =  x3 - .25hor;		top y1 = thick; 
rt x2 = rightend - 6hor;		y2 = y4 + .5ver;
x3 = .5[x4,x2];			bot y3 = 0;
lft x4 = rt x2 - 8hor;	y4 = .5[y1,y3];

filldraw
z1--z2--z3--z4--cycle;

penpos5(6hor,150);
penpos6(2ver, 90);
penpos7(7ver,-35);
penpos8(5hor,-15);

lft x5r = leftend; y5r = h - 8ver;
x6 = x1 + 2hor; top y6r = h + 1.5ver;
rt x7r = rightend; y7r = h - 9ver;
x8l = x4; y8 = h/2 - ver;
bot z9 = top z1 + (0, 2ver);

filldraw
z5r{up}..z6r{right}..{down}z7r..tension 1.3 ..z8r..tension 1.5 ..z9..
z9..tension 1.5 ..z8l{up}..z7l{up}..z6l{left}..{down}z5l--cycle;

penlabels(1,2,3,4,5,6,7,8,9);
endchar;


mybeginchar("aleph", 0.81);
over = 2ver;
armwidth := 2.0hor;

%the diagonal bar:
alephbar = .855thick;
lft x1l = leftend; y1l = h + over - .515thick;
x1r = leftend + .464thick; top y1r = h + over;
penpos2(alephbar, 63); 
penpos3(alephbar, 63);
x2r = x1r + .1134thick;		y2r = h - .2ver;
x3l = x4l - .1031thick;		y3l = 2.5ver;
rt x4r = rightend; y4r = .567thick;
x4l = rightend - .515thick; bot y4l = 0;
filldraw
z1r{dir -80}..z2r--z3r{z3-z2}..{down}z4r..
{dir 210}z4l{dir 100}..z3l--z2l...{up}z1l..{dir 40}z1r..cycle;


%the bulb - without the connecting arm:
penpos20(thick - 1.5ver,78); penpos21(thick - 1.5ver,95);
pickup serifpen;
lft x20d = rightend - 13hor;
pickup softpen;
x21 = rightend - 1.5hor;
top y20r=h + .7ver;
top y21r=h - 1.5ver;


%the right arm:
barslope = angle(z3-z2);
penpos11(7.5hor, barslope);
penpos12(armwidth, barslope);
penpos13(armwidth, barslope);
z11l = .58[z2r,z3r];
z12l = .25[z11l,z21r];
z13l = .45[z11l,z21r];
z14 = z11 - .3(alephbar,alephbar);

serif(sharp,20,21r,13l,2/3*serifheight);
filldraw z20r---z21r..tension 2.0 and 5 .. z21l
{dir 180}..tension 3 ..{z20l-z13l}z20l--cycle;

filldraw z21l{left}..z13r---z12r..{z3-z2}z11r--z14--
z11l--z12l---z13l--z21r--cycle;

%the left leg:
penpos7(3.6hor, barslope);
penpos8(7.3hor, 38);
penpos9(8.8hor, 15);
penpos10(10.3hor, 0);
z7 = (1/3)[z2l,z3l];
lft x8l = leftend + hor; y8l = 13ver;
lft x9l = leftend + 4.5hor; y9 = 4.5ver;
lft x10l = leftend + hor; bot y10 = 0;
z10t = z10l + (0, 0.4ver);

filldraw z7r{dir 150}..z8r{dir -80}..z9r{down}..z10r..
z10r--z10l..z10t{dir 25}..{dir 60}z9l..
z9l{dir 120}..z8l{up}..{dir 35}z7l--cycle;
penlabels(1,2,3,4,5,6,7,8,9,10,10t,11,12,13,14);
penlabels(20,21,22,23);

endchar;

mybeginchar("beth", 0.72);
penpos2(thick,90); 
penpos3(whatever,80);
penpos4(3.8hor,0);
pickup serifpen;
lft x2d=leftend + 1.5hor;
pickup softpen;
x3r = rightend -8hor;
top y2r=top y3r=h; y3l = y2l;
y4=y3l-5ver;
x4= x3 + 4hor;
penpos5(2.8hor,0);
penpos6(5hor,0);
y5=y8r + 2ver; x5l = x3l + 1.7hor;
y6=y8r; x6r = x5r  - .7hor;
penpos7(whatever,alpha); penpos8(whatever,alpha);
lft x7l=leftend;  rt x8r=rightend; 
bot y7l = bot y8l = 0; 
y7r -  y7l = y8r -  y8l = thick; 

serif(normal,2,3r,3l,serifheight);
filldraw 
z2r---z3r..tension 1.2 and infinity..{down}z4r..z5r..z6r..z6r--z6l..
z6l{dir 0}..{dir 70}z5l..{up}z4l..z3l---z2l--cycle;
filldraw z7r--z8r--z8l--z7l--cycle;
penlabels(0,9,1,2,3,4,5,6,7,8);
endchar;


mybeginchar("guimel",0.59);
penpos2(thick,90); penpos3(whatever, 87);
penpos4(3.25hor,0);
penpos5(3.25hor,0);
penpos6(2.5hor, 180);
penpos7(whatever,180+alpha); 
penpos10(.5hor, 0);
penpos8(thick + .8ver, -90);
pickup serifpen;
lft x2d = leftend + 4hor;
pickup softpen;
 x3r = rightend - 10hor;
top y2r = top y3r = h; bot y3l = bot y2l - .3ver;
y4 = y3l - 1.5ver;
x4 = x3r + 2.25hor;
x31 = x3r + 5hor; y31 = y3 + ver;
x6r = x5l - .5hor;  bot y6 = thick + 1.2ver;
y5 = 0.5h; x5 = x4;
lft x7r = leftend;
bot y7r = 0;  y7l - y7r = thick; 
x8 = 0.5[leftend, rightend] - hor; bot y8r = 0;
rt x10r = rightend; 	bot y10r = 0.25ver;
rt x9 = rt x10r;	y9 = .722thick; 

serif(wide,2,3r,3l, serifheight);
filldraw z2r{right}..{right}z3r..z31{down}..z4r{dir -95}..z5r{dir -87}..
z9---z10r..z10l{dir 100}..{dir 140}z6l..z6r--
z8r--z7r---z7l{right}..z8l..z5l{dir 87}
..z4l..z3l---z2l--cycle;
penlabels(0,1,2,3,4,5,6,7,8,9,10);
labels(31);
endchar;


mybeginchar("daleth",0.72);
penpos2(thick,90); penpos3(thick,90);
pickup serifpen;
lft x2d = leftend;
pickup softpen;

x3 = rightend -3hor;
top y2r = top y3r = h;

serif(normal,2,3r,3l,serifheight);

penpos40(.8hor,0);
penpos41(2.3hor,0);
penpos4(3.8hor,0);
penpos5(4.5hor,0);

rt x40r =  x3l + .2hor;		y40 =  y3l;
rt x41r =  x3l - .3hor;		y41 =  y3l - 3.5ver;
rt x4r = x3l + .2hor;			y4 = y3l-8ver;
rt x5r = rightend - hor;	y5 = 6hor;
lft x6 =  lft x5l - 1.75hor;	bot y6 = -0.2ver;

filldraw z2r--z3r{right}..tension 1.8 and 1.8 ..{left}z3l--z2l--cycle;

path leg;
leg =
z40r..z41r..z4r...{down}z5r..{dir 190}z6..
z6..z5l{up}..z4l{up}..z41l..z40l--cycle;
filldraw leg;

penlabels(1,2,3,4,5,6,7,8,40,41);
endchar;


mybeginchar("hei", 0.72);
penpos2(thick,90); penpos3(thick,90);
pickup serifpen;
lft x2d = leftend;
pickup softpen;

x3 = rightend -3hor;
top y2r = top y3r = h;

serif(normal,2,3r,3l,serifheight);

penpos40(.8hor,0);
penpos41(2.3hor,0);
penpos4(3.8hor,0);
penpos5(4.5hor,0);

rt x40r =  x3l + .2hor;		y40 =  y3l;
rt x41r =  x3l - .3hor;		y41 =  y3l - 3.5ver;
rt x4r = x3l + .2hor;			y4 = y3l-8ver;
rt x5r = rightend - hor;	y5 = 6hor;
lft x6 =  lft x5l - 1.75hor;	bot y6 = -0.2ver;

filldraw z2r--z3r{right}..tension 1.8 and 1.8 ..{left}z3l--z2l--cycle;

path leg;
leg =
z40r..z41r..z4r...{down}z5r..{dir 190}z6..
z6..z5l{up}..z4l{up}..z41l..z40l--cycle;
filldraw leg;

lft x10=leftend + .7hor; bot y10 = 0;
rt x7=leftend + 8hor; y7 = .5h;

penpos8(5.0hor,0);
penpos9(5.0hor,0);
x8l = x9l;
y8+y9 = y7+y10;
x9 = x10 + 3.2hor; y9 = 0.2[y10,y7];

filldraw z7..z8r{down}..{down}z9r..{dir 190}z10..
z10..z9l{up}..z8l{up}..{dir 10}z7..cycle;

penlabels(1,2,3,4,5,6,7,8,9,10,40,41);
endchar;


mybeginchar("vav",0.39);
penpos2(thick,90);
penpos3(whatever,80);
penpos4(3.2hor,0);
pickup serifpen;
lft x2d = leftend;
pickup softpen;

top y2r = top y3r = h;
bot y3l = bot y2l;
y4 = y3l-2ver;
x4 = x3 + 3.5hor;
x4r = rightend - 1.3hor;

serif(wide,2,3r,3l, serifheight);

penpos5(whatever,25);
rt x5r = rightend; x5l = x4l;
y5r = 4.5ver;
rt x6 = x5l;	bot y6 = 0;

filldraw z2r--z3r{right}..{down}z4r..{down}z5r..z6..
z6..z5l{up}..z4l{up}..{left}z3l--z2l--cycle;
penlabels(0,9,1,2,3,4,5,6,7,8);
endchar;


mybeginchar("zain",0.39);
penpos2(thick,90);
penpos6(3.8hor,0);
penpos7(3.3hor,0);
penpos8(eps,-45);
pickup serifpen;
lft x2d = leftend;
pickup softpen;

top y2r = h;
top y3r = h - .3ver;
y3l = y2l;
rt x3l = rightend;
rt x3r = rt x3l - 3hor;

rt x4 = 0.5[x2l,x3l];	y4 =y2l;
x5 = x4;		y5 = y2l -1.5ver;
x6r = x4 - .25hor;	y6 = y4 - 5ver;
x7r - 1.65hor =  x4 - .65hor;		y7 = 6ver;
x8 =  x4 - .65hor - 3.5hor;	bot y8 = -0.2ver;

serif(wide,2,3r,3l, serifheight);
filldraw z2r{right}..{right}z3r..{dir -95}z3l{dir 180}..
tension infinity and .8 ..
z5{dir -98}..z6r{z7r-z6r}..{down}z7r..{dir -150}z8r--z8l{dir 45}
..{up}z7l..z6l{dir 90}..{dir 40}z4--z2l--cycle;
penlabels(2,3,4,5,6,8,9,7);
endchar;


mybeginchar("heth", 0.72);
under := .5ver;
penpos2(thick,90); penpos3(thick,90);
pickup serifpen;
lft x2d = leftend;
pickup softpen;
x3 = rightend -3hor;
top y2r = top y3r = h;

penpos4(hor,0);
penpos5(3.25hor,0);
penpos6(4.5hor,0);
penpos7(5.8hor,35);
lft x4l = x3l  - 1.25hor;	y4 = y3l;
lft x5l = x3l - 4hor;		y5 = y3l - 4.5ver;
lft x6l = x3l - 4.5hor;		y6 = y3l - 10ver;
x7l = x6l;			y7l = 3hor;
x8 = x7l - hor;			bot y8 = -under;

penpos14(.2hor,0);
penpos15(3.3hor,0);
penpos16(4.5hor,0);
penpos17(5.8hor,35);

x14 = x4- (legsdistance - 2hor); y14 = y2l;
z15 = z5 - (legsdistance, 0);
z16 = z6 - (legsdistance, 0);
z17 = z7 - (legsdistance, 0);
z18 = z8 - (legsdistance, 0);
lft x18 = leftend;

path rightleg;
rightleg =
z4r{dir -120}
..z5r..z6r{z6r-z5r}..{down}z7r{down}..{dir -170}z8
{dir 50}..z7l---z6l...z5l..{dir 60}z4l--cycle;

path leftleg;
leftleg = 
z14r{dir -160}
..z15r..z16r{z16r-z15r}...{down}z17r{down}..{dir -170}z18
{dir 50}..z17l---z16l...z15l..{dir 20}z14l--cycle;

filldraw leftleg;
filldraw rightleg;
serif(normal,2,3r,3l,serifheight);

filldraw z2r--z3r{right}..tension 2.3 and 2.3 ..{left}z3l--z2l--cycle;
penlabels(2,3,4,5,6,7,8);
penlabels(14,15,16,17,18);
endchar;


mybeginchar("teth", 0.81);
penpos1(1.8hor,0);
penpos2(2.8hor,0);
penpos3(whatever,65);
penpos4(whatever,90);
penpos5(2.8hor,180);
penpos6(.9thick,270);

x1 = leftend + 7hor; 
lft x3l = leftend + 4.7hor; 
lft x2l = leftend +2.5hor; 

rt x4 = rightend - 9hor;
rt x5l = rightend - .3hor;
rt x6 = rightend - 9hor;
x7 = x6 - 9hor;

y1 = h - .928thick;
y5 = h - 18ver;
bot y3l = bot y4l = 0;
y3r - y3l = thick;
y4r - y4l = thick;
y2 = 21ver;
top y6l = h;
y7 = 23.5ver;

%the main body:
path rightedge;
path leftedge;
rightedge = z1r..tension 1.2 ..z2r{dir -85}..tension 1.7 ..
z3r---z4r
..tension 2 ..z5r{up}..tension 1. ..{left}z6r;
leftedge =
z6l{right}..tension 1 ..z5l{dir 266}..{dir 245}z4l---z3l{dir 87}..{up}z2l..tension 1.2 ..z1l;
filldraw  rightedge &z6r{left}..{dir -110}z7{dir 80}
..z6l{right} &leftedge & z1l--z1r..cycle;
penlabels(0,9,1,2,3,4,5,6,7,8,11);

%the bulb:
penpos10(.9thick,90); 
penpos11(.9thick,90); 
pickup serifpen;
lft x10d = leftend;
pickup softpen;

x11 = x10r + 5.3hor;
top y10r = h;
top y11r = h - .5ver;
x12 = x11 + 3hor; bot y12 = y11l - 1.2ver;
rightportion := 0.30;
leftportion := 4.80;
z13r = point rightportion of rightedge; 	% a point on right edge;
z13l = point leftportion of leftedge; 	% a point on left edge;

serif(normal,10,11r,11l,serifheight);
filldraw z10r---z11r{dir -10}..tension .75 and infinity ..{dir -99}z12
{dir 140}..{left}z11l..{direction rightportion of rightedge}z13r--z13l{direction leftportion of leftedge}..{left}z10l--cycle;
penlabels(10,11,12,13);
endchar;


mybeginchar("yod",0.39);
penpos2(thick,90); penpos3(whatever,75);
penpos5(1.2hor, -45);	%to avoid a strange path

pickup serifpen;
lft x2d = leftend;
pickup softpen;
 x3r = rightend - 4.5hor;
top y2r = top y3r = h; bot y2l = bot y3l;
rt x4 = rightend; y4 = .66[y2,y3];
y5 = h/2;
x5 =  rightend - 7hor;

serif(normal,2,3r,3l, serifheight);
filldraw 
z2r--z3r{right}..z4{down}..{(-1,-1)}z5r..
z5l{(1,1)}..tension 1.2 ..{left}z3l--z2l--cycle;
penlabels(1,2,3,4,5);
endchar;


mybeginextrchar("kaffinal",0.72,height#,depth#); "kaf final";
penpos2(thick,90); penpos3(thick,90);
pickup serifpen;
lft x2d = leftend;
pickup softpen;

x3 = rightend -2.7hor;
top y2r = top y3r = h;

penpos4(whatever,25);
penpos6(4.3hor,35);

rt x4r = x3l; y4 = y3l - 2ver;
lft x4l = rt x4r - 3.5hor;
x6l = x4l + .5hor; y6l = -6.5hor;
x7 = x6l - .5hor; bot y7 = -d;
rt x31 = rightend; y31 = y3;

serif(normal,2,3r,3l,serifheight);

path head, leg;
head =
z2r--z3r{right}..z31{down}..tension 5 ..{left}z3l--z2l--cycle;

z41r = point 2.4 of head;
z41l = point 3.25 of head;
leg =
z41r{dir -120}..
z4r--z6r{down}..z7..z7..{up}z6l--z4l{up}
..{left}z41l--cycle;

filldraw head;
filldraw leg;
penlabels(0,9,1,2,3,4,5,6,7,8,41);
penlabels(21,31);
endchar;


mybeginchar("kaf",0.72);
penpos2(thick,90); 
penpos3(whatever, 75);
penpos4(1.8hor,0);
penpos5(thick,-90);
penpos6(whatever,(alpha+180));

pickup serifpen;
lft x2d = leftend;
pickup softpen;

top y2r = top y3r = h;
rt x4r = rightend;		y4 = h/2;
y3l = y2l;
x4 = x3 + 7.5hor;
x5 = x3;
x6l = leftend + 4hor;
bot y5r = bot y6r = 0; 
y5l = y6l; 

serif(normal,2,3r,3l,serifheight);
filldraw z2r{right}..{right}z3r..tension 1.4 ..{down}z4r..{left}z5r--z6r
--z6l--z5l{right}..{up}z4l..{left}z3l..{left}z2l--cycle;

penlabels(1,2,3,4,5,6);
endchar;


mybeginextrchar("lamed",0.72, 1.46height#,0); "lamed";
penpos0(2.8hor,0);
penpos1(3hor,0);
penpos2(thick,90); penpos3(thick,90);
penpos4(whatever,45);
penpos5(4.5hor,0);
penpos6(4.0hor,-30);
penpos7(3hor,-60);
penpos8(4.5hor,0);
penpos9(6.3hor,0);
lft x0l = leftend + 1.5hor;
y0 = height + 9ver;
x1l = x0l - hor; y1 = height + 3ver;
x2r = leftend + 5.5hor;
top y2r = top y3r = height;
rt x4r = rightend;
x4l = x4r - 5hor;
y4l = bot y3l - 2ver;
lft x4l = x3l + 2.25hor;
x5l = x4l; 		y5l = y4l - 4ver;
x6l = x5l - .5hor;	y6l = y5l - ver;
x7 = rightend - 11hor; y7 = bot y3l - 14ver;
lft x8l = leftend + 8.5hor;		y8 = 7ver;
bot y9 = 3ver; x9r = x8r + 1.5hor;
bot y91 = -0.2ver; x91 = x9 + 0.3hor;


filldraw
z0r{dir - 120}..z1r{dir (180+80)}..{right}
z2r---z3r..tension .75 ..{down}z4r...z5r..z6r..
tension 1.9 ..
z7r..{down}z8r..z9r..z91..
z9l..z8l{dir 75}..tension 1.5 ..z7l...z6l..z5l..z4l{up}..z3l{left}---
z2l{left}..z1l{dir 80}..z0l{dir 80}--cycle;

%bulb
lft x11 = leftend - 2.5hor;
top y10 = h;
x10 = x11 + 2.5hor; 
x12 = x11 + 8.5hor;
y12 = y10 -4.5ver; 
y11 = y10 -4.5ver; 

filldraw
z10{dir -60}..tension 0.8 and 2 ..z12..tension 1.4 ..{dir - 120}z0r--
z0l{dir 80}..{up}z11..tension 1.5 ..{dir 50}z10..cycle;

penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12);
endchar;


mybeginchar("memfinal",0.76);
outerbit = 3hor;
innerbit = 1.5hor;
penpos2(thick,90); 
penpos3(whatever,80);
penpos4(3.3hor,0);
penpos9(3.8hor,180);
penpos10(3.6hor,180);
penpos11(1.3hor,90); 

pickup serifpen;
lft x2d = leftend;
pickup softpen;
rt x4r = rightend;
top y2r = top y3r = h;
y3l = y2l;
y4 = bot y3l - 4ver;
x4 = x3r + 3.5hor;

x5l = x4l; x5r = x4r; y5l = 1.07thick + innerbit;  y5r = outerbit;
bot y6r = 0;		y6l - y6r = thick;
x6r = x5r - outerbit;  x6l = x5l - innerbit;
bot y7r = 0;		y7l - y7r = thick;
x7r = x8r + outerbit; x7l = x9l + innerbit;
x8r = x9r; x8l = x9l; y8r = outerbit; y8l = 1.07thick + innerbit;
lft x9r = leftend + hor; y9r = .5h - ver;
x10r = x9r + 1.3hor; y10r = y2l - 3.5ver;
x11l = x2l + 7hor; y11l = y2l;

serif(normal,2,3r,3l,serifheight);
filldraw 
z2r{right}..{right}z3r..{down}z4r---z5r..z6r---z7r..z8r---
z9r...z10r..{right}z11r--
z11l{left}..z10l...z9l---
z8l..z7l---z6l..z5l---z4l{up}..z3l{left}..{left}z2l--cycle;

penlabels(1,2,3,4,5,6,7,8,9,10,11);
endchar;


mybeginchar("mem",0.81);
over := .3ver;

penpos1(2.8hor,180);
penpos2(2.8hor,180);
penpos3(2.8hor,135);
penpos5(11.5ver - penwidth,90);
penpos6(3hor,0);
penpos8(whatever,(alpha+180));

lft x0 = leftend; bot y0 = -0.2ver;
lft x1r = leftend + 1.5hor; y1 = 4ver;
lft x2r = leftend + 3.5hor; y2 = .5h;
x3l = x2l + 6hor; y3l = y5l -2ver;
x5= .5[leftend,rightend] + 3hor; 
x4 = x5r - hor;	y4 = y5r - ver;

top y5r = h + over;
rt x6r =  rightend;
y6 = h/2 + 0ver;
rt x7r = rightend - 2.5hor; x7l = x7r - 2hor;
bot y7r = bot y8r = 0; 
y7l - y7r = y8l - y8r = thick;
lft x8r = leftend + 9.5hor;

path body;
body =
z0{dir 60}..z1r{up}..z2r..z3r..z3r{dir 10}..{dir 75}z4..z5r{dir -10}..
{down}z6r..{dir -100}z7r--z8r--z8l--z7l
{dir 60}..z6l{dir 97}..z5l{left}..z3l..z2l...z1l{dir -100}
..{dir -150}z0..cycle;
filldraw body;

%the bulb:
penpos10(9.3ver,90); 
pickup serifpen;
lft x10d = leftend;
pickup softpen;

x11r = x10r + 5hor;
top y10r = h - .3ver;
top y11r = h - ver;
x11l = x10l + 7hor; y11l = y11r - 7ver;
z13 = point 4.15 of body;
z14r = point 2.7 of body;
x14l = x10l + 3.25hor;		y14l = y10l;

serif(normal,10,11r,14l, serifheight);
path bulb;
bulb =
z10r{z11r-z10r}..{z11r-z10r}z11r..tension 1.1 and 3 ..z11l..
{direction 4.15 of body}z13--z3l--z14r{direction 2.7 of body}..
{left}z14l{left}...z10l--cycle;
filldraw bulb;
penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14);
endchar;


mybeginextrchar("nunfinal",0.39,height#,depth#); "nun final";
penpos2(thick,90); 
penpos3(whatever,72);
penpos4(2.8hor,0);
penpos6(4.3hor, 0);

pickup serifpen;
lft x2d = leftend;
pickup softpen;
 rt x31 = rightend;
top y2r = h;
top y3r = h - .2ver;
y3r - y3l = thick;
y4 = bot y3l - ver;
lft x4l = x3l + hor;
y5r = y3l - 6ver; rt x5r = x3r - .7hor;
y5l = y5r - 4ver; rt x5r - lft x5l = 4hor; 
rt x31 = x3r + 4hor; y31 = y3 + ver;

x6r = x5r + hor;
x7 = x6l - 1.5hor;
y6 = y7 + 6ver;
bot y7 = -d; 

serif(wide,2,3r,3l, serifheight);
filldraw
z2r{right}..{right}z3r..z31{down}..{dir -130}z4r..z5r---z6r..{dir -170}
z7{dir 60}..z6l---z5l..{dir 80}z4l..{z2l-z3l}z3l--z2l--cycle;
penlabels(0,9,1,2,3,4,5,6,7);
labels(31);
endchar;


mybeginchar("nun",0.53);
penpos2(thick,90); penpos3(thick,90);
penpos4(2.8hor,0);
penpos5(3.8hor,0);
penpos7(5.3hor,0);
pickup serifpen;
lft x2d = leftend + 3.5hor;
pickup softpen;
rt x4r = rightend - 1.5hor;
top y2r = top y3r = h;
y4 = y3l-2ver;
rt x4 =  x3 + 3hor;
rt x7r = rightend - .5hor;
y7 = y9r;
rt x5r = rt x4r - 1.2hor; y5 = 18hor;
x8=x7r - hor; bot y8 = 0;

penpos9(whatever,alpha);
lft x9l = leftend; 
bot y9l = 0;  y9r - y9l = thick; 

serif(wide,2,3r,3l, serifheight);
filldraw 
z2r{right}..{right}z3r..{dir -100}z4r..z5r{down}..{dir -80}z7r
--z7l{dir 110}..{up}z5l..z4l{dir 80}..
z3l{left}..{left}z2l--cycle;
filldraw z9r--z7r{dir -80}..{dir -100}z8--z9l--cycle;
penlabels(2,3,4,5,6,7,8,9);
endchar;


mybeginchar("samech",0.72);
penpos2(thick,90);
penpos3(whatever,75);

penpos4(min( 4hor, .412thick),0);
penpos5(min( 4.2hor, .433thick),0);
penpos6(whatever, -30);
penpos7(1.05thick, -90);
penpos8(whatever,210);
penpos9(min( 4.0hor, .412thick),180);
penpos10(min( 2.3hor, .237thick),180);
penpos11(min( 3hor, .309thick),180);
penpos71(12.3hor,0);

pickup serifpen;
lft x2d = leftend;
pickup softpen;
top y2r = top y3r = h;
bot y3l = bot y2l;
x3l =  rightend - 10hor; 
rt x4r = rightend;
x5r = x4r - .3hor;
y3l = y4 + 6ver;
y5 = y9r = 17ver;
y8l - y8r = y6l - y6r = .35thick;
x7r =  .65[x2l,x3l]; bot y7r =  -hor;
x8r = x9r + 1.5hor;
x10r = x8r;
x6r = x5r - 2.0hor;
y6r =  y8r = 8ver;
y10 = .3[y2l,y9l];
lft x9r = leftend + .8hor;
x11l = leftend + 8hor;	 y11 = y2l;
x71 = x7 + .5hor; y71 = .7ver;

serif(normal,2,3r,3l, serifheight);
filldraw 
z2r{right}..{right}z3r..tension 1.2 ..z4r..{dir -98}z5r..z6r..
z71r..tension 1.5 ..z71l..
z8r..{up}z9r..z10r..{dir 45}z11r--
z11l{left}..z10l..z9l..z8l..z7l..
z6l..z5l..z4l..tension 0.85 ..z3l{left}..{left}z2l --cycle;

penlabels(1,2,3,4,5,6,7,8,9,10,11,12,71);
endchar;

mybeginextrchar("ain",0.81,height#,.20height#); "ain";

penpos1(1.8hor,0);
penpos2(2.0hor,0);
penpos3(4.1hor,40);
penpos4(2.3hor,20);

penpos5(2.8hor,0);
penpos6(2.6hor,0);
penpos7(4.3hor,0);
penpos8(5.3hor,-45);
penpos9(thick,-90);

lft x1 = leftend + 8hor;
y1 =  h - .858thick;
x2 = x1 - .75hor; y2 = .5h + 5ver;
x3l = .5[leftend, rightend] - 4.7hor ; y3l= 12.3ver;
lft x4l = leftend + 14hor;  y4l = 9ver;

rt x5r = rightend - 3.0hor; y5 =  h - 2ver -1.03thick;
rt x6r = rightend - 5.0hor; y6 = .3[y5,y7];
rt x7r = rightend - 7.3hor; y7 = .5h - 2ver;
x8l = .5[leftend, rightend] + .5hor ; y8l= 8ver;
lft x9 = leftend + hor; bot y9r = -d;

%the main body:
path rightarm, leftarm;
rightarm =
z5r..z6r..z7r..z8r{dir 230}..{dir 200}z9r--
z9l{dir 20}..tension 1.7 ..z8l{dir 70}..z7l...
{dir 60}z6l..tension 0.75 ..{dir 85}z5l;

a0l = 5.65;  a0r = 6.15;
z0l = point a0l of rightarm;
z0r = point a0r of rightarm;
leftarm =
z1r{down}..z2r..z3r{dir -70}..z4r..{direction a0r of rightarm}z0r
--z8r--z0l{direction a0l of rightarm}..
z4l..z3l{dir 140}..tension .8 ..z2l..z1l{up};
filldraw leftarm & z1l--cycle;

%the left bulb:
penpos10(.97thick,85); 
pickup serifpen;
lft x10d = leftend;
pickup softpen;
		top y10r=h - .3ver;
x11r = leftend + 10.5hor;	top y11r=h - 1.2ver;
x11l = x11r + 2.5hor; bot y11l = top y11r - 1.03thick;
rightportion := 0.5;
leftportion := 9.4;
z13r = point rightportion of leftarm; 	% a point on right edge;
z13l = point leftportion of leftarm; 	% a point on left edge;

serif(wide,10,11r,11l,5/6*serifheight);
filldraw
z10r---z11r..{dir -100}z11l{dir 150}..tension 1 and 1.5 ..
{direction rightportion of leftarm}z13r--
z13l{direction leftportion of leftarm}..
tension 0.8 and 6 ..
z10l--cycle;
penlabels(10,11,12,13);


%the right bulb:
penpos50(.948thick,83); 
top y50r = h;
pickup serifpen;
lft x50d = rightend - 16hor;
pickup softpen;
x51r = rightend - 3hor;	top y51r = h - 1.5ver;
rt x51l = rightend;	y51l = y51r - .412thick;


serif(normal,50,51r,5r,5/6*serifheight);
filldraw z50r---z51r{dir -10}..{down}z51l..
{dir -135}z5r & rightarm & z5l{dir 85}..{z50l-z5r}z50l--cycle;
penlabels(0,1,2,3,4,5,6,7,8,9);
penlabels(50,51);
endchar;


mybeginextrchar("pefinal",0.72,height#, depth#); "pe final";
penpos2(thick,90); penpos3(thick,90);
penpos4((2/3)*1.05thick + (1/3)*10.2hor,67);
penpos6(5.3hor, 0);

pickup serifpen;
lft x2d = leftend;
pickup softpen;

top y2r = top y3r = h;
y5l = h/2 + 5ver;
rt x5r - lft x5l = 4.7hor;
x3l = lft x5l - 3.5hor; 
x4r = x5r - hor;  y4r = h - 1.5ver;
x5r = x6r -1.5hor;	y5r = y4;
rt x6r = rightend;
lft x61 = lft x6l - hor;
bot y61 = -d;
y6 = y61 + 4ver;


penpos7(4.3hor,0);
penpos8(2.3hor,0);
penpos9(5.8ver,90);
penpos10(7.8ver,95);

lft x8l = leftend;		bot y8 =y10 - 4.65ver;
lft x7l = lft x8l + 4hor;	y7l = y2l;
rt x10r = lft x8l + 11.5hor;	y10 = h/2;
x9 = lft x8l + 7hor;		top y9r = top y10r - .2ver;
x11l = x10l - hor;		y11r = y11l = y10l + ver;
x11r = x8r + .5hor;

serif(normal,2,3r,3l,serifheight);
filldraw
z2r{right}..{right}z3r...z4r...z5r{z6r-z5r}..{z6r-z5r}
z6r..tension 1.4 and infinity ..z61..z61..z6l
{z5l-z6l}..z5l{z5l-z6l}...
if y3l - y5l > 2.5ver: z4l.. fi
z3l{left}..{left}z2l--cycle;

filldraw z7r{left}..{right}z9r..
{right}z10r..tension 1 and 3 ..{dir -150}z10l..
z10l..z11l..{left}z9l..{dir -150}z11r--z8r--
z8l{dir 95}..{dir 50}z7l--cycle;
penlabels(1,2,3,4,5,6,7,8,9,10,11,41,61);
endchar;


mybeginchar("pe",0.71);
penpos2(thick,90);
penpos3(whatever, 75);
penpos4(2.8hor,0);
penpos5(thick,-90);
penpos6(whatever,(alpha+180));

pickup serifpen;
lft x2d = leftend + 2.5hor;
pickup softpen;
top y2r = top y3r = h;
bot y2l = bot y3l;
rt x4r =  rightend;
y4 = h/2;
x3 = x4 - 7.0hor; 
x5 = x4 - 8.5hor;
lft x6r = leftend;
bot y5r = bot y6r = 0; 
y5l = y6l; 


penpos7(5.3hor,0);
penpos8(2.3hor,0);
penpos9(5.8ver,90);
penpos10(7.8ver,95);

lft x8l = leftend + 1.5hor;	bot y8 = y10 - 4.65ver;
lft x7l = lft x8l + 5hor;	y7l = y2l;
rt x10r = lft x8l + 11.5hor;	y10 = h/2;
x9 = lft x8l + 7hor;		top y9r = top y10r - .2ver;
x11l = x10l - hor;		y11r = y11l = y10l + ver;
x11r = x8r + .5hor;

serif(normal,2,3r,3l,serifheight);
filldraw
z2r{right}..{right}z3r..tension 1.5 ..{down}z4r..{left}z5r..{left}z6r--
z6l{right}..z5l{right}..z4l{up}..z3l{left}..{left}z2l--cycle;

filldraw z7r{left}..{right}z9r..
{right}z10r..tension 1 and 3 ..{dir -150}z10l..
z10l..z11l..{left}z9l..{dir -150}z11r--z8r--
z8l{dir 95}..{dir 50}z7l--cycle;
penlabels(1,2,3,4,5,6,7,8,9,10,11);
endchar;


mybeginextrchar("zadikfinal",0.81,height#, depth#); "zadik final";

%the left bulb:
penpos1(thick,90); 
penpos2(whatever,90);
pickup serifpen;
lft x1d = leftend;
pickup softpen;
 
top y1r = top y2r = h;
rt x2r = leftend + 13.5hor;
bot y2l = bot y1l;
serif(normal,1,2r,2l,serifheight);
filldraw
z1r{right}..z2r{right}..tension 2.9 and 2.9 ..
{left}z2l..{left}z1l--cycle;

%the right bulb - without the connecting arm:
penpos11(thick, 85); penpos12(thick,95);
x11d = rightend - 13hor;
x12 = rightend - 1.5hor;
top y11t = top y1t - .5ver;
top y12r = top y11r - 1.5ver;
serif(sharp,11,12r,12l,2/3*serifheight);
%pickup pencircle scaled penwidth;
path rightbulb;
rightbulb =
z11r---z12r..tension 2.8 and 10 .. z12l {dir 170}..z11l--cycle;
filldraw rightbulb;

%the arms:
penpos3(3.3hor,0);
penpos4(1.8hor,0);
penpos5(2.3hor,0);
penpos6(4.3hor,0);
penpos7(3.8hor, 0);
z3r = z2l;
lft x4l  =  leftend + 8.25hor;	y4 = y2l - 7ver;
x5l  = x4l + .25hor;		y5 = y4 - 5ver;
x6l = x4l + hor;		y6l = 11.5ver;
x7l = x4l + 2.5hor;
x8 = x7l - .5hor;
y7 = y8 + 5ver;
bot y8 = -d; 

z13r = point 2.3 of rightbulb;
penpos13(1.8hor, -70);
penpos14(2.3hor, -50);
penpos15(2.6hor, -40);
lft x14l = lft x4r + 9hor;	y14r = y4;
lft x15l = lft x5r + 2.5hor;	y15l = y5;

filldraw
z3r{dir -150}.. tension 1 and 5 ..{dir -90}z4r..z5r{dir - 80}..
z15l{dir 60}..z14l..{dir 20}z13l--
z13r{dir -150}..z14r..{dir -115}z15r..
z6r..tension 1.8 ..z7r..tension 1.5 ..z8..
z8{dir 80}..z7l{up}..z6l..z4l{dir 90}..{dir 60}z3l--cycle;
penlabels(1,2,3,4,5,6,7,8,9);
penlabels(10,11,12,13,14,15);
endchar;


mybeginchar("zadik",0.76);
beta := angle(1,6);
penpos2(thick,90); 
penpos3(whatever,75);
penpos4(whatever,65);
penpos5(2.8hor,40);
penpos6(3.3hor,40);
penpos7(8.5hor,7);
penpos9(whatever,alpha); penpos8(whatever,beta);
pickup serifpen;
lft x2d = leftend;
pickup softpen;
top y2r = h;
x3r = leftend + 11hor; top y3r = h; y3l = y2l;
lft x4l = x3l + 1.5hor; 
y4l = bot y3l - 1.5ver;
rt x4r = lft x4l + 3.5hor;

x5r = x4r - .5hor;  y5r = h -14ver;
x6r = rt x5r + 1.5hor;
top y6r = y5r - 2.5ver;

x7r = x8; y7r = thick + 3ver;
lft x9l = leftend + hor;  rt x8r = rightend - 1.5hor; 
bot y9l = bot y8l = 0;
y9r - y9l = y8r - y8l = thick; 
z71 = .57[z9r,z8r];

serif(normal,2,3r,3l,serifheight);
path basis, leftedge, rightedge;
basis = z8r--z8l--z9l--z9r--z71;
rightedge =
z2r{right}..{right}z3r..z4r{z5r-z4r}...{z5r-z4r}z5r..z6r
{z7r-z5r}..{z7r-z5r}z7r..{z8l-z8r}z8r;
leftedge =
z71{right}..{z6l-z7l}z7l..{z6l-z7l}z6l..z5l...z4l{up}..
z3l{left}..{left}z2l;

z14l = point 4.1 of rightedge;
z14r = point 4.28 of rightedge;

filldraw rightedge & basis & leftedge--cycle;

%the right bulb and arm:
penpos10(thick,90); 
penpos11(whatever, 98);
pickup serifpen;
lft x10d = rightend - 13.8hor;
pickup softpen;
top y10r = h;
top y11r = h;	bot y11l = bot y10l + .3ver;
rt x11r = rightend -1.5hor;
x12l = x10l + 1.2hor;
x12r = x11l - 4hor;		y12l = y12r = y11l - ver;

serif(normal,10,11r,11l,serifheight);
filldraw
z10r---z11r{right}..tension 1.5 and infinity ..
{down}z11l{z12r-z11l}..z12r--z14r--
z14l--z12l{dir 105}..{dir 170}z10l--cycle;

penlabels(1,2,3,4,5,6,7,8,9);
penlabels(10,11,12,14);
endchar;


mybeginextrchar("kof",0.72,height#,depth#); "kof";
penpos2(thick,90); penpos3(thick,90);
penpos4(5.6hor,0);
penpos5(5.05hor, 0);
penpos6(3.3hor,-90);
penpos7(2.3hor, -30);
penpos8(4.3hor,0);
pickup serifpen;
lft x2d = leftend;
pickup softpen;

rt x4r = rightend;
top y2r = top y3r = h;
y4 = y3l-3ver;
x4 =  x3 + 7hor;
x5l = x4l; y5l = y4 - 6ver;
bot y8 =  2ver; 
x8 = rt x10r + 8hor;
x7 = rt x10r + 8hor; y7 = 7ver;
x6 = x3 - 3hor; y6 = y3l - 18.5ver;
bot y9 = 0; x9 = x8 + 0.3hor;


lft x10l = lft x20l = leftend + hor;
rt x10r - lft x10l = 4.8hor = rt x20r - lft x20l;
y10r - y10l = 3ver = y20r - y20l;
y10l = y2l - 8ver;
bot y20l= -d; 

serif(normal,2,3r,3l,serifheight);
filldraw
z2r---z3r..tension .8 ..{down}z4r..z5r{dir -100}
..z6r..{z7r-z6r}z7r{down}..{down}z8r..z9..z8l..
tension 1 and 4 ..z7l{z6l-z7l}
..z6l..z5l..tension 1.3 ..z4l..z3l{left}---z2l--cycle;
filldraw
z10r--z20r{down}..z20l..z20l--z10l{up}..z10r..cycle;

penlabels(1,2,3,4,5,6,7,8,9,10,20);
endchar;


mybeginchar("resh",0.72);
penpos2(thick,90); penpos3(whatever,75);
penpos5(3.8hor,0);
penpos6(whatever,0);

pickup serifpen;
lft x2d = leftend;
pickup softpen;
rt x5r = rightend - .3hor;
top y2r = top y3r = h;	y2l = y3l;
y5 = y3l-6ver;
x5 =  x3 + 6hor;
z4l = (.8[x3l,x5l], .3[y3l,y5l]);
z4r = (.85[x3r,x5r], .3[y3r,y5r]);
x6l = x5l;
x6r = x5r;
y6 = 3ver;
x7 = x6l - .5hor; 
bot y7 = -0.2ver;

serif(normal,2,3r,3l,serifheight);
filldraw
z2r{right}..{right}z3r..z4r...{dir -(90-3)}z5r..{dir -(90+3)}z6r..z7..
z7..{dir (90-5)}z6l..z5l{dir (90+3)}..z4l..z3l{left}..{left}z2l--cycle;
penlabels(1,2,3,4,5,6,7);
endchar;

mybeginchar("shin", 1);
penpos1(1.8hor,0);
penpos7(3.5hor,0);
penpos2(whatever,70);

penpos3(2.5hor,0);
penpos4(2.5hor,0);

penpos5(4hor,180);
penpos6(whatever,100);

lft x1l = leftend + 6hor; 
lft x2l = leftend + 6hor; 
lft x7l = leftend + 2.5hor; 

x3 = 0.5[leftend,rightend] + hor;
x4l= x2r + .5hor;

lft x5l = rightend - 3.5hor;
x6 = rightend - 16hor;

y1 = y3 =  h - .858thick;
y5=y1-7ver;
bot y2l = bot y6l = 0;
y2r - y2l = thick + ver;
y6r - y6l = thick;
y4 = thick - .15ver;
y7 = 23ver;

%the main body:
leftarmangle := -100;
middlearmangle := -110;

path body, middlearm;
body =
z1r..z7r{down}..{dir -53}z2r{dir -53}..tension 2.5 and 10 ..
{z5r-z6r}z6r--z5r--z5l--
z6l{left}...z2l{dir (180-73)}..{up}z7l..z1l--z1r..cycle;
middlearm =
z3r{dir middlearmangle}..z4r..z4r--
z4l..z4l..{dir (180+middlearmangle)}z3l..z3l--.cycle;
filldraw body;
filldraw middlearm;
penlabels(0,9,1,2,3,4,5,6,7,8,11);

%the left edges of the bulbs:
pickup serifpen;
	lft x10d = leftend;
	lft x30	d = rightend - 11.5hor;
	lft x20d = leftend + 15hor;
pickup softpen;

%the left bulb:
penpos10(thick,90); 
penpos11(thick - .3ver,90);
top y10r = h;
rt x12 = lft x10d + 12hor; %????
x12 = x11 + 2.5hor;
y12 = y11l - .3ver;
top y11r = top y10r -.3ver;
portion := .4;
z13 = point portion of body; %  	a point on right edge;

serif(normal,10,11r,11l,serifheight);
filldraw
z10r---z11r{right}..tension 2.0 and infinity ..z12{left}
..z11l..{direction portion of body}z13--z10l--cycle;
penlabels(10,11,12,13);

%the middle bulb:
penpos20(thick,85); 
penpos21(thick - .3ver,85);
top y20r = h;
rt x22 = lft x20d + 11.75hor; %????
top y21r=h -.5ver;
x22 = x21 + 2.5hor; y22 = y21l - .4ver;
portion := .15;
z23r = point portion of middlearm;         % a point on middle edge;
z23l = point (5 - portion) of middlearm;   % a point on middle edge;

serif(normal,20,21r,21l,5/6*serifheight);
filldraw
z20r---z21r{right}..tension 2.0 and infinity ..z22{dir 180}..
z21l{dir -170}..{direction portion of middlearm}z23r---
z23l{direction (5 - portion) of middlearm}..tension 0.75 ..{left}z20l--cycle;
penlabels(20,21,22,23,24);

%the right bulb:
penpos30( .876thick,82); 
penpos32(3.5ver,0);
top y30r = h -.5ver;
y31 = y30r -.5ver;
y32r = y30l - 2ver;
begingroup
save something;
y5l = something[y6l,y32r];	%gives something, which ...
x5l = something[x6l,x32r];	%...determines x32r.
endgroup;		%and thus clear the value of "something".
x31 = x32r - 2hor; 
x34 = x32l - .8hor; y34 = y32l - 2.25ver;

serif(thin,30,31,32l,5/6*serifheight);
filldraw
z30r---z31{right}..tension 0.8 and 5 ..{z5l-z32r}z32r--z5l--
z5r{z5r-z6r}...{dir 30}z34
..z34..z32l..tension 1.2 ..{z30l-z32l}z30l--cycle;
penlabels(30,31,32,33,34);
endchar;


mybeginchar("tav",0.90);
penpos2(thick,90); penpos3(thick,90);
penpos4(3.8hor,0);
penpos5(whatever,0);

penpos7(1.8hor, -90);
penpos8(4.8hor,0);
penpos9(5.3hor,0);

beta := angle(1,5);
penpos11(whatever,beta);

pickup serifpen;
lft x2d = leftend + 5.5hor;
pickup softpen;
rt x4r = rightend - .3hor;
top y2r = top y3r = h;
y4 = y3l - 7ver;
lft x4l =  x3l + 3hor;
x5l = x4l;
x5r = x4r - .5hor;
y5 = 4ver;
x6 = x5l - .5hor; 
bot y6 = -0.3ver;

y7r = y2l;
x7 = leftend + 18hor;
y8 =  thick + 8.7hor; lft x8l = leftend + 8hor;
bot y10 = 0; rt x10 = leftend + 12hor;
y9r = thick + 0.35hor;
lft x9l = leftend + 9hor;

bot y11l = 0;  y11r - y11l = thick;
lft x11l = leftend;

serif(thin,2,3r,3l,serifheight);
filldraw
z2r{right}..{right}z3r..{dir -(90-3)}z4r..{dir -(90+3)}z5r..
{dir 170}z6{up}
..{dir (90-5)}z5l..z4l{dir (90+3)}..z3l{left}..{left}z2l--cycle;
filldraw
z7r{left}..z8r..{dir -75}z9r..tension 1.5 and 1.5 ..{left}z10--
z11l--z11r--z9l{dir 105}..z8l..{dir 0}z7l--cycle;
penlabels(1,2,3,4,5,6,7,8,9,10,11);
endchar;

	if proofing = 0:
font_quad               1em#;
font_normal_space       .33em#;
font_normal_stretch     .15em#;
font_normal_shrink      .1em#;
font_x_height           .33em#;
	fi

ligtable Charcode("yod"):	Charcode("guimel") kern -3hor#;
ligtable Charcode("guimel"):	Charcode("yod")    kern -2hor#;
ligtable Charcode("nun"):	Charcode("yod")    kern -3hor#;



end