#!/bin/csh -f
# need csh because of foreach used for running gftopk

echo "\
This script runs metafont and gftopk to produce the \
following fonts / family / shapes:\
\
  *********************************************************\
  cm-extra-bold (CTAN:fonts/cm/mf-extra/bold/)\
  *********************************************************\
\
Give metafont mode as first argument (default = localfont)\
\
Volker Kuhlmann\
    1 Jan 95; 8 Apr 95; 8 Apr 96\
v.kuhlmann@elec.canterbury.ac.nz\
"


# CHANGELOG
#
# 8 Apr 96 (VK)
#	Added \scrollmode. Fixed docs.
# 8 Apr 95 (VK)
#	Metafont mode can now be given as $1.


if ( $#argv > 0 ) set MODE=$1
if ( ! $?MODE ) set MODE=localfont
echo ""
echo "**********************************"
echo 'metafont mode is set to: '$MODE
echo "**********************************"
echo ""

set MFARG='\mode='"$MODE"'; \scrollmode;'


# COMPUTER MODERN EXTRA BOLD
cmmf "$MFARG"' \mag=magstep(0);'	input cmbcsc10

cmmf "$MFARG"' \mag=magstep(0);'	input cmbtex10

cmmf "$MFARG"' \mag=magstep(0);'	input cmbtt8
cmmf "$MFARG"' \mag=magstep(0);'	input cmbtt9
cmmf "$MFARG"' \mag=magstep(0);'	input cmbtt10

cmmf "$MFARG"' \mag=magstep(0);'	input cmttb10

cmmf "$MFARG"' \mag=magstep(0);'	input cmexb10


echo ""
echo "Metafont finished."
echo ""



echo "Now running GFtoPK."

# note this requires csh or tcsh
foreach file (*gf)
  gftopk $file
end

echo "GFtoPK finished."
echo ""

echo ""
echo "To complete the font installation, do the following:"
echo "  copy all .tfm-files into the tfm directory"
echo "  copy all .pk-files into the pk-directory"
echo "  delete all .gf files."
echo ""
echo "Have a nice day."
echo ""