home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # Howdy! We make fonts.
- #
- echo "Welcome to font maker. Hold on a second while I make some"
- echo "temporary files . . ."
- cd /tmp
- rm -f queue
- cat >basic.set <<EOF
- cmbx10 cmbx5 cmbx7 cmex10 cmmi10 cmmi5 cmmi7 cmr10
- cmr5 cmr7 cmsl10 cmsy10 cmsy5 cmsy7 cmti10 cmtt10
- EOF
- cat >full.set <<EOF
- circle10 circlew10 cmb10 cmbsy10 cmbx10 cmbx12 cmbx5 cmbx6
- cmbx7 cmbx8 cmbx9 cmbxsl10 cmbxti10 cmcsc10 cmdunh10 cmex10
- cmff10 cmfib8 cminch cmitt10 cmmi10 cmmi12 cmmi5 cmmi6 cmmi7
- cmmi8 cmmi9 cmmib10 cmr10 cmr12 cmr17 cmr5 cmr6 cmr7 cmr8
- cmr9 cmsl10 cmsl12 cmsl8 cmsl9 cmsltt10 cmss10 cmss12
- cmss17 cmss8 cmss9 cmssbx10 cmssdc10 cmssi10 cmssi12 cmssi17
- cmssi8 cmssi9 cmssq8 cmssqi8 cmsy10 cmsy5 cmsy6 cmsy7 cmsy8
- cmsy9 cmtcsc10 cmtex10 cmtex8 cmtex9 cmti10 cmti12 cmti7 cmti8
- cmti9 cmtt10 cmtt12 cmtt8 cmtt9 cmu10 cmvtt10 icmex10 icmmi8
- icmsy8 icmtt8 ilasy8 ilcmss8 ilcmssb8 ilcmssi8 lasy10 lasy5
- lasy6 lasy7 lasy8 lasy9 lasyb10 lcmss8 lcmssb8 lcmssi8 line10
- linew10 logo10 logo8 logo9 logobf10 logosl10
- EOF
- cat >slitex.set <<EOF
- cmmi8 cmsy8 cmtt8 icmmi8 icmsy8 icmtt8 ilasy8
- ilcmss8 ilcmssb8 ilcmssi8 lasy8 lcmss8 lcmssb8 lcmssi8
- EOF
- cat >imagen.3 <<EOF
- 300 magstep(0)
- 329 magstep(0.5)
- 360 magstep(1)
- EOF
- cat >imagen.4 <<EOF
- 896 magstep(6)
- 1075 magstep(7)
- 1290 magstep(8)
- 1548 magstep(9)
- EOF
- cat >imagen.7 <<EOF
- 300 magstep(0)
- 329 magstep(0.5)
- 360 magstep(1)
- 432 magstep(2)
- 518 magstep(3)
- 622 magstep(4)
- 746 magstep(5)
- EOF
- cat >nexthi.3 <<EOF
- 400 magstep(0)
- 438 magstep(0.5)
- 480 magstep(1)
- EOF
- cat >nexthi.4 <<EOF
- 1194 magstep(6)
- 1433 magstep(7)
- 1720 magstep(8)
- 2064 magstep(9)
- EOF
- cat >nexthi.7 <<EOF
- 400 magstep(0)
- 438 magstep(0.5)
- 480 magstep(1)
- 576 magstep(2)
- 691 magstep(3)
- 829 magstep(4)
- 995 magstep(5)
- EOF
- cat >FAX.3 <<EOF
- 200 magstep(0)
- 219 magstep(0.5)
- 240 magstep(1)
- EOF
- cat >FAX.4 <<EOF
- 597 magstep(6)
- 717 magstep(7)
- 860 magstep(8)
- 1032 magstep(9)
- EOF
- cat >FAX.7 <<EOF
- 200 magstep(0)
- 219 magstep(0.5)
- 240 magstep(1)
- 288 magstep(2)
- 346 magstep(3)
- 415 magstep(4)
- 498 magstep(5)
- EOF
- cat >nextscreen.15 <<EOF
- 69 magstep(-2)
- 76 magstep(-1.5)
- 83 magstep(-1)
- 91 magstep(-0.5)
- 100 magstep(0)
- 110 magstep(0.5)
- 120 magstep(1)
- 131 magstep(1.5)
- 144 magstep(2)
- 158 magstep(2.5)
- 173 magstep(3)
- 189 magstep(3.5)
- 207 magstep(4)
- 227 magstep(4.5)
- 249 magstep(5)
- EOF
- cat >nextscreen.5 <<EOF
- 91 magstep(-0.5)
- 100 magstep(0)
- 110 magstep(0.5)
- 120 magstep(1)
- 131 magstep(1.5)
- EOF
- cat >temp-aux <<EOF
- #!/bin/sh
- #
- # This script makes a rectangle of fonts.
- #
- # Parameters:
- # first is mode
- # second is a file containing the names of the fonts
- # third is a file containing pairs, one per line, which
- # have dpi followed by magnification
- # fourth is the base dpi
- #
- mode=\$1
- names=\$2
- pairs=\$3
- bdpi=\$4
- if test ! \`whoami\` = root
- then
- echo "You have to be superuser to run me."
- echo "Try becoming superuser, and then"
- echo "type (cd /tmp; ./queue) to start again."
- echo " "
- exit
- fi
- (cd /LocalLibrary/Fonts/TeXFonts/pk; cp * /usr/lib/tex/fonts/pk; rm *)
- echo "If there were errors above, ignore them."
- echo "Be prepared to wait a while, now!"
- ( while read dpi mag
- do
- for name in \`cat \$names\`
- do
- MakeTeXPK \$name \$dpi \$bdpi \$mag
- done
- (cd /LocalLibrary/Fonts/TeXFonts/pk; cp * /usr/lib/tex/fonts/pk; rm *)
- done ) <\$pairs
- EOF
- chmod +x temp-aux
- echo " "
- echo "Please note that the NeXT implementation"
- echo "of TeX is set up to generate fonts on"
- echo "demand. This may seem slow and painful"
- echo "at first, but after using it for a short"
- echo "while the fonts you actually use are"
- echo "generated, and things are as fast as ever."
- echo "And the disk space savings are tremendous."
- echo "It is recommended that you estimate your"
- echo "needs conservatively at first, because you"
- echo "can always rerun this script to generate"
- echo "fonts again if you choose."
- echo " "
- echo "Now we're going to ask some questions."
- echo "You'll be given the opportunity to answer"
- echo "several times to make several sets of fonts"
- echo "before any fonts are made. If you answer"
- echo "wrong at any point, simply control-C out of"
- echo "this script and start again."
- echo " "
- echo "Hit carriage return to continue."
- read dummy </dev/tty
- while true
- do
- while true
- do
- echo " "
- echo "You can make fonts for any of four 'devices',"
- echo "the screen, the NeXT printer at 400 dpi, the"
- echo "NeXT printer at 300 dpi (or other 300 dpi"
- echo "printers), or FAX devices at 200 dpi. These"
- echo "are 'nextscreen', 'nexthi', 'imagen', and"
- echo "'FAX' respectively. Please type one of"
- echo "these to select the font type, or type 'end'"
- echo "to start the font generation process."
- echo " "
- read mode </dev/tty
- if test $mode = nextscreen
- then
- selections="nextscreen.5 nextscreen.15"
- bdpi=100
- break
- elif test $mode = nexthi
- then
- selections="nexthi.3 nexthi.4 nexthi.7"
- bdpi=400
- break
- elif test $mode = FAX
- then
- selections="FAX.3 FAX.4 FAX.7"
- bdpi=200
- break
- elif test $mode = imagen
- then
- selections="imagen.3 imagen.4 imagen.7"
- bdpi=300
- break
- elif test $mode = end
- then
- break
- else
- echo "I didn't understand that. Let's try again."
- fi
- done
- if test $mode = end
- then
- break
- fi
- while true
- do
- echo " "
- echo "Now we need to determine what set of fonts you"
- echo "want to generate. The basic set are the 16"
- echo "fonts preloaded by plain; these are the most"
- echo "common TeX fonts and provide an excellent base"
- echo "set. This is 'basic.set'. The much larger set"
- echo "is 'full.set', which is the entire collection"
- echo "of TeX fonts. These take a while to generate and"
- echo "consume a lot of disk. There is also a very"
- echo "small set called 'slitex.set' which is only really"
- echo "appropriate when used with the '.4' magnifications"
- echo "(but more on that later.) For now, please select"
- echo "one of basic.set, full.set, or slitex.set."
- echo " "
- read fontset </dev/tty
- if test $fontset = basic.set
- then
- break
- elif test $fontset = full.set
- then
- break
- elif test $fontset = slitex.set
- then
- break
- else
- echo "I didn't understand that. Let's try again."
- fi
- done
- while true
- do
- echo " "
- echo "Now I need to know what magnifications you want"
- echo "them at. The '.3' magnifications are the most"
- echo "common magnifications. The '.7' magnifications"
- echo "are the full set. The '.4' magnifications are"
- echo "only for the slitex fonts. The '.5' magnifications"
- echo "are the small set for texview, and the '.15' is"
- echo "the full texview set. Your choices are (and they"
- echo "must be typed exactly as shown below):"
- echo " "
- echo " $selections"
- echo " "
- echo "Please type one of these."
- echo " "
- read magset </dev/tty
- if test -r $magset
- then
- break
- else
- echo "I didn't understand that. Let's try again."
- fi
- done
- echo "Appending $mode $fontset $magset $bdpi to queue"
- echo "./temp-aux $mode $fontset $magset $bdpi" >>queue
- done
- echo " "
- echo "Now we're going to start making fonts."
- echo "This will take a while. It also has to be"
- echo "done as superuser. If you are not"
- echo "superuser, the script will fail. In this"
- echo "case, simply 'cd /tmp ; ./queue' to restart."
- echo " "
- echo "Have fun! (Hit carriage return to continue.)"
- echo " "
- chmod +x ./queue
- read dummy </dev/tty
- ./queue
-