home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / resource / fonts / ps / prolog.ps < prev    next >
Encoding:
Text File  |  1997-07-08  |  2.0 KB  |  56 lines

  1. % $Id: prolog.ps,v 1.2 1997/01/15 03:11:04 ali Exp $
  2. %+ prolog.ps -- Prolog for IDL generated PostScript files
  3. %+ Copyright (c) 1988-1997 Research Systems, Inc. All Rights Reserved.
  4. %v 3
  5. save /$IDL_DICT 40 dict def
  6. $IDL_DICT begin
  7.  
  8. /bdef { bind def } bind def
  9. /C {currentpoint newpath moveto} bdef
  10. /CP {currentpoint} bdef    % Put the currentpoint (x, y) on the stack
  11. /D {currentpoint stroke moveto} bdef
  12. /F {closepath fill} bdef
  13. /K { setgray } bdef  % set gray level.
  14. /M {moveto} bdef    % Move current point absolute
  15. /N {rmoveto} bdef    % Move current point relative
  16. /P {lineto} bdef    % Lineto
  17. /R {rlineto} bdef    % Relative line to
  18. /S {gsave show grestore} bdef % Show a string, leave current point unchanged
  19.     % Get the current X path position on the stack        -- Y xpos
  20. /X {currentpoint pop} bdef
  21.     % Draw a point
  22. /Z {gsave currentpoint lineto 20 setlinewidth 1 setlinecap stroke grestore}
  23.     bdef
  24.  
  25.  
  26. % Linestyles -- Note: These have to change if the IDL internal scaling changes
  27. /L0 {[] 0 setdash} bdef
  28. /L1 {[40 100] 0 setdash} bdef
  29. /L2 {[200 200] 0 setdash} bdef
  30. /L3 {[200 100 50 100] 0 setdash} bdef
  31. /L4 {[300 100 50 100 50 100 50 100] 0 setdash} bdef
  32. /L5 {[400 200] 0 setdash} bdef
  33.  
  34. % Commands for loading fonts using either the default encoding vector
  35. % or the ISOLatin1 encoding. In either case, the syntax is:
  36. %
  37. %    fontname scalefactor FONT -
  38. /STDFONT { findfont exch scalefont setfont } bdef
  39. /ISOFONT { findfont dup length dict begin
  40.     { 1 index /FID ne {def} {pop pop} ifelse } forall
  41.     /Encoding ISOLatin1Encoding def currentdict end /idltmpfont exch
  42.     definefont exch scalefont setfont } bdef
  43.  
  44. % Most fonts with StandardEncoding have a bullet character mapped
  45. % at position 183. This fact is used by IDL to generate the !MX character.
  46. % The ISOLatin1 mapping lacks this character. This command loads a standard
  47. % encoding of a font that has the character and outputs it.
  48. %
  49. %    scalefactor ISOBULLET -
  50. /ISOBULLET { gsave /Helvetica findfont exch scalefont setfont
  51.          (\267) show currentpoint grestore moveto} bdef
  52.  
  53. end            % IDL_DICT
  54.  
  55. 2.5 setmiterlimit    % Use butt joints at angles < 47.15 degrees
  56.