annotate etc/ps-prin1.ps @ 29219:f4e4d31c70f5

Fix keywords.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 25 May 2000 20:24:46 +0000
parents 66e571cf74c6
children a6ce0d37c2cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
1 % === BEGIN ps-print prologue 1
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
2
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
3 % ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4:
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
4 /ISOLatin1Encoding where {pop}{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
5 % -- The ISO Latin-1 encoding vector isn't known, so define it.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
6 % -- The first half is the same as the standard encoding,
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
7 % -- except for minus instead of hyphen at code 055.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
8 /ISOLatin1Encoding
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
9 StandardEncoding 0 45 getinterval aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
10 /minus
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
11 StandardEncoding 46 82 getinterval aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
12 %*** NOTE: the following are missing in the Adobe documentation,
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
13 %*** but appear in the displayed table:
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
14 %*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
15 % 0200 (128)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
16 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
17 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
18 /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
19 /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
20 % 0240 (160)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
21 /space /exclamdown /cent /sterling
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
22 /currency /yen /brokenbar /section
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
23 /dieresis /copyright /ordfeminine /guillemotleft
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
24 /logicalnot /hyphen /registered /macron
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
25 /degree /plusminus /twosuperior /threesuperior
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
26 /acute /mu /paragraph /periodcentered
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
27 /cedilla /onesuperior /ordmasculine /guillemotright
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
28 /onequarter /onehalf /threequarters /questiondown
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
29 % 0300 (192)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
30 /Agrave /Aacute /Acircumflex /Atilde
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
31 /Adieresis /Aring /AE /Ccedilla
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
32 /Egrave /Eacute /Ecircumflex /Edieresis
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
33 /Igrave /Iacute /Icircumflex /Idieresis
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
34 /Eth /Ntilde /Ograve /Oacute
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
35 /Ocircumflex /Otilde /Odieresis /multiply
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
36 /Oslash /Ugrave /Uacute /Ucircumflex
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
37 /Udieresis /Yacute /Thorn /germandbls
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
38 % 0340 (224)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
39 /agrave /aacute /acircumflex /atilde
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
40 /adieresis /aring /ae /ccedilla
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
41 /egrave /eacute /ecircumflex /edieresis
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
42 /igrave /iacute /icircumflex /idieresis
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
43 /eth /ntilde /ograve /oacute
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
44 /ocircumflex /otilde /odieresis /divide
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
45 /oslash /ugrave /uacute /ucircumflex
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
46 /udieresis /yacute /thorn /ydieresis
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
47 256 packedarray def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
48 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
49
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
50 /reencodeFontISO{ %def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
51 dup
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
52 length 12 add dict % Make a new font (a new dict the same size
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
53 % as the old one) with room for our new symbols.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
54
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
55 begin % Make the new font the current dictionary.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
56
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
57
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
58 {1 index /FID ne
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
59 {def}{pop pop}ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
60 }forall % Copy each of the symbols from the old dictionary
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
61 % to the new one except for the font ID.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
62
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
63 currentdict /FontType get 0 ne{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
64 /Encoding ISOLatin1Encoding def % Override the encoding with
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
65 % the ISOLatin1 encoding.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
66 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
67
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
68 % Use the font's bounding box to determine the ascent, descent,
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
69 % and overall height; don't forget that these values have to be
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
70 % transformed using the font's matrix.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
71
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
72 % ^ (x2 y2)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
73 % | |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
74 % | v
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
75 % | +----+ - -
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
76 % | | | ^
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
77 % | | | | Ascent (usually > 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
78 % | | | |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
79 % (0 0) -> +--+----+-------->
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
80 % | | |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
81 % | | v Descent (usually < 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
82 % (x1 y1) --> +----+ - -
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
83
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
84 currentdict /FontType get 0 ne{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
85 /FontBBox load aload pop % -- x1 y1 x2 y2
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
86 FontMatrix transform /Ascent exch def pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
87 FontMatrix transform /Descent exch def pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
88 }{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
89 /PrimaryFont FDepVector 0 get def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
90 PrimaryFont /FontBBox get aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
91 PrimaryFont /FontMatrix get transform /Ascent exch def pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
92 PrimaryFont /FontMatrix get transform /Descent exch def pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
93 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
94
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
95 /FontHeight Ascent Descent sub def % use `sub' because descent < 0
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
96
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
97 % Define these in case they're not in the FontInfo
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
98 % (also, here they're easier to get to).
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
99 /UnderlinePosition Descent 0.70 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
100 /OverlinePosition Descent UnderlinePosition sub Ascent add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
101 /StrikeoutPosition Ascent 0.30 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
102 /LineThickness FontHeight 0.05 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
103 /Xshadow FontHeight 0.08 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
104 /Yshadow FontHeight -0.09 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
105 /SpaceBackground Descent neg UnderlinePosition add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
106 /XBox Descent neg def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
107 /YBox LineThickness 0.7 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
108
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
109 currentdict % Leave the new font on the stack
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
110 end % Stop using the font as the current dictionary.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
111 definefont % Put the font into the font dictionary
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
112 pop % Discard the returned font.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
113 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
114
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
115 /DefFont{ % Font definition
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
116 findfont exch scalefont reencodeFontISO
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
117 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
118
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
119 /F{ % Font selection
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
120 findfont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
121 dup /Ascent get /Ascent exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
122 dup /Descent get /Descent exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
123 dup /FontHeight get /FontHeight exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
124 dup /UnderlinePosition get /UnderlinePosition exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
125 dup /OverlinePosition get /OverlinePosition exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
126 dup /StrikeoutPosition get /StrikeoutPosition exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
127 dup /LineThickness get /LineThickness exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
128 dup /Xshadow get /Xshadow exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
129 dup /Yshadow get /Yshadow exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
130 dup /SpaceBackground get /SpaceBackground exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
131 dup /XBox get /XBox exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
132 dup /YBox get /YBox exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
133 setfont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
134 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
135
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
136 /FG /setrgbcolor load def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
137
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
138 /bg false def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
139 /BG{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
140 dup /bg exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
141 {mark 4 1 roll ]}
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
142 {[ 1.0 1.0 1.0 ]}
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
143 ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
144 /bgcolor exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
145 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
146
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
147 % B width C
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
148 % +-----------+
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
149 % | Ascent (usually > 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
150 % A + +
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
151 % | Descent (usually < 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
152 % +-----------+
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
153 % E width D
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
154
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
155 /dobackground{ % width --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
156 currentpoint % -- width x y
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
157 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
158 newpath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
159 moveto % A (x y)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
160 0 Ascent rmoveto % B
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
161 dup 0 rlineto % C
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
162 0 Descent Ascent sub rlineto % D
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
163 neg 0 rlineto % E
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
164 closepath
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
165 FillBgColor
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
166 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
167 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
168
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
169 /eolbg{ % dobackground until right margin
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
170 PrintWidth % -- x-eol
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
171 currentpoint pop % -- cur-x
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
172 sub % -- width until eol
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
173 dobackground
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
174 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
175
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
176 /PSL{bg{eolbg}if 0 currentpoint exch pop LineHeight sub moveto}def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
177 /PLN{PrintLineNumber{doLineNumber}if}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
178
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
179 /SL{PSL isLineStep pop}def % Soft Linefeed
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
180
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
181 /HL{PSL PLN}def % Hard Linefeed
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
182
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
183 % Some debug
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
184 /dcp{currentpoint exch 40 string cvs print (, ) print =}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
185 /dp{print 2 copy exch 40 string cvs print (, ) print =}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
186
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
187 /W{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
188 ( ) stringwidth % Get the width of a space in the current font.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
189 pop % Discard the Y component.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
190 mul % Multiply the width of a space
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
191 % by the number of spaces to plot
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
192 bg{dup dobackground}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
193 0 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
194 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
195
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
196 /Effect 0 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
197 /EF{/Effect exch def}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
198
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
199 % stack: string |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
200 % effect: 1 - underline 2 - strikeout 4 - overline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
201 % 8 - shadow 16 - box 32 - outline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
202 /S{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
203 /xx currentpoint dup Descent add /yy exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
204 Ascent add /YY exch def def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
205 dup stringwidth pop xx add /XX exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
206 Effect 8 and 0 ne{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
207 /yy yy Yshadow add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
208 /XX XX Xshadow add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
209 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
210 bg{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
211 true
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
212 Effect 16 and 0 ne
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
213 {SpaceBackground doBox}
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
214 {xx yy XX YY doRect}
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
215 ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
216 }if % background
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
217 Effect 16 and 0 ne{false 0 doBox}if % box
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
218 Effect 8 and 0 ne{dup doShadow}if % shadow
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
219 Effect 32 and 0 ne
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
220 {true doOutline} % outline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
221 {show} % normal text
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
222 ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
223 Effect 1 and 0 ne{UnderlinePosition Hline}if % underline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
224 Effect 2 and 0 ne{StrikeoutPosition Hline}if % strikeout
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
225 Effect 4 and 0 ne{OverlinePosition Hline}if % overline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
226 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
227
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
228 % stack: position |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
229 /Hline{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
230 currentpoint exch pop add dup
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
231 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
232 newpath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
233 xx exch moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
234 XX exch lineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
235 closepath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
236 LineThickness setlinewidth stroke
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
237 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
238 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
239
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
240 % stack: fill-or-not delta |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
241 /doBox{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
242 /dd exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
243 xx XBox sub dd sub yy YBox sub dd sub
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
244 XX XBox add dd add YY YBox add dd add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
245 doRect
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
246 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
247
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
248 % stack: fill-or-not lower-x lower-y upper-x upper-y |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
249 /doRect{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
250 /rYY exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
251 /rXX exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
252 /ryy exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
253 /rxx exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
254 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
255 newpath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
256 rXX rYY moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
257 rxx rYY lineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
258 rxx ryy lineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
259 rXX ryy lineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
260 closepath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
261 % top of stack: fill-or-not
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
262 {FillBgColor}
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
263 {LineThickness setlinewidth stroke}
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
264 ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
265 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
266 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
267
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
268 % stack: string |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
269 /doShadow{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
270 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
271 Xshadow Yshadow rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
272 false doOutline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
273 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
274 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
275
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
276 /st 1 string def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
277
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
278 % stack: string fill-or-not |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
279 /doOutline{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
280 /-fillp- exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
281 /-ox- currentpoint /-oy- exch def def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
282 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
283 LineThickness setlinewidth
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
284 {st 0 3 -1 roll put
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
285 st dup true charpath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
286 -fillp- {gsave FillBgColor grestore}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
287 stroke stringwidth
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
288 -oy- add /-oy- exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
289 -ox- add /-ox- exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
290 -ox- -oy- moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
291 }forall
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
292 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
293 -ox- -oy- moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
294 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
295
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
296 % stack: --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
297 /FillBgColor{bgcolor aload pop setrgbcolor fill}bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
298
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
299 /L0 6 /Times-Italic DefFont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
300
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
301 % stack: -- |- boolean
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
302 /isLineStep{
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
303 SyncLineZebra
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
304 {PLScounter 0 gt % or zebra
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
305 {/PLScounter PLScounter 1 sub def PLScounter 0 eq}
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
306 {false}ifelse
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
307 PrintLineStep 1 gt
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
308 {/PrintLineStep PrintLineStep 1 sub def}
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
309 {/PrintLineStep ZebraHeight def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
310 /PLScounter PrintLineStart def}ifelse}
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
311 {LineNumber PrintLineStart sub PrintLineStep mod 0 eq}ifelse % or line step
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
312 }def
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
313
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
314 % stack: --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
315 /doLineNumber{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
316 /LineNumber where
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
317 {pop
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
318 isLineStep % or line step
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
319 LineNumber Lines ge or % or last line
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
320 {currentfont
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
321 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
322 0.0 0.0 0.0 setrgbcolor
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
323 /L0 findfont setfont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
324 LineNumber Lines ge
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
325 {(end )}
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
326 {LineNumber 6 string cvs ( ) strcat}ifelse
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
327 dup stringwidth pop neg 0 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
328 show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
329 grestore
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
330 setfont}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
331 /LineNumber LineNumber 1 add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
332 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
333 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
334
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
335 % stack: color-specifier |- --
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
336 /SetColor{dup type /realtype eq{setgray}{aload pop setrgbcolor}ifelse}def
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
337
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
338 % stack: --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
339 /printZebra{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
340 gsave
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
341 ZebraColor SetColor
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
342 /double-zebra ZebraHeight ZebraHeight add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
343 /yiter double-zebra LineHeight mul neg def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
344 /xiter PrintWidth InterColumn add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
345 NumberOfColumns{LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
346 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
347 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
348
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
349 % stack: lines-per-column |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
350 /doColumnZebra{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
351 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
352 dup double-zebra idiv{ZebraHeight doZebra 0 yiter rmoveto}repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
353 double-zebra mod
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
354 dup 0 le{pop}{dup ZebraHeight gt {pop ZebraHeight}if doZebra}ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
355 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
356 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
357
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
358 % stack: zebra-height (in lines) |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
359 /doZebra{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
360 /zh exch 0.05 sub LineHeight mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
361 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
362 0 LineHeight 0.65 mul rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
363 PrintWidth 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
364 0 zh neg rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
365 PrintWidth neg 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
366 0 zh rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
367 fill
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
368 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
369 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
370
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
371 % stack: --
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
372 /printBackground{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
373 /BackgroundColor where{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
374 pop gsave BackgroundColor SetColor
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
375 NumberOfColumns{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
376 gsave
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
377 0 LineHeight 0.65 mul rmoveto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
378 PrintWidth 0 rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
379 0 PrintHeight neg rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
380 PrintWidth neg 0 rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
381 0 PrintHeight rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
382 fill
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
383 grestore
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
384 PrintWidth InterColumn add 0 rmoveto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
385 }repeat
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
386 grestore
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
387 }if
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
388 }def
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
389
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
390 % tx ty rotation xscale yscale xpos ypos BeginBackImage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
391 /BeginBackImage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
392 /-save-image- save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
393 /showpage{}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
394 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
395 scale
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
396 rotate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
397 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
398 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
399
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
400 /EndBackImage{-save-image- restore}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
401
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
402 % string fontsize fontname rotation gray xpos ypos ShowBackText
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
403 /ShowBackText{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
404 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
405 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
406 setgray
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
407 rotate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
408 findfont exch dup /-offset- exch -0.25 mul def scalefont setfont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
409 0 -offset- moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
410 /-saveLineThickness- LineThickness def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
411 /LineThickness 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
412 false doOutline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
413 /LineThickness -saveLineThickness- def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
414 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
415 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
416
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
417 /BeginDoc{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
418 % ---- Remember space width of the normal text font `f0'.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
419 /SpaceWidth /f0 findfont setfont ( ) stringwidth pop def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
420 % ---- save the state of the document (useful for ghostscript!)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
421 /docState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
422 % ---- [andrewi] set PageSize based on chosen dimensions
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
423 UseSetpagedevice{
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
424 BMark/PageSize[PageWidth LandscapePageHeight LandscapeMode{exch}if]EMark setpagedevice
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
425 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
426 /ColumnWidth PrintWidth InterColumn add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
427 % ---- define where printing will start
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
428 /f0 F % this installs Ascent
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
429 /PrintStartY PrintHeight Ascent sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
430 /ColumnIndex 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
431 /N-Up-Counter N-Up-End 1 sub def
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
432 /PLScounter PrintLineStart def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
433 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
434
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
435 /EndDoc{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
436 % ---- restore the state of the document (useful for ghostscript!)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
437 docState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
438 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
439
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
440 /BeginDSCPage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
441 % ---- when 1st column, save the state of the page
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
442 ColumnIndex 1 eq{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
443 /pageState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
444 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
445 % ---- save the state of the column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
446 /columnState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
447 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
448
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
449 /PrintHeaderWidth PrintOnlyOneHeader{PrintPageWidth}{PrintWidth}ifelse def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
450
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
451 /BeginPage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
452 % ---- when 1st column, print all background effects
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
453 ColumnIndex 1 eq{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
454 0 PrintStartY moveto % move to where printing will start
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
455 printBackground
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
456 Zebra {printZebra}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
457 printGlobalBackground
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
458 printLocalBackground
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
459 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
460 PrintHeader{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
461 PrintOnlyOneHeader{ColumnIndex 1 eq}{true}ifelse{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
462 PrintHeaderFrame{HeaderFrame}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
463 HeaderText
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
464 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
465 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
466 0 PrintStartY moveto % move to where printing will start
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
467 PLN
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
468 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
469
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
470 /EndPage{bg{eolbg}if}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
471
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
472 /EndDSCPage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
473 ColumnIndex NumberOfColumns eq{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
474 % ---- restore the state of the page
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
475 pageState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
476 /ColumnIndex 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
477 % ---- N-up printing
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
478 N-Up 1 gt{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
479 N-Up-Counter 0 gt{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
480 % ---- Next page on same row
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
481 /N-Up-Counter N-Up-Counter 1 sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
482 N-Up-XColumn N-Up-YColumn
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
483 }{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
484 % ---- Next page on next line
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
485 /N-Up-Counter N-Up-End 1 sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
486 N-Up-XLine N-Up-YLine
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
487 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
488 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
489 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
490 }{ % else
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
491 % ---- restore the state of the current column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
492 columnState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
493 % ---- and translate to the next column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
494 ColumnWidth 0 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
495 /ColumnIndex ColumnIndex 1 add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
496 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
497 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
498
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
499 % stack: number-of-pages-per-sheet |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
500 /BeginSheet{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
501 /sheetState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
502 /pages-per-sheet exch def
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
503
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
504 % ---- translate to bottom-right corner of Portrait page
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
505 LandscapeMode{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
506 LandscapePageHeight 0 translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
507 90 rotate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
508 }if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
509 % ---- [jack] Kludge: my ghostscript window is 21x27.7 instead of 21x29.7
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
510 /JackGhostscript where{pop 1 27.7 29.7 div scale}if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
511 UpsideDown{PageWidth LandscapePageHeight translate 180 rotate}if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
512 % ---- N-Up printing
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
513 N-Up 1 gt{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
514 % ---- landscape
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
515 N-Up-Landscape{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
516 PageWidth 0 translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
517 90 rotate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
518 }if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
519 N-Up-Margin dup translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
520 % ---- scale
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
521 LandscapeMode{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
522 /HH PageWidth def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
523 /WW LandscapePageHeight def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
524 }{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
525 /HH LandscapePageHeight def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
526 /WW PageWidth def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
527 }ifelse
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
528 WW N-Up-Margin sub N-Up-Margin sub
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
529 N-Up-Landscape
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
530 {N-Up-Lines div HH}{N-Up-Columns N-Up-Missing add div WW}ifelse
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
531 div dup scale
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
532 0 N-Up-Repeat 1 sub LandscapePageHeight mul translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
533 % ---- go to start position in page matrix
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
534 N-Up-XStart N-Up-Missing 0.5 mul
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
535 LandscapeMode
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
536 {LandscapePageHeight mul N-Up-YStart add}
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
537 {PageWidth mul add N-Up-YStart}ifelse
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
538 translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
539 }if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
540 % ---- translate to lower left corner of TEXT
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
541 LeftMargin BottomMargin translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
542
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
543 % ---- N-up printing
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
544 N-Up 1 gt N-Up-Border and pages-per-sheet 0 gt and{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
545 % ---- page border
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
546 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
547 0 setgray
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
548 LeftMargin neg BottomMargin neg moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
549 N-Up-Repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
550 {N-Up-End
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
551 {gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
552 PageWidth 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
553 0 LandscapePageHeight rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
554 PageWidth neg 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
555 closepath stroke
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
556 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
557 /pages-per-sheet pages-per-sheet 1 sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
558 pages-per-sheet 0 le{exit}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
559 N-Up-XColumn N-Up-YColumn rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
560 }repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
561 pages-per-sheet 0 le{exit}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
562 N-Up-XLine N-Up-XColumn sub N-Up-YLine rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
563 }repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
564 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
565 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
566 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
567
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
568 /EndSheet{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
569 showpage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
570 sheetState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
571 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
572
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
573 /SetHeaderLines{ % nb-lines --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
574 /HeaderLines exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
575 % ---- bottom up
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
576 HeaderPad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
577 HeaderLines 1 sub HeaderLineHeight mul add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
578 HeaderTitleLineHeight add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
579 HeaderPad add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
580 /HeaderHeight exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
581 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
582
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
583 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
584 % | tm |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
585 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
586 % | header |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
587 % |-+-------| <-- (x y)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
588 % | ho |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
589 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
590 % | text |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
591 % |-+-------| <-- (0 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
592 % | bm |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
593 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
594
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
595 /HeaderFrameStart{ % -- x y
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
596 0 PrintHeight HeaderOffset add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
597 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
598
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
599 /HeaderFramePath{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
600 PrintHeaderWidth 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
601 0 HeaderHeight rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
602 PrintHeaderWidth neg 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
603 0 HeaderHeight neg rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
604 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
605
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
606 /HeaderFrame{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
607 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
608 0.4 setlinewidth
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
609 % ---- fill a black rectangle (the shadow of the next one)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
610 HeaderFrameStart moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
611 1 -1 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
612 HeaderFramePath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
613 0 setgray fill
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
614 % ---- do the next rectangle ...
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
615 HeaderFrameStart moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
616 HeaderFramePath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
617 gsave 0.9 setgray fill grestore % filled with grey
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
618 gsave 0 setgray stroke grestore % drawn with black
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
619 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
620 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
621
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
622 /HeaderStart{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
623 HeaderFrameStart
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
624 exch HeaderPad add exch % horizontal pad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
625 % ---- bottom up
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
626 HeaderPad add % vertical pad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
627 HeaderDescent sub
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
628 HeaderLineHeight HeaderLines 1 sub mul add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
629 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
630
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
631 /strcat{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
632 dup length 3 -1 roll dup length dup 4 -1 roll add string dup
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
633 0 5 -1 roll putinterval
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
634 dup 4 2 roll exch putinterval
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
635 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
636
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
637 /pagenumberstring{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
638 PageNumber 32 string cvs
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
639 ShowNofN{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
640 (/) strcat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
641 PageCount 32 string cvs strcat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
642 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
643 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
644
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
645 /HeaderText{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
646 HeaderStart moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
647
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
648 HeaderLinesRight HeaderLinesLeft % -- rightLines leftLines
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
649
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
650 % ---- hack: `PN 1 and' == `PN 2 modulo'
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
651
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
652 % ---- if even page number and duplex, then exchange left and right
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
653 PageNumber 1 and 0 eq DuplexValue and{exch}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
654
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
655 { % ---- process the left lines
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
656 aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
657 exch F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
658 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
659 dup xcheck{exec}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
660 show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
661 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
662 0 HeaderLineHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
663 }forall
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
664
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
665 HeaderStart moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
666
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
667 { % ---- process the right lines
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
668 aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
669 exch F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
670 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
671 dup xcheck{exec}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
672 dup stringwidth pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
673 PrintHeaderWidth exch sub HeaderPad 2 mul sub 0 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
674 show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
675 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
676 0 HeaderLineHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
677 }forall
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
678 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
679
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
680 /ReportFontInfo{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
681 2 copy
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
682 /t0 3 1 roll DefFont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
683 /t0 F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
684 /lh FontHeight def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
685 /sw ( ) stringwidth pop def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
686 /aw (01234567890abcdefghijklmnopqrstuvwxyz) dup length exch
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
687 stringwidth pop exch div def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
688 /t1 12 /Helvetica-Oblique DefFont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
689 /t1 F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
690 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
691 (languagelevel = ) show
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
692 languagelevel 32 string cvs show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
693 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
694 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
695 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
696 (For ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
697 128 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
698 ( ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
699 32 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
700 ( point, the line height is ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
701 lh 32 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
702 (, the space width is ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
703 sw 32 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
704 (,) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
705 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
706 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
707 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
708 (and a crude estimate of average character width is ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
709 aw 32 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
710 (.) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
711 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
712 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
713 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
714
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
715 /cm{ % cm to point
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
716 72 mul 2.54 div
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
717 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
718
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
719 /ReportAllFontInfo{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
720 FontDirectory
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
721 { % key = font name value = font dictionary
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
722 pop 10 exch ReportFontInfo
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
723 }forall
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
724 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
725
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
726 % 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
727 % 3 cm 20 cm moveto ReportAllFontInfo showpage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
728
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
729 % === END ps-print prologue 1