function setfont (varargin);

% usage setfont (pointsize, fonttype)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% setfont.m                                     %
% written 2/24/00 by ben olding                 %
% this function changes the font                %   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Requires: al.m

global PSText PSComment

% PS commands used --
% findfont : find the definition of a PostScript font
% scalefont: set the size of the font
% setfont  : make font the current font

v=length(varargin);
if v>=1,
  ptsize=num2str(varargin{1});
else
  ptsize='10';
end;
if v>=2,
  fonttype=varargin{2};
else
  fonttype = 'Courier';
end;

al (['/',fonttype,' findfont'],['% get the font']);
al ([ptsize,' scalefont'],     ['% scale font to ',ptsize,' points']);
al (['setfont'],               ['% make it the current font']);