% more-or-less general slant font generator for GFtoDVI

% the calling file should set the font←identifier and
%    n = number of characters
%    s = slant ratio
%    r# = rule thickness (in sharp units)
%    u = vertical unit (in pixels)

if unknown mag: mag := 1;
elseif (mag<1) or (mag<>floor mag):
 errmessage "Sorry, mag must be a positive integer"; mag := 1; fi

mg := mag; mag := 1; mode←setup; u# := u*72.27/pixels←per←inch;
pixels←per←inch := pixels←per←inch*mg; fix←units;

define←whole←pixels(u); define←blacker←pixels(r);
pickup pencircle scaled r; ruler := savepen;

for k=1 upto n:
 beginchar(k,k*u#*s,n*u#,0);
 pickup ruler; draw origin--(k*u*s,k*u);
 unfill (lft-1,bot -1)--(rt 1,bot -1)
  --(rt 1,0)--(lft-1,0)--cycle;
 unfill ((lft -1,0)--(rt 1,0)
  --(rt 1,top 1)--(lft -1,top 1)--cycle) shifted (k*u*s,k*u);
 endchar; endfor

font←size 16pt#;
font←slant s;
fontdimen 8: r#;
font←coding←scheme "GFSLANT";
bye.