🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #11364

Re: How to regenerate all the MetaFont fonts?

#11364
From: rusty wright
Date: Wed, 28 Feb 1990 18:56
262 lines
6406 bytes
Well, since we're posting, here's Jeff McCarrell's:

Here are 4 files; gen_cm, gen_latex, gen_slitex, and mfgen.  mfgen is
the driver, the other 3 tell it what to generate and at what magsteps.
The primary headache with mfgen is if it bombs in the middle of one of
the gen_ files it isn't easy to restart because it always wants to
start from scratch.  That shouldn't be to hard to fix though.

===> mfgen <===
#! /bin/sh
#
#  Create a set of related fonts given a parameter file as input using
#  Metafont.  
#
#  Jeff McCarrell, 12/86.  Based on ideas from Rusty Wright.
#  Univ. California at Berkeley.
#
#

MFINPUTS=${MFINPUTS-`pwd`/src}
export MFINPUTS

case $# in
0)	echo "`basename $0`: <-m mode> <-o {pxl,pk,gf}> <-d dir> parameter_file" ;
	exit 1 ;;
esac

while test $# -gt 0; do
	case $1 in
	-m)	shift
		case $1 in
		-*)	echo "garbled mode (-m): $1" ; exit 2
			;;
		*)	 mode=$1
			;;
		esac
		;;
	-o)	shift
		case $1 in
		pxl|pk|gf)	otype=$1
			;;
		-*)	echo "garbled output type (-o) $1" ; exit 2
			;;
		*)	echo "unknown output type $1" ; exit 2
			;;
		esac
		;;
	-d)	shift
		case $1 in
		-*)	echo "garbled root dir (-d) $1" ; exit 2
			;;
		*)	rootdir=$1
			;;
		esac
		;;
	*)	pfile=$1			# must be a filename.
		;;
	esac
	shift
done

pfile=${pfile?"Usage: must specify a parameter file"}
otype=${otype-gf}
mode=${mode-localfont}
rootdir=${rootdir-$mode}

#
#  Now that all the variables are in known states, set up the directory
#  structure.
#

if test ! -d ${rootdir}
then
mkdir $rootdir 1>&2 || { echo "couldn't make root directory $rootdir"; exit 4; }
fi

for f in gf log tfm ; do
	if test ! -d ${rootdir}/${f}
	then
	mkdir ${rootdir}/$f 1>&2 || { echo "couldn't make $f dir"; exit 4; }
	fi
done

case $otype in
pk|pxl)
	if test ! -d ${rootdir}/${otype}
	then
	mkdir ${rootdir}/$otype 1>&2 || { echo "couldn't make $otype dir"; exit 4; }
	fi
	;;
esac

cp $pfile ${rootdir}/gf/$pfile
cd ${rootdir}/gf
trap 'rm -f $pfile; exit 1' 1 2 15

#
# we do the actual Metafont runs inside the gf directory.
#
# We redirect the entire sequence of commands that parse the command file
# and call Metafont so we can use the shell builtin read to give the
# arguments in an easy-to-handle manner.
#

{ while read name sizes ; do
	case $name in
	*:*)	set `echo $name | sed "s/\(.*\):\(.*\)/\1 \2/"`
		test -z "$1" && test -z "$2" && { echo "garbled name/mode: $name"; exit 6; }
		name=$1; xmode=$2
		;;
	*)	xmode=$mode
		;;
	esac
	for size in $sizes ; do
		case $size in
		@*)	set `echo $size | sed "s/@\(.*\)/\1/"`
			size=$1
			;;
		*)	size="magstep ${size}"
			;;
		esac

		mf "\\mode:=${xmode}; mag:=${size}; scrollmode; input $name "
		mv *tfm ../tfm ; mv *log ../log
	done

	case $otype in
	pk|pxl)	for f in ${name}.*gf ; do
			gfto$otype $f
			rm $f
		done
		mv *$otype ../$otype
		;;
	esac

done } < $pfile

rm -f $pfile

exit 0

