home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / text / tex / pastex / source / dvips / amiga / maketexpk < prev    next >
Encoding:
AmigaDOS Script File  |  1994-04-08  |  1.8 KB  |  73 lines

  1. .key NAME/a,DPI/a,BDPI/a,MAG/a,MODE/a
  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'.
  9. ; `DPI'   - is the resolution the font is needed at.
  10. ; `BDPI'  - is the base resolution, useful for figuring out the mode
  11. ;           to make the font in.
  12. ; `MAG'   - is a string to pass to Metafont as the magnification.
  13. ; `MODE'  - is the mode to pass to Metafont.
  14. ;
  15. ; Note that this file must execute Metafont, and then gftopk,
  16. ; and place the result in the correct location for the PostScript
  17. ; driver to find it subsequently. If this doesn't work, it will
  18. ; be evident because MF will be invoked over and over again.
  19. ;
  20.  
  21. ; some paths:
  22. ;
  23. ; TFMDIR  = directory where tfm files are located.
  24. ;           (e.g., TeX:texfonts/tfm/ or TeX:fonts/)
  25. ; PKDIR   = directory where pk are located
  26. ;           (e.g., TeX:texfonts/pk/ or TeX:pk/)
  27. ; DESTDIR = directory 
  28.  
  29. Set METAFONT         MF:bin/VirMF
  30. Set GFTOPK        MF:bin/GFtoPK
  31. Set TFMDIR         TeX:texfonts/tfm/
  32. Set PKDIR         TeX:texfonts/pk/<MODE>/
  33. Set TMPDIR         T:
  34. Set DESTDIR        $PKDIR/<DPI>
  35. Set FULLFONTNAME    $DESTDIR/<NAME>.<DPI>pk
  36. Set FULLTFMNAME        $TFMDIR<NAME>.tfm
  37.  
  38. If EXISTS $FULLFONTNAME
  39.  Echo "file $FULLFONTNAME already exists!"
  40.  Skip EndMakeTeXPK
  41. EndIf
  42.  
  43. If NOT EXISTS $DESTDIR
  44.  Makedir $DESTDIR
  45.  Echo "Directory $DESTDIR created!"
  46. EndIf
  47.  
  48. cd $TMPDIR
  49.  
  50. ; Execute Metafont
  51. $METAFONT "\mode:=<MODE>; mag:=<MAG>; scrollmode; input <NAME>"
  52.  
  53. ; Convert GF file into PK file
  54. $GFTOPK -v <NAME>.<DPI>gf $DESTDIR/<NAME>.<DPI>pk
  55.  
  56. If NOT EXISTS $FULLTFMNAME
  57.  Copy <NAME>.tfm $FULLTFMNAME clone
  58.  Echo "TFM file for <NAME> copied!"
  59. EndIf
  60.  
  61. delete <NAME>.tfm <NAME>.<DPI>gf <NAME>.log quiet
  62.  
  63. Lab EndMakeTeXPK
  64.  
  65. UnSet METAFONT
  66. UnSet GFTOPK
  67. UnSet TFMDIR
  68. UnSet PKDIR
  69. UnSet TMPDIR
  70. UnSet DESTDIR
  71. UnSet FULLFONTNAME
  72. UnSet FULLTFMNAME
  73.