home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 4 / AUCD4.iso / acorn / riscos / releases / ro2extra / !PrinterPS / PStprolog < prev    next >
Text File  |  1989-04-25  |  2KB  |  67 lines

  1. % > <PDriver$Dir>.PStprolog
  2. % PostScript prologue file for simple text printing
  3. % Version 1.00, first used with version 1.03 of the !PrinterPS application
  4.  
  5. /StartPage {                            % Start of page routine. Wants the
  6.  save 7 1 roll                          % following values on the stack:
  7.  neg /RH exch def                       %   X translation in decipoints
  8.  /CW exch def                           %   Y translation in decipoints
  9.  dup                                    %   Rotation in degrees
  10.  PDfont.Normal exch scalefont           %   Font size in decipoints
  11.  /NF exch def                           %   Character width in decipoints
  12.  PDfont.Bold exch scalefont             %   Row spacing in decipoints
  13.  /BF exch def                           % The transformations are applied
  14.  0.1 dup scale                          % in the order: scale to decipoints,
  15.  rotate                                 % given rotation, given translation.
  16.  translate
  17. } bind def
  18.  
  19. /EndPage {                              % End of page routine. No stack
  20.  restore                                % requirements or effects.
  21.  showpage
  22. } bind def
  23.  
  24. /S {                                    % Routine to print a string at a
  25.  CW mul exch RH mul moveto              % given character position.
  26.  show                                   % - expects string, row number,
  27. } bind def                              %   character number on the stack.
  28.  
  29. /B {BF setfont S} bind def              % Like "S", but first set bold font
  30.  
  31. /N {NF setfont S} bind def              % Like "S", but first set normal font
  32.  
  33. /T {TF setfont S} bind def              % Like "S", but first set title font
  34.  
  35. % Font setup code
  36.  
  37. /ChkCh {
  38.  dup Encoding exch get
  39.  dup /.notdef eq {
  40.   pop Encoding exch /ellipsis put
  41.  }{
  42.   CharStrings exch known {pop} {Encoding exch /ellipsis put} ifelse
  43.  } ifelse
  44. } bind def
  45.  
  46. /FF {
  47.  findfont begin
  48.   currentdict dup maxlength 1 add dict begin
  49.    {1 index /FID ne {def} {pop pop} ifelse} forall
  50.    /Encoding Latin1Enc 256 array copy def
  51.    /Metrics 1 dict def
  52.    Metrics /.notdef 0 put
  53. % Possible change: Delete or comment out the following line if you
  54. % want undefined PostScript characters to generate errors rather than
  55. % generate an ellipsis.
  56.    0 1 255 /ChkCh load for
  57.    dup currentdict
  58.   end
  59.  end
  60.  definefont def
  61. } bind def
  62.  
  63. /PDfont.Normal /Courier FF
  64. /PDfont.Bold /Courier-Bold FF
  65.  
  66. /TF PDfont.Bold 100 scalefont def
  67.