home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / text / print / hwgpost / enumfonts.ps < prev    next >
Encoding:
Text File  |  1995-07-17  |  1.5 KB  |  73 lines

  1. %!
  2. %
  3. % This is a HWGPOST specific PostScript program to scan the
  4. % PSFONTS: dir for all font files.
  5. % It will generate a suitable clip to be inserted into your
  6. % HWGPOSTResources file to make all your fonts available to
  7. % the interpreter.
  8. %
  9. % Run this file from the Shell via the 'post' frontend like
  10. %
  11. %   post init.ps enumfonts.ps >t:resourceclip
  12. %
  13. % Then edit the resource clip appropriately by sorting it,
  14. % removing duplicates and the fonts that you don't want.
  15. % Finally add it to your HWGPOSTResources file as needed.
  16. %
  17. % Fairly easy to set up your fonts now, isn't it?
  18. %
  19. % This file may not be modified!
  20. %
  21. % HWGPOST is dedicated to Joan Thuesen, a VIP in my life.
  22. %
  23. % HWGPOST is not PD or free!
  24. %
  25. % Heinz Wrobel
  26. % heinz@hwg.muc.de
  27. %
  28.  
  29. /filenamebuf 256 string def
  30. /fontnamebuf 256 string def
  31. (%PSFONTS%*)
  32. {
  33.     dup /filename exch def
  34.     @fontfile
  35.     {
  36.         dup token
  37.         {
  38.             /FontName eq
  39.             {
  40.                 dup token
  41.                 {
  42.                     fontnamebuf cvs /fontname exch def
  43.  
  44.                     fontname filename eq not
  45.                     {
  46.                         (\() print fontname print (\) \() print
  47.                         filename print
  48.                         (\) /Font @RegisterDiskResource\n) print
  49.                         flush
  50.                     }
  51.                     if
  52.  
  53.                     closefile
  54.                     exit
  55.                 }
  56.                 if
  57.             }
  58.             if
  59.         }
  60.         {
  61.             exit
  62.         }
  63.         ifelse
  64.     }
  65.     loop
  66. }
  67. filenamebuf
  68. filenameforall
  69.  
  70. %
  71. % EOF
  72. %
  73.