===> gen_cm <===
cmb10		0	0.5	1	2
cmbsy10		0	0.5	1	2
cmbx10		0	0.5	1	2	3	4	5
cmbx12		0	0.5	1	2
cmbx5		0	0.5	1	2
cmbx6		0	0.5	1	2
cmbx7		0	0.5	1	2
cmbx8		0	0.5	1	2
cmbx9		0	0.5	1	2
cmbxsl10	0	0.5	1	2
cmbxti10	0	0.5	1	2
cmcsc10		0	0.5	1	2	3	4	5
cmdunh10	0	0.5	1	2
cmex9		0	0.5	1	2
cmex10		0	0.5	1	2
cmff10		0	0.5	1	2
cmfi10		0	0.5	1	2
cmfib8		0	0.5	1	2
cminch		0	0.5	1	2
cmitt10		0	0.5	1	2
cmmi10		0	0.5	1	2	3	4	5
cmmi12		0	0.5	1	2
cmmi5		0	0.5	1	2
cmmi6		0	0.5	1	2
cmmi7		0	0.5	1	2
cmmi8		0	0.5	1	2
cmmi9		0	0.5	1	2
cmmib10		0	0.5	1	2
cmr10		0	0.5	1	2	3	4	5
cmr12		0	0.5	1	2
cmr17		0	0.5	1	2
cmr5		0	0.5	1	2
cmr6		0	0.5	1	2
cmr7		0	0.5	1	2
cmr8		0	0.5	1	2
cmr9		0	0.5	1	2
cmsl10		0	0.5	1	2	3	4	5
cmsl12		0	0.5	1	2
cmsl8		0	0.5	1	2
cmsl9		0	0.5	1	2
cmsltt10	0	0.5	1	2
cmss10		0	0.5	1	2	3	4	5
cmss12		0	0.5	1	2
cmss17		0	0.5	1	2
cmss8		0	0.5	1	2
cmss9		0	0.5	1	2
cmssbx10	0	0.5	1	2
cmssdc10	0	0.5	1	2
cmssi10		0	0.5	1	2
cmssi12		0	0.5	1	2
cmssi17		0	0.5	1	2
cmssi8		0	0.5	1	2
cmssi9		0	0.5	1	2
cmssq8		0	0.5	1	2
cmssqi8		0	0.5	1	2
cmsy10		0	0.5	1	2	3	4	5
cmsy5		0	0.5	1	2
cmsy6		0	0.5	1	2
cmsy7		0	0.5	1	2
cmsy8		0	0.5	1	2
cmsy9		0	0.5	1	2
cmtcsc10	0	0.5	1	2
cmtex10		0	0.5	1	2
cmtex8		0	0.5	1	2
cmtex9		0	0.5	1	2
cmti10		0	0.5	1	2	3	4	5
cmti12		0	0.5	1	2
cmti7		0	0.5	1	2
cmti8		0	0.5	1	2
cmti9		0	0.5	1	2
cmtt10		0	0.5	1	2	3	4	5
cmtt12		0	0.5	1	2
cmtt8		0	0.5	1	2
cmtt9		0	0.5	1	2
cmu10		0	0.5	1	2
cmvtt10		0	0.5	1	2

===> gen_latex <===
lcircle10	0     0.5  1     2     3     4     5
lcirclew10	0     0.5  1     2     3     4     5
lasy10		0     0.5  1     2     3     4     5
lasy5		0     0.5  1     2
lasy6		0     0.5  1     2
lasy7		0     0.5  1     2
lasy8		0     0.5  1     2
lasy9		0     0.5  1     2
lasyb10		0     0.5  1     2     3     4     5
line10		0     0.5  1     2     3     4     5
linew10		0     0.5  1     2     3     4     5
ilasy8		0     0.5  1     2
ilcmss8		0     0.5  1     2
ilcmssb8	0     0.5  1     2
ilcmssi8	0     0.5  1     2
icmex10		0     0.5  1     2
icmmi8		0     0.5  1     2
icmsy8		0     0.5  1     2
icmtt8		0     0.5  1     2

===> gen_slitex <===
cmex10		3
cmmi8		3 4 5 @2.986 @3.583 @4.3
cmsy8		3 4 5 @2.986 @3.583 @4.3
cmtt8		3 4 5 @2.986 @3.583 @4.3
icmex10		3
icmmi8		3 4 5 @2.986 @3.583 @4.3
icmsy8		3 4 5 @2.986 @3.583 @4.3
icmtt8		3 4 5 @2.986 @3.583 @4.3
ilasy8		3 4 5 @2.986 @3.583 @4.3
ilcmss8		3 4 5 @2.986 @3.583 @4.3 @5.16
ilcmssb8	3 4 5 @2.986 @3.583 @4.3
ilcmssi8	3 4 5 @2.986 @3.583 @4.3
lasy8		3 4 5 @2.986 @3.583 @4.3
lcmss8		3 4 5 @2.986 @3.583 @4.3 @5.16
lcmssb8		3 4 5 @2.986 @3.583 @4.3
lcmssi8		3 4 5 @2.986 @3.583 @4.3
--

--------------------------------------
	rusty c. wright
	rusty@violet.berkeley.edu ucbvax!violet!rusty
Technical Details
Message-ID: <RUSTY.90Feb28105628@garnet.berkeley.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!mips!apple!bionet!agate!ucbvax!rusty
References: <1990Feb27.172651.21549@jarvis.csri.toronto.edu> <1990Feb28.012522.828@cs.rochester.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!mips!apple!bionet!agate!ucbvax!rusty
From: rusty@garnet.berkeley.edu (rusty wright)
Newsgroups: comp.text.tex
Subject: Re: How to regenerate all the MetaFont fonts?
Message-ID: <RUSTY.90Feb28105628@garnet.berkeley.edu>
Date: 28 Feb 90 18:56:28 GMT
References: <1990Feb27.172651.21549@jarvis.csri.toronto.edu>
 <1990Feb28.012522.828@cs.rochester.edu>
Sender: usenet@ucbvax.BERKELEY.EDU
Organization: /garnet_a/rusty/.organization
Lines: 262
In-reply-to: ken@cs.rochester.edu's message of 28 Feb 90 01:25:22 GMT