% file cbgreek.mf version 1.2  1998/10/29
% Copyright 1997, 1999 Claudio Beccari
% It extracts the design size from the font name and calls the suitable
% general parameter file for the specified font
%
% The file is acttually called twice; the first time by the font driver file
% the second time by the general parameter  font file after all parameters
% have been determined with respect to the design size.

if known gensize:
  message "Generating glyphs";
  mode_setup; 
  font_setup;
    readfrom("cbaccent");
    readfrom("cbupper");
    readfrom("cblower");
    readfrom("cbdigits");
    readfrom("cbpunct");
  boundarychar:=oct"375";
  if small_caps: 
    readfrom("cbligsc"); 
  elseif monospace: 
    readfrom("cbligtt");
  elseif cursive:
    readfrom("cbligit");
  else: 
    readfrom("cblig"); 
  fi
  font_slant slant; font_x_height x_height#;
  if monospace: font_normal_space 9u#; % no stretching or shrinking
   font_quad 18u#;
   font_extra_space 9u#;
  else: font_normal_space 6u#+2letter_fit#;
   font_normal_stretch 3u#; font_normal_shrink 2u#;
   font_quad 18u#+4letter_fit#;
   font_extra_space 2u#;
  fi
  let maybe_execute=relax;
else:
  message "Computing gensize from file name";
  string f_name, f_size;
  f_name:=substring(0,4) of jobname;
  f_size:=substring(4,8) of jobname;
  scantokens("gensize:="&f_size&"/100");
  def maybe_execute = scantokens("input "&f_name) enddef;
fi
maybe_execute;
bye.
