You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.7 KiB

1 month ago
  1. %!
  2. /waterfalsave save def % prevent residual side effects
  3. % Copyright (C) 1992, 1993, 1996-2023 Aladdin Enterprises.
  4. % All rights reserved.
  5. %
  6. % This software is provided AS-IS with no warranty, either express or
  7. % implied.
  8. %
  9. % This software is distributed under license and may not be copied,
  10. % modified or distributed except as expressly authorized under the terms
  11. % of the license contained in the file LICENSE in this distribution.
  12. %
  13. % For more information about licensing, please refer to
  14. % http://www.ghostscript.com/licensing/. For information on
  15. % commercial licensing, go to http://www.artifex.com/licensing/ or
  16. % contact Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
  17. % CA 94129, USA.
  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. % draw the page landscape
  36. gsave clippath pathbbox grestore
  37. 4 dict begin
  38. /ury exch def /urx exch def /lly exch def /llx exch def
  39. 90 rotate llx neg llx urx sub lly sub translate % llx,lly
  40. end
  41. clippath pathbbox newpath
  42. /ury exch def /urx exch def /lly exch def /llx exch def
  43. llx 18 add ury 18 sub translate
  44. % Read the current Y resolution without using Ghostscript-specific operators.
  45. gsave initmatrix 0 72 dtransform abs exch abs exch .max grestore
  46. round cvi /dpi exch def
  47. QUIET not
  48. { (Creating waterfall printout at ) print dpi =only ( DPI.\n) print flush
  49. }
  50. if
  51. newpath 0 setgray
  52. /Courier findfont 20 scalefont setfont
  53. Fonts
  54. { save exch
  55. QUIET not { dup ==only flush } if
  56. findfont /basefont exch def
  57. basefont 20 scalefont setfont eol
  58. basefont /FontName get =string cvs show
  59. ( ) show dpi =string cvs show ( DPI) show
  60. Sizes
  61. { QUIET not { ( ) print dup =only flush } if
  62. dup /size exch def basefont exch scalefont setfont eol
  63. size =string cvs show ( ) show
  64. (qwertyuiop-asdfghjkl_zxcvbnm ) show
  65. (QWERTYUIOP+ASDFGHJKL/ZXCVBNM ) show
  66. (1470258369 .,:;?!) show
  67. } forall
  68. QUIET not { () = flush } if
  69. matrix currentmatrix aload pop
  70. 7 -1 roll restore
  71. 6 array astore setmatrix
  72. } forall
  73. clear cleardictstack
  74. waterfalsave restore
  75. % Per page independence description in the PLRM Section 3.7.3, showpage follows restore
  76. showpage