home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / GROFFEXE / LIB / GROFF / FONT / DEVPS / PROLOGUE < prev    next >
Text File  |  1992-12-10  |  4KB  |  222 lines

  1. %!PS-Adobe-3.0 Resource-ProcSet
  2.  
  3. /setpacking where {
  4.     pop
  5.     currentpacking
  6.     true setpacking
  7. } if
  8.  
  9. /grops 120 dict dup begin 
  10.  
  11. % The ASCII code of the space character.
  12. /SC 32 def
  13.  
  14. /A /show load def
  15. /B { 0 SC 3 -1 roll widthshow } bind def
  16. /C { 0 exch ashow } bind def
  17. /D { 0 exch 0 SC 5 2 roll awidthshow } bind def
  18. /E { 0 rmoveto show } bind def
  19. /F { 0 rmoveto 0 SC 3 -1 roll widthshow } bind def
  20. /G { 0 rmoveto 0 exch ashow } bind def
  21. /H { 0 rmoveto 0 exch 0 SC 5 2 roll awidthshow } bind def
  22. /I { 0 exch rmoveto show } bind def
  23. /J { 0 exch rmoveto 0 SC 3 -1 roll widthshow } bind def
  24. /K { 0 exch rmoveto 0 exch ashow } bind def
  25. /L { 0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow } bind def
  26. /M { rmoveto show } bind def
  27. /N { rmoveto 0 SC 3 -1 roll widthshow } bind def
  28. /O { rmoveto 0 exch ashow } bind def
  29. /P { rmoveto 0 exch 0 SC 5 2 roll awidthshow } bind def
  30. /Q { moveto show } bind def 
  31. /R { moveto 0 SC 3 -1 roll widthshow } bind def
  32. /S { moveto 0 exch ashow } bind def
  33. /T { moveto 0 exch 0 SC 5 2 roll awidthshow } bind def
  34.  
  35. % name size font SF -
  36.  
  37. /SF {
  38.     findfont exch
  39.     [ exch dup 0 exch 0 exch neg 0 0 ] makefont
  40.     dup setfont
  41.     [ exch /setfont cvx ] cvx bind def
  42. } bind def
  43.  
  44. % name a c d font MF -
  45.  
  46. /MF {
  47.     findfont
  48.     [ 5 2 roll
  49.     0 3 1 roll % b
  50.     neg 0 0 ] makefont
  51.     dup setfont
  52.     [ exch /setfont cvx ] cvx bind def
  53. } bind def
  54.  
  55. /level0 0 def
  56. /RES 0 def
  57. /PL 0 def
  58. /LS 0 def
  59.  
  60. % Guess the page length.
  61. % This assumes that the imageable area is vertically centered on the page.
  62. % PLG - length
  63.  
  64. /PLG {
  65.     gsave newpath clippath pathbbox grestore
  66.     exch pop add exch pop
  67. } bind def
  68.  
  69. % BP -
  70.  
  71. /BP {
  72.     /level0 save def
  73.     1 setlinecap
  74.     1 setlinejoin
  75.     72 RES div dup scale
  76.     LS {
  77.         90 rotate
  78.     } {
  79.         0 PL translate
  80.     } ifelse
  81.     1 -1 scale
  82. } bind def
  83.  
  84. /EP {
  85.     level0 restore
  86.     showpage
  87. } bind def
  88.  
  89.  
  90. % centerx centery radius startangle endangle DA -
  91.  
  92. /DA {
  93.     newpath arcn stroke
  94. } bind def
  95.  
  96. % x y SN - x' y'
  97. % round a position to nearest (pixel + (.25,.25))
  98.  
  99. /SN {
  100.     transform 
  101.     .25 sub exch .25 sub exch
  102.     round .25 add exch round .25 add exch
  103.     itransform
  104. } bind def
  105.     
  106. % endx endy startx starty DL -
  107. % we round the endpoints of the line, so that parallel horizontal
  108. % and vertical lines will appear even
  109.  
  110. /DL {
  111.     SN
  112.     moveto
  113.     SN
  114.     lineto stroke
  115. } bind def
  116.  
  117. % centerx centery radius DC -
  118.  
  119. /DC {
  120.     newpath 0 360 arc closepath
  121. } bind def
  122.  
  123.  
  124. /TM matrix def
  125.  
  126. %  width height centerx centery DE -
  127.  
  128. /DE {
  129.     TM currentmatrix pop
  130.     translate scale newpath 0 0 .5 0 360 arc closepath
  131.     TM setmatrix
  132. } bind def
  133.  
  134. % these are for splines
  135.  
  136. /RC /rcurveto load def
  137. /RL /rlineto load def
  138. /ST /stroke load def
  139. /MT /moveto load def
  140. /CL /closepath load def
  141.  
  142. % fill the last path
  143.  
  144. % amount FL -
  145.  
  146. /FL {
  147.     currentgray exch setgray fill setgray
  148. } bind def
  149.  
  150. % fill with the ``current color''
  151.  
  152. /BL /fill load def
  153.  
  154. /LW /setlinewidth load def
  155. % new_font_name encoding_vector old_font_name RE -
  156.  
  157. /RE {
  158.     findfont
  159.     dup maxlength 1 index /FontName known not { 1 add } if dict begin
  160.     {
  161.         1 index /FID ne { def } { pop pop } ifelse
  162.     } forall
  163.     /Encoding exch def
  164.     dup /FontName exch def
  165.     currentdict end definefont pop
  166. } bind def
  167.  
  168. /DEFS 0 def
  169.  
  170. % hpos vpos EBEGIN -
  171.  
  172. /EBEGIN {
  173.     moveto
  174.     DEFS begin
  175. } bind def
  176.  
  177. /EEND /end load def
  178.  
  179. /CNT 0 def
  180. /level1 0 def
  181.  
  182. % llx lly newwid wid newht ht newllx newlly PBEGIN -
  183.  
  184. /PBEGIN {
  185.     /level1 save def
  186.     translate
  187.     div 3 1 roll div exch scale
  188.     neg exch neg exch translate
  189.     % set the graphics state to default values
  190.     0 setgray
  191.     0 setlinecap
  192.     1 setlinewidth
  193.     0 setlinejoin
  194.     10 setmiterlimit
  195.     [] 0 setdash
  196.     /setstrokeadjust where {
  197.         pop
  198.         false setstrokeadjust
  199.     } if
  200.     /setoverprint where {
  201.         pop
  202.         false setoverprint
  203.     } if
  204.     newpath
  205.     /CNT countdictstack def
  206.     userdict begin
  207.     /showpage {} def
  208. } bind def
  209.  
  210. /PEND {
  211.     clear
  212.     countdictstack CNT sub { end } repeat
  213.     level1 restore
  214. } bind def
  215.  
  216. end def
  217.  
  218. /setpacking where {
  219.     pop
  220.     setpacking
  221. } if
  222.