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

  1. %!
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. % HWGPOST >= V22.25 initialisation file
  4. %
  5. % $Id: init.ps,v 2.18 1995/09/17 11:28:42 heinz Exp $
  6. %
  7. % HWGPOST ©1993,1994 Heinz Wrobel, for Joan Thuesen
  8. %
  9. % Based loosely on Post V1.7 (C) Adrian Aylward 1989, 1991
  10. %
  11. % You may freely copy, use, and modify this file
  12. %
  13. % This file should be run before most programs
  14. % Developers: Do NOT run this file with job server flags like PSFLAGSAVE!
  15. %
  16. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  17.  
  18. % A dummy status dictionary
  19. false setglobal
  20. statusdict begin
  21. /waittimeout 0 def
  22. /setdefaulttimeouts {pop pop pop} bind def
  23. end
  24.  
  25. % We need global VM for modifications to systemdict!
  26. currentglobal true setglobal
  27. systemdict begin
  28.  
  29. % Ignore CTRL/D, CTRL/L, and simple CRs
  30.  
  31. <04> cvn {} def
  32. <0c> cvn {} def
  33. <0d> cvn {} def
  34.  
  35. % Dummies for ugly PostScript code
  36.  
  37. /setjobtimeout { pop } bind def
  38. /letter {} def
  39.  
  40. % Some fonts are unfortunately very bad!
  41. /@@findfont /findfont load def
  42. /findfont
  43. {
  44.     currentpacking false setpacking exch @@findfont exch setpacking
  45. } bind def
  46.  
  47. % If you have any problems with sudden range cecking errors for
  48. % graphics commands, you might want to try to uncomment this line
  49. % to circumvent problems with PS files that really shavce it too close.
  50. % /setbbox {pop pop pop pop} bind def
  51.  
  52. % Ok, lets return to the previous vm mode and make the systemdict readonly
  53. end
  54. systemdict readonly pop
  55. setglobal
  56.  
  57. %
  58. % We try to register all our resources on disk now. This speeds up
  59. % access.
  60. %
  61. % We look for the file "HWGPOSTResources" and execute it if it is available
  62. % If not, we check for it as "POST:HWGPOSTResources", too.
  63. % If this fails again, we can't do anything reasonable about it, so we don't.
  64. %
  65. (HWGPOSTResources) dup status
  66. {
  67.     pop pop pop pop true
  68. }
  69. {
  70.     pop
  71.     (%POST%HWGPOSTResources) dup status
  72.     {
  73.         pop pop pop pop true
  74.     }
  75.     {
  76.         pop false
  77.     }
  78.     ifelse
  79. }
  80. ifelse
  81. {
  82.     currentglobal exch true setglobal
  83.     run
  84.     setglobal
  85. }
  86. if
  87.  
  88. %
  89. % To keep compatibility with the old post.library I need to have
  90. % the renderband commands available. I don't want them to "clutter"
  91. % the PS name space by default, so they are built in as "@currentband"
  92. % and "@setband" and need to be redefined for "old" SW.
  93. %
  94. % I encourage any user of HWGPOST to use the "@" names for these operators
  95. % as I might drop support for the old names in init.ps in the future.
  96. %
  97. /currentband /@currentband load def
  98. /setband /@setband load def
  99.  
  100. %
  101. % Even more ugly compatibility magic. Most people won't need this. Those who
  102. % do should refer to HWGPOSTlib.doc and hopefully find a way to avoid it.
  103. %
  104. systemdict /@callextfunc known {/callextfunc /@callextfunc load def} if
  105.  
  106. %
  107. % Due to many requests the default font handling of stone age post is
  108. % back in disguise. If you don't want it, just throw out the definitions
  109. % below.
  110.  
  111. % Our DefaultFont prints out big dots ...
  112. %
  113. /@DefaultFont
  114. <<
  115. /FontName /@DefaultFont
  116. /FontMatrix [0.001 0 0 0.001 0 0]
  117. /FontType 3
  118. /FontBBox [0 -300 500 700]
  119. /Encoding StandardEncoding
  120. /BuildChar
  121. { pop pop
  122.   500 0 50 0 450 400 setcachedevice
  123.   250 200 200 0 360 arc closepath fill
  124. } bind
  125. /Painttype 0
  126. >>
  127. definefont pop
  128.  
  129. %
  130. % Heavy magic to make the font lookup mechanism respect your choice of
  131. % a default font. If you want another font, you simply specify the name
  132. % of the font.
  133. %
  134. /@DefaultFontName /@DefaultFont def
  135. %/@DefaultFontName /Courier def
  136.  
  137. %%% EOT %%%
  138.