🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #11274

Re: How to regenerate all the MetaFont fonts?

#11274
From: Ken Yap
Date: Wed, 28 Feb 1990 01:25
143 lines
4286 bytes
Here are the shell scripts I use on Unix to generate a script.
Or you can extract the fontname and magnification information
encoded within.

#!/bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #!/bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	genfonts
#	magpk
# This archive created: Tue Feb 27 20:19:57 1990
# By:	Ken Yap ()
export PATH; PATH=/bin:$PATH
echo shar: extracting "'genfonts'" '(2250 characters)'
if test -f 'genfonts'
then
	echo shar: over-writing existing file "'genfonts'"
fi
cat << \SHAR_EOF > 'genfonts'
#!/bin/sh

# cmmf is usually just an alias for mf
# cmbase.mf must be accessible when making TeX fonts

# basic fonts in magsteps 0 through 5 and 0.5

for font in cmb10 cmbx10 cmbx5 cmbx7 cmcsc10 cmex10 cmmi10 cmmi5 cmmi7 \
	cmr10 cmr5 cmr7 cmsl10 cmss10 cmssbx10 cmsy10 cmsy5 cmsy7 cmti10 cmtt10
do
	for magstep in 0 0.5 1 2 3 4 5
	do
		res=`magpk $magstep`
		echo "cmmf '\mode=localfont; \mag=magstep$magstep; \batchmode;' input $font"
		echo gftopk $font.${res}gf
		echo rm $font.${res}gf
	done
done

# other fonts only in magsteps 0, 0.5 and 1

for font in cmbsy10 cmbx12 cmbx6 cmbx7 cmbx8 cmbx9 cmbxsl10 cmbxti10 \
	cmdunh10 cmff10 cmfi10 cmfib8 cmitt10 cmmi12 cmmi6 cmmi8 cmmi9 \
	cmmib10 cmr12 cmr17 cmr6 cmr8 cmr9 cmsl12 cmsl8 cmsl9 cmsltt10 \
	cmss12 cmss17 cmss8 cmss9 cmssdc10 cmssi10 cmssi12 cmssi17 \
	cmssi8 cmssi9 cmssq8 cmssqi8 cmsy6 cmsy8 cmsy9 cmtcsc10 cmtex10 \
	cmtex8 cmtex9 cmti12 cmti7 cmti8 cmti9 cmtt12 cmtt8 cmtt9 cmu10 \
	cmvtt10
do
	for magstep in 0 0.5 1
	do
		res=`magpk $magstep`
		echo "cmmf '\mode=localfont; \mag=magstep$magstep; \batchmode;' input $font"
		echo gftopk $font.${res}gf
		echo rm $font.${res}gf
	done
done

# specials

for magstep in 0 0.5 1
do
	res=`magpk $magstep`
	echo "cmmf '\mode=localfont; \mag=magstep$magstep; \batchmode;' input logo10"
	echo gftopk logo10.${res}gf
	echo rm logo10.${res}gf
done

echo "cmmf '\mode=localfont; \mag=magstep0; \batchmode;' input cminch"
echo gftopk cminch.300gf
echo rm cminch.300gf

# LaTeX fonts

for font in lasy10 lasy5 lasy7 lasyb10
do
	for magstep in 0 0.5 1 2 3 4 5
	do
		res=`magpk $magstep`
		echo "cmmf '\mode=localfont; \mag=magstep$magstep; \batchmode;' input $font"
		echo gftopk $font.${res}gf
		echo rm $font.${res}gf
	done
done

# These fonts should not use cmbase

for font in circle10 circlew10 line10 linew10
do
	for magstep in 0 0.5 1 2 3 4 5
	do
		res=`magpk $magstep`
		echo "mf '\mode=localfont; \mag=magstep$magstep; \batchmode;' input $font"
		echo gftopk $font.${res}gf
		echo rm $font.${res}gf
	done
done

for font in lasy6 lasy8 lasy9
do
	for magstep in 0 0.5 1
	do
		res=`magpk $magstep`
		echo "cmmf '\mode=localfont; \mag=magstep$magstep; \batchmode;' input $font"
		echo gftopk $font.${res}gf
		echo rm $font.${res}gf
	done
done
SHAR_EOF
if test 2250 -ne "`wc -c 'genfonts'`"
then
	echo shar: error transmitting "'genfonts'" '(should have been 2250 characters)'
fi
chmod +x 'genfonts'
echo shar: extracting "'magpk'" '(223 characters)'
if test -f 'magpk'
then
	echo shar: over-writing existing file "'magpk'"
fi
cat << \SHAR_EOF > 'magpk'
#!/bin/sh
case $1 in
	0.5) echo 329 ;;
	0) echo 300 ;;
	1) echo 360 ;;
	2) echo 432 ;;
	3) echo 518 ;;
	4) echo 622 ;;
	5) echo 746 ;;
	6) echo 896 ;;
	7) echo 1075 ;;
	8) echo 1290 ;;
	9) echo 1548 ;;
	*) echo 000 ;;
esac
SHAR_EOF
if test 223 -ne "`wc -c 'magpk'`"
then
	echo shar: error transmitting "'magpk'" '(should have been 223 characters)'
fi
chmod +x 'magpk'
#	End of shell archive
exit 0
Technical Details
Message-ID: <1990Feb28.012522.828@cs.rochester.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!sunybcs!uhura.cc.rochester.edu!rochester!ken
References: <1990Feb27.172651.21549@jarvis.csri.toronto.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!sunybcs!uhura.cc.rochester.edu!rochester!ken
From: ken@cs.rochester.edu (Ken Yap)
Newsgroups: comp.text.tex
Subject: Re: How to regenerate all the MetaFont fonts?
Message-ID: <1990Feb28.012522.828@cs.rochester.edu>
Date: 28 Feb 90 01:25:22 GMT
References: <1990Feb27.172651.21549@jarvis.csri.toronto.edu>
Reply-To: ken@cs.rochester.edu
Organization: University of Rochester Computer Science Department
Lines: 143
Address: Rochester, NY 14627, (716) 275-1448