Problem with \installfont in fontinst 1.8

Ulrik Vieth vieth@thphy.uni-duesseldorf.de
Tue, 14 Jul 1998 11:18:54 +0200


> I've just downloaded fontinst 1.8 from CTAN and tried this:

> \input fontinst.sty
> \installfonts
> \installfamily{OT1}{cmrod}{\hyphenchar\font45 }
>        \installfont {cmrod10} {cmr10, cmmi10,dostretch} {OT19}
>                     {OT1} {cmrod}{m}{n} {<10> <10.95>}
> \endinstallfonts

> The directory containing the above file also contains:

> cmcsc10.pl
> cmcsc8.pl
> cmcsc9.pl
> dostretch.mtx

Does it contain cmr10.pl and cmmi10.pl?  Probably not, I guess.

(Alan's fontinst-1.335 came with a directory full of .pl files for
standard fonts, but I omitted that because they can be generated
whenever you need them.)

> Now...  The fontinst documentation says that the second argument to
> \installfont should refer to afm, mtx, or pl files.  What I get from
> fontinst is this:

> ! I can't find file `cmr10.mtx'.

> which implies that it no longer looks for anything but mtx files.
> Can anyone explain what's going on, and what should be done about it?

Actually, fontinst does the following:

\def\input_mtx_file#1{
   \if\relax#1\relax\else
      \get_file_name #1~scaled~1000~;
      \if_file_exists{\file_name.mtx}\then
         \inputmtx\file_name
      \else
         \if_file_exists{\file_name.pl}\then
               \pltomtx\file_name\file_name
         \else
            \if_file_exists{\file_name.afm}\then
               \afmtomtx\file_name\file_name
               \mtxtopl\file_name\file_name
            \fi
         \fi
         \inputmtx\file_name
      \fi
   \fi
}

- it first looks if a cmr10.mtx already exists, and if so, it uses
  that file 

- if not, it looks a .pl file cmr10.pl and runs \pltomtx on the file,
  creating a cmr10.mtx

- otherwise, it looks for an .afm file cmr10.afm and runs \afmtomtx 
  on that file, creating cmr10.mtx

- finally, it tries to load cmr10.mtx again, assuming that it has been
  created in one of the preceedings steps

Conclusion: If you have neither a .pl file nor an .afm for the file
you requested, fontinst will trigger a low-level error when trying to
load an .mtx file.  If you want to do something fancy using CM fonts,
you have to make sure to generate the required .pl files with tftopl.

Cheers, Ulrik.