From: tdunbar@vtaix.cc.vt.edu (Thomas Dunbar) Subject: MakeTeXPK script that copies tfm file also Date: 19 Apr 1993 14:28:08 GMT
> Date: Sun, 18 Apr 93 20:27 EDT
> From: gamble!nigel@uunet.UU.NET (Nigel Gamble)
>
> I've just noticed that the font metrics files don't seem to be output
> when Metafont is run on my installation (plain SLS t1-t3 downloaded a
>couple of weeks ago). I see the message `Font metrics written on llogo.tfm.',
> but the file llogo.tfm has not been changed. I had copied a random *.tfm
> file to llogo.tfm in order the generate the recently posted Linux logo
> from the Metafont source. According to the instructions, running xdvi
> would invoke Metafont to generate the fonts and the correct llogo.tfm
> file. However, llogo.tfm was not touched. I deleted it and tried again,
> but no llogo.tfm was created. I have also noticed that existing
> tfm files are not touched when other fonts are being generated, even
> though the pk files are created OK.
>
> Can you offer any suggestions on how this can be fixed?
Metafont is making the tfm file but your MakeTeXPK script (which xdvi
calls) isnt copying it. i thought the MakeTeXPK i use was in the t?
distribution. anyway, use this:
#!/bin/sh
#MakeTeXPK 17 APR 93 tdunbar@vtaix.cc.vt.edu
TEXDIR=/usr/TeX/lib/tex
LOCALDIR=/usr/TeX/lib/tex
DESTDIR=$LOCALDIR/fonts
if test "$TMPDIR" = ""
then
TEMPDIR=/tmp/mtpk.$$
else
TEMPDIR=$TMPDIR/mtpk.$$
fi
NAME=$1
DPI=$2
BDPI=$3
MAG=$4
MODE=localfont
GFNAME=$NAME.$DPI'gf'
PKNAME=$NAME.$DPI'pk'
TFMNAME=$NAME.'tfm'
trap "cd /; /bin/rm -rf $TEMPDIR $DESTDIR/pktmp.$$" 0 1 2 15
if test ! -d $DESTDIR
then
mkdir $DESTDIR
fi
if test "$6" != ""
then
DESTDIR=$DESTDIR"$6"
if test ! -d $DESTDIR
then
mkdir $DESTDIR
fi
fi
mkdir $TEMPDIR
cd $TEMPDIR
if test -r $DESTDIR/$PKNAME
then
echo "$DESTDIR/$PKNAME already exists!"
exit 0
fi
if test "$6" = ""
then
if test -r $TEXDIR/fonts/$PKNAME
then
echo $TEXDIR/fonts/$PKNAME already exists!
exit 0
fi
else
if test -r $TEXDIR/fonts/$6"$PKNAME"
then
echo $TEXDIR/fonts/$6"$PKNAME" already exists!
exit 0
fi
fi
echo "mf \"\\mode:=$MODE; mag:=$MAG; scrollmode; input $NAME\" <
/dev/null"
mf "\mode:=$MODE; mag:=$MAG; scrollmode; input $NAME" < /dev/null
if test ! -r $GFNAME
then
echo "Metafont failed for some reason on $GFNAME"
exit 1
fi
gftopk -v ./$GFNAME ./$PKNAME
mv $PKNAME $DESTDIR/pktmp.$$
mv $TFMNAME $DESTDIR/pktmptfm.$$
cd $DESTDIR
mv pktmp.$$ $PKNAME
mv pktmptfm.$$ $TFMNAME
exit 0