home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3.4.17 [SPARC, PA-RISC] / nextstep33_risc.iso / NextLibrary / TeX / tex / Make_Fonts next >
Encoding:
Text File  |  1995-02-07  |  7.6 KB  |  289 lines

  1. #!/bin/sh
  2. #
  3. #   Howdy!  We make fonts.
  4. #
  5. echo "Welcome to font maker.  Hold on a second while I make some"
  6. echo "temporary files . . ."
  7. cd /tmp
  8. rm -f queue
  9. cat >basic.set <<EOF
  10. cmbx10 cmbx5 cmbx7 cmex10 cmmi10 cmmi5 cmmi7 cmr10
  11. cmr5 cmr7 cmsl10 cmsy10 cmsy5 cmsy7 cmti10 cmtt10
  12. EOF
  13. cat >full.set <<EOF
  14. circle10 circlew10 cmb10 cmbsy10 cmbx10 cmbx12 cmbx5 cmbx6
  15. cmbx7 cmbx8 cmbx9 cmbxsl10 cmbxti10 cmcsc10 cmdunh10 cmex10
  16. cmff10 cmfib8 cminch cmitt10 cmmi10 cmmi12 cmmi5 cmmi6 cmmi7
  17. cmmi8 cmmi9 cmmib10 cmr10 cmr12 cmr17 cmr5 cmr6 cmr7 cmr8
  18. cmr9 cmsl10 cmsl12 cmsl8 cmsl9 cmsltt10 cmss10 cmss12
  19. cmss17 cmss8 cmss9 cmssbx10 cmssdc10 cmssi10 cmssi12 cmssi17
  20. cmssi8 cmssi9 cmssq8 cmssqi8 cmsy10 cmsy5 cmsy6 cmsy7 cmsy8
  21. cmsy9 cmtcsc10 cmtex10 cmtex8 cmtex9 cmti10 cmti12 cmti7 cmti8
  22. cmti9 cmtt10 cmtt12 cmtt8 cmtt9 cmu10 cmvtt10 icmex10 icmmi8
  23. icmsy8 icmtt8 ilasy8 ilcmss8 ilcmssb8 ilcmssi8 lasy10 lasy5
  24. lasy6 lasy7 lasy8 lasy9 lasyb10 lcmss8 lcmssb8 lcmssi8 line10
  25. linew10 logo10 logo8 logo9 logobf10 logosl10
  26. EOF
  27. cat >slitex.set <<EOF
  28. cmmi8 cmsy8 cmtt8 icmmi8 icmsy8 icmtt8 ilasy8
  29. ilcmss8 ilcmssb8 ilcmssi8 lasy8 lcmss8 lcmssb8 lcmssi8
  30. EOF
  31. cat >imagen.3 <<EOF
  32. 300 magstep(0)
  33. 329 magstep(0.5)
  34. 360 magstep(1)
  35. EOF
  36. cat >imagen.4 <<EOF
  37. 896 magstep(6)
  38. 1075 magstep(7)
  39. 1290 magstep(8)
  40. 1548 magstep(9)
  41. EOF
  42. cat >imagen.7 <<EOF
  43. 300 magstep(0)
  44. 329 magstep(0.5)
  45. 360 magstep(1)
  46. 432 magstep(2)
  47. 518 magstep(3)
  48. 622 magstep(4)
  49. 746 magstep(5)
  50. EOF
  51. cat >nexthi.3 <<EOF
  52. 400 magstep(0)
  53. 438 magstep(0.5)
  54. 480 magstep(1)
  55. EOF
  56. cat >nexthi.4 <<EOF
  57. 1194 magstep(6)
  58. 1433 magstep(7)
  59. 1720 magstep(8)
  60. 2064 magstep(9)
  61. EOF
  62. cat >nexthi.7 <<EOF
  63. 400 magstep(0)
  64. 438 magstep(0.5)
  65. 480 magstep(1)
  66. 576 magstep(2)
  67. 691 magstep(3)
  68. 829 magstep(4)
  69. 995 magstep(5)
  70. EOF
  71. cat >FAX.3 <<EOF
  72. 200 magstep(0)
  73. 219 magstep(0.5)
  74. 240 magstep(1)
  75. EOF
  76. cat >FAX.4 <<EOF
  77. 597 magstep(6)
  78. 717 magstep(7)
  79. 860 magstep(8)
  80. 1032 magstep(9)
  81. EOF
  82. cat >FAX.7 <<EOF
  83. 200 magstep(0)
  84. 219 magstep(0.5)
  85. 240 magstep(1)
  86. 288 magstep(2)
  87. 346 magstep(3)
  88. 415 magstep(4)
  89. 498 magstep(5)
  90. EOF
  91. cat >nextscreen.15 <<EOF
  92. 69 magstep(-2)
  93. 76 magstep(-1.5)
  94. 83 magstep(-1)
  95. 91 magstep(-0.5)
  96. 100 magstep(0)
  97. 110 magstep(0.5)
  98. 120 magstep(1)
  99. 131 magstep(1.5)
  100. 144 magstep(2)
  101. 158 magstep(2.5)
  102. 173 magstep(3)
  103. 189 magstep(3.5)
  104. 207 magstep(4)
  105. 227 magstep(4.5)
  106. 249 magstep(5)
  107. EOF
  108. cat >nextscreen.5 <<EOF
  109. 91 magstep(-0.5)
  110. 100 magstep(0)
  111. 110 magstep(0.5)
  112. 120 magstep(1)
  113. 131 magstep(1.5)
  114. EOF
  115. cat >temp-aux <<EOF
  116. #!/bin/sh
  117. #
  118. #   This script makes a rectangle of fonts.
  119. #
  120. #   Parameters:
  121. #      first is mode
  122. #      second is a file containing the names of the fonts
  123. #      third is a file containing pairs, one per line, which
  124. #            have dpi followed by magnification
  125. #      fourth is the base dpi
  126. #
  127. mode=\$1
  128. names=\$2
  129. pairs=\$3
  130. bdpi=\$4
  131. if test ! \`whoami\` = root
  132. then
  133.    echo "You have to be superuser to run me."
  134.    echo "Try becoming superuser, and then"
  135.    echo "type (cd /tmp; ./queue) to start again."
  136.    echo " "
  137.    exit
  138. fi
  139. (cd /LocalLibrary/Fonts/TeXFonts/pk; cp * /usr/lib/tex/fonts/pk; rm *)
  140. echo "If there were errors above, ignore them."
  141. echo "Be prepared to wait a while, now!"
  142. ( while read dpi mag
  143.   do
  144.     for name in \`cat \$names\`
  145.     do
  146.        MakeTeXPK \$name \$dpi \$bdpi \$mag
  147.     done
  148.     (cd /LocalLibrary/Fonts/TeXFonts/pk; cp * /usr/lib/tex/fonts/pk; rm *)
  149.  done ) <\$pairs
  150. EOF
  151. chmod +x temp-aux
  152. echo " "
  153. echo "Please note that the NeXT implementation"
  154. echo "of TeX is set up to generate fonts on"
  155. echo "demand.  This may seem slow and painful"
  156. echo "at first, but after using it for a short"
  157. echo "while the fonts you actually use are"
  158. echo "generated, and things are as fast as ever."
  159. echo "And the disk space savings are tremendous."
  160. echo "It is recommended that you estimate your"
  161. echo "needs conservatively at first, because you"
  162. echo "can always rerun this script to generate"
  163. echo "fonts again if you choose."
  164. echo " "
  165. echo "Now we're going to ask some questions."
  166. echo "You'll be given the opportunity to answer"
  167. echo "several times to make several sets of fonts"
  168. echo "before any fonts are made.  If you answer"
  169. echo "wrong at any point, simply control-C out of"
  170. echo "this script and start again."
  171. echo " "
  172. echo "Hit carriage return to continue."
  173. read dummy </dev/tty
  174. while true
  175. do
  176.    while true
  177.    do
  178.       echo " "
  179.       echo "You can make fonts for any of four 'devices',"
  180.       echo "the screen, the NeXT printer at 400 dpi, the"
  181.       echo "NeXT printer at 300 dpi (or other 300 dpi"
  182.       echo "printers), or FAX devices at 200 dpi.  These"
  183.       echo "are 'nextscreen', 'nexthi', 'imagen', and"
  184.       echo "'FAX' respectively.  Please type one of"
  185.       echo "these to select the font type, or type 'end'"
  186.       echo "to start the font generation process."
  187.       echo " "
  188.       read mode </dev/tty
  189.       if test $mode = nextscreen
  190.       then
  191.          selections="nextscreen.5 nextscreen.15"
  192.          bdpi=100
  193.          break
  194.       elif test $mode = nexthi
  195.       then
  196.          selections="nexthi.3 nexthi.4 nexthi.7"
  197.          bdpi=400
  198.          break
  199.       elif test $mode = FAX
  200.       then
  201.          selections="FAX.3 FAX.4 FAX.7"
  202.          bdpi=200
  203.          break
  204.       elif test $mode = imagen
  205.       then
  206.          selections="imagen.3 imagen.4 imagen.7"
  207.          bdpi=300
  208.          break
  209.       elif test $mode = end
  210.       then
  211.          break
  212.       else
  213.          echo "I didn't understand that.  Let's try again."
  214.       fi
  215.    done
  216.    if test $mode = end
  217.    then
  218.       break
  219.    fi
  220.    while true
  221.    do
  222.       echo " "
  223.       echo "Now we need to determine what set of fonts you"
  224.       echo "want to generate.  The basic set are the 16"
  225.       echo "fonts preloaded by plain; these are the most"
  226.       echo "common TeX fonts and provide an excellent base"
  227.       echo "set.  This is 'basic.set'.  The much larger set"
  228.       echo "is 'full.set', which is the entire collection"
  229.       echo "of TeX fonts.  These take a while to generate and"
  230.       echo "consume a lot of disk.  There is also a very"
  231.       echo "small set called 'slitex.set' which is only really"
  232.       echo "appropriate when used with the '.4' magnifications"
  233.       echo "(but more on that later.)  For now, please select"
  234.       echo "one of basic.set, full.set, or slitex.set."
  235.       echo " "
  236.       read fontset </dev/tty
  237.       if test $fontset = basic.set
  238.       then
  239.          break
  240.       elif test $fontset = full.set
  241.       then
  242.          break
  243.       elif test $fontset = slitex.set
  244.       then
  245.          break
  246.       else
  247.          echo "I didn't understand that.  Let's try again."
  248.       fi
  249.    done
  250.    while true
  251.    do
  252.       echo " "
  253.       echo "Now I need to know what magnifications you want"
  254.       echo "them at.  The '.3' magnifications are the most"
  255.       echo "common magnifications.  The '.7' magnifications"
  256.       echo "are the full set.  The '.4' magnifications are"
  257.       echo "only for the slitex fonts.  The '.5' magnifications"
  258.       echo "are the small set for texview, and the '.15' is"
  259.       echo "the full texview set.  Your choices are (and they"
  260.       echo "must be typed exactly as shown below):"
  261.       echo " "
  262.       echo "   $selections"
  263.       echo " "
  264.       echo "Please type one of these."
  265.       echo " "
  266.       read magset </dev/tty
  267.       if test -r $magset
  268.       then
  269.          break
  270.       else
  271.          echo "I didn't understand that.  Let's try again."
  272.       fi
  273.    done
  274.    echo "Appending $mode $fontset $magset $bdpi to queue"
  275.    echo "./temp-aux $mode $fontset $magset $bdpi" >>queue
  276. done
  277. echo " "
  278. echo "Now we're going to start making fonts."
  279. echo "This will take a while.  It also has to be"
  280. echo "done as superuser.  If you are not"
  281. echo "superuser, the script will fail.  In this"
  282. echo "case, simply 'cd /tmp ; ./queue' to restart."
  283. echo " "
  284. echo "Have fun!  (Hit carriage return to continue.)"
  285. echo " "
  286. chmod +x ./queue
  287. read dummy </dev/tty
  288. ./queue
  289.