waterfal.ps 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. %!
  2. /waterfalsave save def % prevent residual side effects
  3. % Copyright (C) 1992, 1993, 1996 Aladdin Enterprises. All rights reserved.
  4. %
  5. % This file is part of AFPL Ghostscript.
  6. %
  7. % AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
  8. % distributor accepts any responsibility for the consequences of using it, or
  9. % for whether it serves any particular purpose or works at all, unless he or
  10. % she says so in writing. Refer to the Aladdin Free Public License (the
  11. % "License") for full details.
  12. %
  13. % Every copy of AFPL Ghostscript must include a copy of the License, normally
  14. % in a plain ASCII text file named PUBLIC. The License grants you the right
  15. % to copy, modify and redistribute AFPL Ghostscript, but only under certain
  16. % conditions described in the License. Among other things, the License
  17. % requires that the copyright notice and this notice be preserved on all
  18. % copies.
  19. % $Id: waterfal.ps,v 1.3 2001/10/01 21:28:25 rayjj Exp $
  20. % waterfal.ps
  21. % This file produces a 'waterfall' printout of fonts at various sizes.
  22. % Specify any desired set of up to 3 fonts here.
  23. /Fonts [/Courier /Helvetica] def
  24. % Specify any desired set of point sizes here.
  25. % The sum of the sizes should not exceed (roughly) 100.
  26. % For sizes larger than about 16, some characters may fall off the page.
  27. /Sizes [6 7 8 9 10 11 12 14 16] def
  28. /eol
  29. { currentfont /FontBBox get aload pop
  30. exch pop sub exch pop 0 exch
  31. % Many Ghostscript fonts have incorrect FontBBoxes....
  32. pop -1000
  33. 1.15 mul currentfont /FontMatrix get dtransform
  34. translate
  35. 0 0 moveto
  36. } def
  37. (landscap.ps) runlibfile
  38. clippath pathbbox newpath
  39. /ury exch def /urx exch def /lly exch def /llx exch def
  40. llx 18 add ury 18 sub translate
  41. % Read the current Y resolution without using Ghostscript-specific operators.
  42. gsave initmatrix 0 72 dtransform abs exch abs exch .max grestore
  43. round cvi /dpi exch def
  44. QUIET not
  45. { (Creating waterfall printout at ) print dpi =only ( DPI.\n) print flush
  46. }
  47. if
  48. newpath 0 setgray
  49. /Courier findfont 20 scalefont setfont
  50. Fonts
  51. { save exch
  52. QUIET not { dup ==only flush } if
  53. findfont /basefont exch def
  54. basefont 20 scalefont setfont eol
  55. basefont /FontName get =string cvs show
  56. ( ) show dpi =string cvs show ( DPI) show
  57. Sizes
  58. { QUIET not { ( ) print dup =only flush } if
  59. dup /size exch def basefont exch scalefont setfont eol
  60. size =string cvs show ( ) show
  61. (qwertyuiop-asdfghjkl_zxcvbnm ) show
  62. (QWERTYUIOP+ASDFGHJKL/ZXCVBNM ) show
  63. (1470258369 .,:;?!) show
  64. } forall
  65. QUIET not { () = flush } if
  66. matrix currentmatrix aload pop
  67. 7 -1 roll restore
  68. 6 array astore setmatrix
  69. } forall
  70. showpage
  71. clear cleardictstack
  72. waterfalsave restore