home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / PRINTING / DVIPS54.ZIP / DVIPS / VMS / MAKETEXP.COM < prev    next >
Text File  |  1990-11-25  |  3KB  |  117 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. ! TEMPDIR needs to be unique for each process because of the possibility
  22. ! of simultaneous processes running this script.
  23. $ PID = f$getjpi ("","PID")
  24. $ TEMPDIR := d11:[SCRATCH.'PID]
  25. $ TEMPDIRNAME := d11:[scratch]'PID.dir.1
  26. $ NAME := P1
  27. $ DPI  = f$integer(P2)
  28. $ BDPI = f$integer(P3)
  29. $ MAG  = f$edit(P4,"LOWERCASE")
  30. $ MODE = P5
  31. $ if MODE .EQS. "" then 
  32. $   if BDPI .EQ. 300 
  33. $   then
  34. $      MODE := "imagen"
  35. $      goto GotMode
  36. $   endif
  37. $   if BDPI .EQ. 400 
  38. $   then
  39. $      MODE := "nexthi"
  40. $      goto GotMode
  41. $   endif
  42. $   if BDPI .EQ. 100 
  43. $   then
  44. $      MODE := "nextscreen"
  45. $      goto GotMode
  46. $   endif
  47. $   if BDPI .EQ. 635 
  48. $   then
  49. $      MODE := "linolo"
  50. $      goto GotMode
  51. $   endif
  52. $   if BDPI .EQ. 1270
  53. $    then
  54. $      MODE := "linohi"
  55. $      goto GotMode
  56. $   endif
  57. $   if BDPI .EQ. 2540
  58. $    then
  59. $      MODE := "linosuper"
  60. $      goto GotMode
  61. $   endif
  62. $   write sys$output "I don't know the mode for ",BDPI
  63. $   write sys$output "Have your system admin update MakeTeXPK"
  64. $   exit 1
  65. $ GotMode:
  66. $ GFNAME = f$fao("!AS.!ASgf",'NAME,f$string(DPI))
  67. $ PKNAME = f$fao("!AS.!ASpk",'NAME,f$string(DPI))
  68. $ pkfilename = f$fao("tex_pk:!AS",PKNAME)
  69. $ pkfile = f$search (pkfilename)
  70. $ if pkfile .EQS. "" 
  71. $ then
  72. $!    Clean up on normal or abnormal exit
  73. $     on control_y then goto ControlY
  74. $     on error then goto ControlY
  75. $     on severe_error then goto ControlY
  76. $     create/dir 'TEMPDIR
  77. $     OLDDIR = f$environment("DEFAULT")
  78. $     set def 'TEMPDIR
  79. $     command = f$fao ("mf ""\mode:=!AS; mag:=!AS; batchmode; input !AS""",MODE,MAG,'NAME)
  80. $     write sys$output command
  81. $     command
  82. $
  83. $     gffile = f$search (gfname)
  84. $     if gffile .EQS. ""
  85. $     then
  86. $         write sys$output "Metafont failed for some reason on ",gfname
  87. $         goto ControlY
  88. $     endif
  89. $  
  90. $     gftopk 'gfname 
  91. $
  92. $     copy 'pkname tex_pk:'pkname
  93. $     set prot=(o:r,g:r,w:r) tex_pk:'pkname
  94. $     goto GoodExit
  95. $ else
  96. $     write sys$output "tex_pk:",PKNAME," already exists!"
  97. $     exit 
  98. $ endif
  99. $
  100. $
  101. $ GoodExit:
  102. $   set default 'olddir
  103. $   delete 'tempdir*.*.*
  104. $   set prot=w:rewd 'tempdirname
  105. $   delete 'tempdirname
  106. $   exit 
  107. $
  108. $ ControlY:
  109. $   set default 'olddir
  110. $   delete 'tempdir*.*.*
  111. $   set prot=w:rewd 'tempdirname
  112. $   delete 'tempdirname
  113. $   exit 1
  114.