# This script file makes a new TeX PK font, because one wasn't
# found. Parameters are:
# name dpi bdpi magnification [mode]
# `name' is the name of the font, such as `cmr10'. `dpi' is
# the resolution the font is needed at. `bdpi' is the base
# resolution, useful for figuring out the mode to make the font
# in. `magnification' is a string to pass to MF as the
# magnification. `mode', if supplied, is the mode to use.
# Note that this file must execute Metafont, and then gftopk,
# and place the result in the correct location for the PostScript
# driver to find it subsequently. If this doesn't work, it will
# be evident because MF will be invoked over and over again.
# Of course, it needs to be set up for your site.
# TEMPDIR needs to be unique for each process because of the possibility
# of simultaneous processes running this script.
if test "$MODE" = ""
if test $BDPI = 300
elif test $BDPI = 400
elif test $BDPI = 100
elif test $BDPI = 635
elif test $BDPI = 1270
elif test $BDPI = 2540
echo "I don't know the mode for $BDPI"
echo "Have your system admin update MakeTeXPK"
# Something like the following is useful at some sites.
# Clean up on normal or abnormal exit
trap "cd /; rm -rf $TEMPDIR $DESTDIR/pktmp.$$" 0 1 2 15
if test -r $DESTDIR/$PKNAME
echo "$DESTDIR/$PKNAME already exists!"
# check also in the standard place
if test -r /usr/lib/tex/fonts/pk/$PKNAME
echo /usr/lib/tex/fonts/pk/$PKNAME already exists!
echo mf "\mode:=$MODE; mag:=$MAG; scrollmode; input $NAME" \\\ mf "\mode:=$MODE; mag:=$MAG; scrollmode; input $NAME" if test ! -r $GFNAME
echo "Metafont failed for some reason on $GFNAME"
gftopk $GFNAME $PKNAME
# Install the PK file carefully, since others may be doing the same
# as us simultaneously.
mv $PKNAME $DESTDIR/pktmp.$$
mv pktmp.$$ $PKNAME