annotate etc/ps-prin1.ps @ 28957:71d552e41a3d

*** empty log message ***
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 17 May 2000 15:24:43 +0000
parents 8e8534ef4b0a
children 66e571cf74c6
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
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
304 {PrintLineStep 1 gt
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
305 {/PrintLineStep PrintLineStep 1 sub def false} % or inside zebra
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
306 {/PrintLineStep ZebraHeight def true}ifelse} % or 1st zebra line
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
307 {LineNumber 1 sub PrintLineStep mod 0 eq}ifelse % or line step
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
308 }def
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
309
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
310 % stack: --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
311 /doLineNumber{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
312 /LineNumber where
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
313 {pop
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
314 isLineStep % or line step
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
315 LineNumber Lines ge or % or last line
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
316 {currentfont
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
317 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
318 0.0 0.0 0.0 setrgbcolor
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
319 /L0 findfont setfont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
320 LineNumber Lines ge
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
321 {(end )}
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
322 {LineNumber 6 string cvs ( ) strcat}ifelse
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
323 dup stringwidth pop neg 0 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
324 show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
325 grestore
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
326 setfont}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
327 /LineNumber LineNumber 1 add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
328 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
329 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
330
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
331 % stack: color-specifier |- --
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
332 /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
333
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
334 % stack: --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
335 /printZebra{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
336 gsave
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
337 ZebraColor SetColor
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
338 /double-zebra ZebraHeight ZebraHeight add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
339 /yiter double-zebra LineHeight mul neg def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
340 /xiter PrintWidth InterColumn add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
341 NumberOfColumns{LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
342 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
343 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
344
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
345 % stack: lines-per-column |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
346 /doColumnZebra{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
347 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
348 dup double-zebra idiv{ZebraHeight doZebra 0 yiter rmoveto}repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
349 double-zebra mod
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
350 dup 0 le{pop}{dup ZebraHeight gt {pop ZebraHeight}if doZebra}ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
351 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
352 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
353
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
354 % stack: zebra-height (in lines) |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
355 /doZebra{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
356 /zh exch 0.05 sub LineHeight mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
357 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
358 0 LineHeight 0.65 mul rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
359 PrintWidth 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
360 0 zh neg rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
361 PrintWidth neg 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
362 0 zh rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
363 fill
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
364 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
365 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
366
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
367 % stack: --
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
368 /printBackground{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
369 /BackgroundColor where{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
370 pop gsave BackgroundColor SetColor
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
371 NumberOfColumns{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
372 gsave
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
373 0 LineHeight 0.65 mul rmoveto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
374 PrintWidth 0 rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
375 0 PrintHeight neg rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
376 PrintWidth neg 0 rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
377 0 PrintHeight rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
378 fill
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
379 grestore
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
380 PrintWidth InterColumn add 0 rmoveto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
381 }repeat
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
382 grestore
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
383 }if
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
384 }def
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
385
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
386 % tx ty rotation xscale yscale xpos ypos BeginBackImage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
387 /BeginBackImage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
388 /-save-image- save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
389 /showpage{}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
390 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
391 scale
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
392 rotate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
393 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
394 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
395
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
396 /EndBackImage{-save-image- restore}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
397
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
398 % string fontsize fontname rotation gray xpos ypos ShowBackText
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
399 /ShowBackText{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
400 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
401 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
402 setgray
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
403 rotate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
404 findfont exch dup /-offset- exch -0.25 mul def scalefont setfont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
405 0 -offset- moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
406 /-saveLineThickness- LineThickness def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
407 /LineThickness 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
408 false doOutline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
409 /LineThickness -saveLineThickness- def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
410 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
411 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
412
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
413 /BeginDoc{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
414 % ---- Remember space width of the normal text font `f0'.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
415 /SpaceWidth /f0 findfont setfont ( ) stringwidth pop def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
416 % ---- save the state of the document (useful for ghostscript!)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
417 /docState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
418 % ---- [andrewi] set PageSize based on chosen dimensions
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
419 UseSetpagedevice{
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
420 BMark /PageSize [PageWidth LandscapePageHeight] EMark setpagedevice
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
421 }{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
422 LandscapeMode{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
423 % ---- translate to bottom-right corner of Portrait page
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
424 LandscapePageHeight 0 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
425 90 rotate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
426 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
427 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
428 % ---- [jack] Kludge: my ghostscript window is 21x27.7 instead of 21x29.7
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
429 /JackGhostscript where{pop 1 27.7 29.7 div scale}if
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
430 UpsideDown{PageWidth LandscapePageHeight translate 180 rotate}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
431 % ---- N-Up printing
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
432 N-Up 1 gt{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
433 % ---- landscape
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
434 N-Up-Landscape{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
435 PageWidth 0 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
436 90 rotate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
437 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
438 N-Up-Margin dup translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
439 % ---- scale
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
440 LandscapeMode{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
441 /HH PageWidth def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
442 /WW LandscapePageHeight def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
443 }{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
444 /HH LandscapePageHeight def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
445 /WW PageWidth def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
446 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
447 WW N-Up-Margin sub N-Up-Margin sub
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
448 N-Up-Landscape
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
449 {N-Up-Lines div HH}{N-Up-Columns N-Up-Missing add div WW}ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
450 div dup scale
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
451 0 N-Up-Repeat 1 sub LandscapePageHeight mul translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
452 % ---- go to start position in page matrix
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
453 N-Up-XStart N-Up-Missing 0.5 mul
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
454 LandscapeMode{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
455 LandscapePageHeight mul N-Up-YStart add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
456 }{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
457 PageWidth mul add N-Up-YStart
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
458 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
459 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
460 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
461 /ColumnWidth PrintWidth InterColumn add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
462 % ---- translate to lower left corner of TEXT
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
463 LeftMargin BottomMargin translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
464 % ---- define where printing will start
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
465 /f0 F % this installs Ascent
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
466 /PrintStartY PrintHeight Ascent sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
467 /ColumnIndex 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
468 /N-Up-Counter N-Up-End 1 sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
469 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
470
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
471 /EndDoc{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
472 % ---- restore the state of the document (useful for ghostscript!)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
473 docState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
474 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
475
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
476 /BeginDSCPage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
477 % ---- when 1st column, save the state of the page
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
478 ColumnIndex 1 eq{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
479 /pageState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
480 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
481 % ---- save the state of the column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
482 /columnState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
483 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
484
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
485 /PrintHeaderWidth PrintOnlyOneHeader{PrintPageWidth}{PrintWidth}ifelse def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
486
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
487 /BeginPage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
488 % ---- when 1st column, print all background effects
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
489 ColumnIndex 1 eq{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
490 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
491 printBackground
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
492 Zebra {printZebra}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
493 printGlobalBackground
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
494 printLocalBackground
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
495 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
496 PrintHeader{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
497 PrintOnlyOneHeader{ColumnIndex 1 eq}{true}ifelse{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
498 PrintHeaderFrame{HeaderFrame}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
499 HeaderText
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
500 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
501 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
502 0 PrintStartY moveto % move to where printing will start
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
503 PLN
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
504 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
505
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
506 /EndPage{bg{eolbg}if}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
507
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
508 /EndDSCPage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
509 ColumnIndex NumberOfColumns eq{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
510 % ---- restore the state of the page
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
511 pageState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
512 /ColumnIndex 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
513 % ---- N-up printing
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
514 N-Up 1 gt{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
515 N-Up-Counter 0 gt{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
516 % ---- Next page on same row
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
517 /N-Up-Counter N-Up-Counter 1 sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
518 N-Up-XColumn N-Up-YColumn
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
519 }{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
520 % ---- Next page on next line
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
521 /N-Up-Counter N-Up-End 1 sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
522 N-Up-XLine N-Up-YLine
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
523 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
524 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
525 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
526 }{ % else
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
527 % ---- restore the state of the current column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
528 columnState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
529 % ---- and translate to the next column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
530 ColumnWidth 0 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
531 /ColumnIndex ColumnIndex 1 add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
532 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
533 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
534
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
535 % stack: number-of-pages-per-sheet |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
536 /BeginSheet{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
537 /sheetState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
538 /pages-per-sheet exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
539 % ---- N-up printing
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
540 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
541 % ---- page border
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
542 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
543 0 setgray
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
544 LeftMargin neg BottomMargin neg moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
545 N-Up-Repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
546 {N-Up-End
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
547 {gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
548 PageWidth 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
549 0 LandscapePageHeight rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
550 PageWidth neg 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
551 closepath stroke
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
552 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
553 /pages-per-sheet pages-per-sheet 1 sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
554 pages-per-sheet 0 le{exit}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
555 N-Up-XColumn N-Up-YColumn rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
556 }repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
557 pages-per-sheet 0 le{exit}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
558 N-Up-XLine N-Up-XColumn sub N-Up-YLine rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
559 }repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
560 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
561 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
562 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
563
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
564 /EndSheet{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
565 showpage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
566 sheetState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
567 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
568
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
569 /SetHeaderLines{ % nb-lines --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
570 /HeaderLines exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
571 % ---- bottom up
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
572 HeaderPad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
573 HeaderLines 1 sub HeaderLineHeight mul add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
574 HeaderTitleLineHeight add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
575 HeaderPad add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
576 /HeaderHeight exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
577 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
578
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
579 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
580 % | tm |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
581 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
582 % | header |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
583 % |-+-------| <-- (x y)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
584 % | ho |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
585 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
586 % | text |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
587 % |-+-------| <-- (0 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
588 % | bm |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
589 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
590
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
591 /HeaderFrameStart{ % -- x y
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
592 0 PrintHeight HeaderOffset add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
593 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
594
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
595 /HeaderFramePath{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
596 PrintHeaderWidth 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
597 0 HeaderHeight rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
598 PrintHeaderWidth neg 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
599 0 HeaderHeight neg rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
600 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
601
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
602 /HeaderFrame{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
603 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
604 0.4 setlinewidth
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
605 % ---- fill a black rectangle (the shadow of the next one)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
606 HeaderFrameStart moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
607 1 -1 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
608 HeaderFramePath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
609 0 setgray fill
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
610 % ---- do the next rectangle ...
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
611 HeaderFrameStart moveto
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 gsave 0.9 setgray fill grestore % filled with grey
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
614 gsave 0 setgray stroke grestore % drawn with black
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
615 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
616 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
617
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
618 /HeaderStart{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
619 HeaderFrameStart
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
620 exch HeaderPad add exch % horizontal pad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
621 % ---- bottom up
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
622 HeaderPad add % vertical pad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
623 HeaderDescent sub
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
624 HeaderLineHeight HeaderLines 1 sub mul add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
625 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
626
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
627 /strcat{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
628 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
629 0 5 -1 roll putinterval
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
630 dup 4 2 roll exch putinterval
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
631 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
632
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
633 /pagenumberstring{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
634 PageNumber 32 string cvs
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
635 ShowNofN{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
636 (/) strcat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
637 PageCount 32 string cvs strcat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
638 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
639 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
640
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
641 /HeaderText{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
642 HeaderStart moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
643
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
644 HeaderLinesRight HeaderLinesLeft % -- rightLines leftLines
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
645
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
646 % ---- hack: `PN 1 and' == `PN 2 modulo'
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
647
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
648 % ---- if even page number and duplex, then exchange left and right
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
649 PageNumber 1 and 0 eq DuplexValue and{exch}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
650
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
651 { % ---- process the left lines
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
652 aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
653 exch F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
654 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
655 dup xcheck{exec}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
656 show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
657 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
658 0 HeaderLineHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
659 }forall
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
660
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
661 HeaderStart moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
662
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
663 { % ---- process the right lines
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
664 aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
665 exch F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
666 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
667 dup xcheck{exec}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
668 dup stringwidth pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
669 PrintHeaderWidth exch sub HeaderPad 2 mul sub 0 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
670 show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
671 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
672 0 HeaderLineHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
673 }forall
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
674 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
675
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
676 /ReportFontInfo{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
677 2 copy
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
678 /t0 3 1 roll DefFont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
679 /t0 F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
680 /lh FontHeight def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
681 /sw ( ) stringwidth pop def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
682 /aw (01234567890abcdefghijklmnopqrstuvwxyz) dup length exch
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
683 stringwidth pop exch div def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
684 /t1 12 /Helvetica-Oblique DefFont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
685 /t1 F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
686 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
687 (languagelevel = ) show
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
688 languagelevel 32 string cvs show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
689 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
690 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
691 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
692 (For ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
693 128 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
694 ( ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
695 32 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
696 ( point, the line height is ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
697 lh 32 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
698 (, the space width is ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
699 sw 32 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
700 (,) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
701 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
702 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
703 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
704 (and a crude estimate of average character width is ) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
705 aw 32 string cvs show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
706 (.) show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
707 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
708 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
709 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
710
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
711 /cm{ % cm to point
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
712 72 mul 2.54 div
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 /ReportAllFontInfo{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
716 FontDirectory
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
717 { % key = font name value = font dictionary
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
718 pop 10 exch ReportFontInfo
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
719 }forall
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
720 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
721
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
722 % 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
723 % 3 cm 20 cm moveto ReportAllFontInfo showpage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
724
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
725 % === END ps-print prologue 1