summaryrefslogtreecommitdiff
path: root/Master/xemtex/doc/ghostscript/examples/waterfal.ps
blob: 0236f8f06a2bc4951303824b0d32726c6e690a97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
%!
/waterfalsave save def	% prevent residual side effects
%    Copyright (C) 1992, 1993, 1996 Aladdin Enterprises.  All rights reserved.
% 
% This program is free software; you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation; either version 2 of the License, or (at your
% option) any later version.
%
% This program is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
% Public License for more details.
%
% You should have received a copy of the GNU General Public License along
% with this program; if not, write to the Free Software Foundation, Inc.,
% 59 Temple Place, Suite 330, Boston, MA, 02111-1307.

% $Id: waterfal.ps,v 1.3.2.1.2.1 2003/04/12 14:02:38 giles Exp $
% waterfal.ps
% This file produces a 'waterfall' printout of fonts at various sizes.


% Specify any desired set of up to 3 fonts here.
/Fonts [/Courier /Helvetica] def

% Specify any desired set of point sizes here.
% The sum of the sizes should not exceed (roughly) 100.
% For sizes larger than about 16, some characters may fall off the page.
/Sizes [6 7 8 9 10 11 12 14 16] def

/eol
 { currentfont /FontBBox get aload pop
   exch pop sub exch pop 0 exch
	% Many Ghostscript fonts have incorrect FontBBoxes....
	pop -1000
   1.15 mul currentfont /FontMatrix get dtransform
   translate
   0 0 moveto
 } def

(landscap.ps) runlibfile
clippath pathbbox newpath
/ury exch def /urx exch def /lly exch def /llx exch def
llx 18 add ury 18 sub translate
% Read the current Y resolution without using Ghostscript-specific operators.
gsave initmatrix 0 72 dtransform abs exch abs exch .max grestore
round cvi /dpi exch def
QUIET not
 { (Creating waterfall printout at ) print dpi =only ( DPI.\n) print flush
 }
if

newpath 0 setgray
/Courier findfont 20 scalefont setfont

Fonts
 { save exch
   QUIET not { dup ==only flush } if
   findfont /basefont exch def
   basefont 20 scalefont setfont eol
   basefont /FontName get =string cvs show
   ( ) show dpi =string cvs show ( DPI) show
   Sizes
    { QUIET not { ( ) print dup =only flush } if
      dup /size exch def basefont exch scalefont setfont eol
      size =string cvs show ( ) show
      (qwertyuiop-asdfghjkl_zxcvbnm ) show
      (QWERTYUIOP+ASDFGHJKL/ZXCVBNM ) show
      (1470258369 .,:;?!) show
    } forall
   QUIET not { () = flush } if
   matrix currentmatrix aload pop
   7 -1 roll restore
   6 array astore setmatrix
 } forall

showpage
clear cleardictstack
waterfalsave restore