% Copyright 1986 Michael Urban
% Everyone is granted permission to copy, modify and redistribute
% this file, provided that a currently-dated copy of this
% copyright notice is included in the copy.
% License is granted to produce fonts based on the information
% in this file, provided that such fonts are redistributed
% without charge to any third party.
% SCCS ID @(#)accents.mf 1.1 10/1/86
def centerpt=
(w-((w-leadgap)/2), xht+3.2thin)
enddef;
beginchar (18, shortwidth, cap#, 0); "The grave accent";
begingroup;
save x,y;
pickup elvishpen;
z0 = centerpt;
top y1=h; %z1-z0=whatever*(dir tilt);
lft x1 = leadgap;
draw z0--z1;
endgroup;
endchar;
beginchar (19, shortwidth, cap#, 0); "The acute accent";
begingroup;
save x,y;
pickup elvishpen;
z0 = centerpt;
top y1=h; %z1-z0=whatever*(dir tilt);
rt x1 = w;
draw z0--z1;
endgroup;
endchar;
beginchar (20, shortwidth, cap#, 0); "The check accent";
begingroup;
save x,y;
pickup elvishpen;
z0 = centerpt;
top y1=h;
rt x1 = w;
top y2=h;
lft x2 = leadgap;
draw z2--z0--z1;
endgroup;
endchar;
beginchar (21, shortwidth, cap#, 0); "The scoop accent";
begingroup;
save x,y;
pickup elvishpen;
z0 = centerpt;
top y1=h;
rt x1 = w;
top y2=h;
lft x2 = leadgap;
draw z2..z0..z1;
endgroup;
endchar;
beginchar ("^", shortwidth, cap#, 0); "The character ^";
begingroup;
save x,y;
pickup elvishpen;
x0 = w-((w-leadgap)/2);
y0 = xht;
rt x1 = w;
y1 = xht+3.2thin;
y2= y1;
lft x2 = leadgap;
draw z2--z0--z1;
endgroup;
endchar;
beginchar ("}", shortwidth, cap#, 0); "The double acute accent";
begingroup;
save x,y;
pickup elvishpen;
z0 = centerpt;
top y1=h; %z1-z0=whatever*(dir tilt);
rt x1 = w;
draw z0--z1;
draw ((z0--z1) shifted (2.5*thin*right));
endgroup;
endchar;
beginchar ("_", shortwidth, cap#, 0); "The dot-above accent (i)";
begingroup;
save x,y;
pickup pensquare scaled thick rotated 45;
z0 = centerpt;
drawdot z0;
endgroup;
endchar;
beginchar (127, shortwidth, cap#, 0); "The umlaut accent (double i)";
begingroup;
save x, y;
pickup pensquare scaled thick rotated 45;
z0 = centerpt;
z1 = z0 + thick*left;
z2 = z0 + thick*right;
drawdot z1; drawdot z2;
endgroup;
endchar;
beginchar ("`", shortwidth, cap#, 0); "The character `";
begingroup;
save x,y, rightcurl;
path rightcurl;
pickup elvishpen;
z0 = centerpt;
top y1=h; x1 = .7[x0, w];
rt x2=w; y2 = .7[y0, h];
x3 = .8[x0,w]; y1-y2 = y2-y3;
rightcurl = (z0..tension 2.0..z1{right}..z2..z3);
draw rightcurl;
endgroup;
endchar;
beginchar ("\\", shortwidth, cap#, 0); "left quote";
begingroup;
save x,y, rightcurl;
path rightcurl;
pickup elvishpen;
z0 = centerpt;
top y1=h; x1 = .7[x0, w];
rt x2=w; y2 = .7[y0, h];
x3 = .8[x0,w]; y1-y2 = y2-y3;
rightcurl = (z0..tension 2.0..z1{right}..z2..z3);
draw rightcurl;
draw (rightcurl shifted (3*thin,0));
endgroup;
endchar;
beginchar ("'", shortwidth, cap#, 0); "The character '";
begingroup;
save x,y;
pickup elvishpen;
z0 = centerpt;
lft x1 = 1/3[leadgap, x0]; top y1 = 3/4[y0,h];
top y2 = h; x2 = x0;
y3 = y1; x3-x0 = x0-x1;
draw z1..z2{right}..z0{down};
endgroup;
endchar;
beginchar (oct"042", shortwidth, cap#, 0); "The right quote";
begingroup;
save x,y, leftcurl;
path leftcurl;
pickup elvishpen;
z0 = centerpt;
lft x1 = 1/3[leadgap, x0]; top y1 = 3/4[y0,h];
top y2 = h; x2 = x0;
y3 = y1; x3-x0 = x0-x1;
leftcurl = (z1..z2{right}..z0{down});
draw leftcurl;
draw leftcurl shifted ((x1-x0)*right);
endgroup;
endchar;
beginchar (22, shortwidth, .5[xht#,cap#], 0); "Short top bar";
begingroup;
save x,y;
pickup elvishpen;
lft x0 = leadgap; rt x1 = w;
y0=y1=h;
draw z0--z1;
endgroup;
endchar;