home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / pastex13.lha / DVIPS / dvips5519.lha / dvips / vms / MAKETEXPK.COM < prev    next >
Text File  |  1992-03-27  |  3KB  |  128 lines

  1. !!/bin/sh
  2. !
  3. !   This script file makes a new TeX PK font, because one wasn't
  4. !   found.  Parameters are:
  5. !
  6. !   name dpi bdpi magnification [mode]
  7. !
  8. !   `name' is the name of the font, such as `cmr10'.  `dpi' is
  9. !   the resolution the font is needed at.  `bdpi' is the base
  10. !   resolution, useful for figuring out the mode to make the font
  11. !   in.  `magnification' is a string to pass to MF as the
  12. !   magnification.  `mode', if supplied, is the mode to use.
  13. !
  14. !   Note that this file must execute Metafont, and then gftopk,
  15. !   and place the result in the correct location for the PostScript
  16. !   driver to find it subsequently.  If this doesn't work, it will
  17. !   be evident because MF will be invoked over and over again.
  18. !
  19. !   Of course, it needs to be set up for your site.
  20. !
  21. !
  22. $   set mess/nofa/nose/note/noid
  23. $   newtex
  24. $   set mess/se/fa/id/te
  25. $ NAME = f$sear("mf_inputs:"+p1+".mf")
  26. $ onlyname=f$parse(name,,,"name")
  27. $ name= f$parse(name,,,"device")+f$parse(name,,,"directory")+f$parse(name,,, -
  28.       "name")
  29. $ DPI  = f$integer(P2)
  30. $ BDPI = f$integer(P3)
  31. $ MAG  = f$edit(P4,"LOWERCASE")
  32. $ MODE = P5
  33. $ if MODE .EQS. "" then 
  34. $   if BDPI .EQ. 300 
  35. $   then
  36. $      MODE := "imagen"
  37. $      goto GotMode
  38. $   endif
  39. $   if BDPI .EQ. 400 
  40. $   then
  41. $      MODE := "nexthi"
  42. $      goto GotMode
  43. $   endif
  44. $   if BDPI .EQ. 100 
  45. $   then
  46. $      MODE := "nextscreen"
  47. $      goto GotMode
  48. $   endif
  49. $   if BDPI .EQ. 635 
  50. $   then
  51. $      MODE := "linolo"
  52. $      goto GotMode
  53. $   endif
  54. $   if BDPI .EQ. 1270
  55. $    then
  56. $      MODE := "linohi"
  57. $      goto GotMode
  58. $   endif
  59. $   if BDPI .EQ. 2540
  60. $    then
  61. $      MODE := "linosuper"
  62. $      goto GotMode
  63. $   endif
  64. $   write sys$output "I don't know the mode for ",BDPI
  65. $   write sys$output "Have your system admin update MakeTeXPK"
  66. $   exit 1
  67. $ GotMode:
  68. $ GFNAME = f$fao("!AS.!ASgf",onlyNAME,f$string(DPI))
  69. $ PKNAME = f$fao("!AS.!ASPK",onlyNAME,f$string(DPI))
  70. $ pkfilename = f$fao("tex_pk:!AS",PKNAME)
  71. $ pkfile = f$search (pkfilename)
  72. $ if pkfile .EQS. "" 
  73. $ then
  74. $!    Clean up on normal or abnormal exit
  75. $     on control_y then goto ControlY
  76. $     on error then goto ControlY
  77. $     on severe_error then goto ControlY
  78. $     OLDDIR = f$environment("DEFAULT")
  79. $     set def sys$login
  80. $     command = f$fao  -
  81.   ("mf ""\mode:=!AS; mag:=!AS; scrollmode ; input !AS""", -
  82.   MODE,MAG,NAME)
  83. $     write sys$output "Creating font file for ",onlyname
  84. $     write sys$output "Please wait about 2 minutes"
  85. $     write sys$output ""
  86. $     set noon
  87. $     command
  88. $     set on
  89. $
  90. $     gffile=f$sear(onlyname+"."+f$str(dpi)+"gf")
  91. $     if gffile .EQS. ""
  92. $     then
  93. $         write sys$output "Metafont failed for some reason on ",gfname
  94. $         goto ControlY
  95. $     endif
  96. $  
  97. $     gftopk  'gfname' 
  98. $     delete/noconf/nolog 'gfname';
  99. $     delete/noconf/nolog 'onlyname'.lis;
  100. $     
  101. $   if f$getsyi("nodename").eqs."VAXSNS"   
  102. $   then
  103. $     on error then goto goodexit
  104. $     on severe_error then goto goodexit
  105. $     send/file/vms 'pkname' newtex
  106. $!     write sys$output "------- ",pkname," has been sent to NEWTEX"
  107. $     send/file/vms 'onlyname'.tfm newtex
  108. $!     write sys$output "------- ",onlyname,".TFM has been sent to NEWTEX"
  109. $   endif
  110. $
  111. $     goto GoodExit
  112. $ else
  113. $     write sys$output "tex_pk:",PKNAME," already exists!"
  114. $     exit 
  115. $ endif
  116. $
  117. $
  118. $ GoodExit:
  119. $   set default 'olddir
  120. $   exit 
  121. $
  122. $ ControlY:
  123. $   set default 'olddir
  124. $   exit 1
  125.