#!/bin/csh -f
# need csh because of foreach used for running gftopk
#
# mk_musixtexT.58 METAFONTMODE
#
# This shell script is part of the makefonts package, which is a set of
# shell scripts used for running metafont to generate fonts (tfm and pk
# files) for use with TeX/LaTeX.
# Please refer to the makefonts README file.
# Volker Kuhlmann
#

echo "\
This script runs metafont and gftopk to produce the \
following fonts / family / shapes:\
\
  *********************************************************\
  musixtex T.58\
  *********************************************************\
\
Give metafont mode as first argument (default = localfont)\
\
Michael Cree, Volker Kuhlmann\
    15, 21 Mar 95; 20,24 Sep 96\
v.kuhlmann@elec.canterbury.ac.nz\
"


# CHANGELOG
#
# 24 Sep 96 (VK)
#	Corrected and added some comments.
# 20 Sep 96 (VK)
#	Updated for musixtex T.58.
# 21 Mar 95 (VK)
#	Updated for musixtex 0.631.
# 15 Mar 95 (VK)
#	Created for musixtex 0.63.


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;'


# musixtex fonts
mf "$MFARG"' \mag=magstep(0);'		input musix11
mf "$MFARG"' \mag=magstep(0);'		input musix13
mf "$MFARG"' \mag=magstep(0);'		input musix16
mf "$MFARG"' \mag=magstep(0);'		input musix20
#
mf "$MFARG"' \mag=magstep(0);'		input musixsps
mf "$MFARG"' \mag=magstep(0);'		input musixspx
#
mf "$MFARG"' \mag=magstep(0);'		input xsld11
mf "$MFARG"' \mag=magstep(0);'		input xsld13
mf "$MFARG"' \mag=magstep(0);'		input xsld16
mf "$MFARG"' \mag=magstep(0);'		input xsld20
#
mf "$MFARG"' \mag=magstep(0);'		input xslhd11
mf "$MFARG"' \mag=magstep(0);'		input xslhd13
mf "$MFARG"' \mag=magstep(0);'		input xslhd16
mf "$MFARG"' \mag=magstep(0);'		input xslhd20
#
mf "$MFARG"' \mag=magstep(0);'		input xslhu11
mf "$MFARG"' \mag=magstep(0);'		input xslhu13
mf "$MFARG"' \mag=magstep(0);'		input xslhu16
mf "$MFARG"' \mag=magstep(0);'		input xslhu20
#
mf "$MFARG"' \mag=magstep(0);'		input xslhz20
#
mf "$MFARG"' \mag=magstep(0);'		input xslu11
mf "$MFARG"' \mag=magstep(0);'		input xslu13
mf "$MFARG"' \mag=magstep(0);'		input xslu16
mf "$MFARG"' \mag=magstep(0);'		input xslu20
#
mf "$MFARG"' \mag=magstep(0);'		input xslz20
#
mf "$MFARG"' \mag=magstep(0);'		input xtie20


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 your tfm directory"
echo "  copy all .pk-files into your pk-directory"
echo "  delete all .gf files."
echo ""
echo "Have a nice day."
echo ""