waterfal.ps 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. %!
  2. /waterfalsave save def % prevent residual side effects
  3. % Copyright (C) 1992, 1993, 1996 Aladdin Enterprises. All rights reserved.
  4. %
  5. % This software is provided AS-IS with no warranty, either express or
  6. % implied.
  7. %
  8. % This software is distributed under license and may not be copied,
  9. % modified or distributed except as expressly authorized under the terms
  10. % of the license contained in the file LICENSE in this distribution.
  11. %
  12. % For more information about licensing, please refer to
  13. % http://www.ghostscript.com/licensing/. For information on
  14. % commercial licensing, go to http://www.artifex.com/licensing/ or
  15. % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  16. % San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  17. % $Id: waterfal.ps,v 1.5 2002/02/21 22:49:46 giles Exp $
  18. % waterfal.ps
  19. % This file produces a 'waterfall' printout of fonts at various sizes.
  20. % Specify any desired set of up to 3 fonts here.
  21. /Fonts [/Courier /Helvetica] def
  22. % Specify any desired set of point sizes here.
  23. % The sum of the sizes should not exceed (roughly) 100.
  24. % For sizes larger than about 16, some characters may fall off the page.
  25. /Sizes [6 7 8 9 10 11 12 14 16] def
  26. /eol
  27. { currentfont /FontBBox get aload pop
  28. exch pop sub exch pop 0 exch
  29. % Many Ghostscript fonts have incorrect FontBBoxes....
  30. pop -1000
  31. 1.15 mul currentfont /FontMatrix get dtransform
  32. translate
  33. 0 0 moveto
  34. } def
  35. (landscap.ps) runlibfile
  36. clippath pathbbox newpath
  37. /ury exch def /urx exch def /lly exch def /llx exch def
  38. llx 18 add ury 18 sub translate
  39. % Read the current Y resolution without using Ghostscript-specific operators.
  40. gsave initmatrix 0 72 dtransform abs exch abs exch .max grestore
  41. round cvi /dpi exch def
  42. QUIET not
  43. { (Creating waterfall printout at ) print dpi =only ( DPI.\n) print flush
  44. }
  45. if
  46. newpath 0 setgray
  47. /Courier findfont 20 scalefont setfont
  48. Fonts
  49. { save exch
  50. QUIET not { dup ==only flush } if
  51. findfont /basefont exch def
  52. basefont 20 scalefont setfont eol
  53. basefont /FontName get =string cvs show
  54. ( ) show dpi =string cvs show ( DPI) show
  55. Sizes
  56. { QUIET not { ( ) print dup =only flush } if
  57. dup /size exch def basefont exch scalefont setfont eol
  58. size =string cvs show ( ) show
  59. (qwertyuiop-asdfghjkl_zxcvbnm ) show
  60. (QWERTYUIOP+ASDFGHJKL/ZXCVBNM ) show
  61. (1470258369 .,:;?!) show
  62. } forall
  63. QUIET not { () = flush } if
  64. matrix currentmatrix aload pop
  65. 7 -1 roll restore
  66. 6 array astore setmatrix
  67. } forall
  68. showpage
  69. clear cleardictstack
  70. waterfalsave restore