annotate etc/ps-prin1.ps @ 66083:3ee176d1ff23

(recentf-track-opened-file) (recentf-track-closed-file, recentf-update-menu) (recentf-used-hooks, recentf-enabled-p): Move before dialog stuff. (recentf-dialog-mode-map): Map follow-link to RET, so dialogs obey mouse-1-click-follows-link.
author David Ponce <david@dponce.com>
date Fri, 14 Oct 2005 09:04:38 +0000
parents 23a17af379b1
children 0717aeaaa61d f9a65d7ebd29
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
31252
cdd489417ae4 Changed comment version (6.0).
Gerd Moellmann <gerd@gnu.org>
parents: 29495
diff changeset
2 % version: 6.0
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
3
54654
f248c564b121 Doc fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 54653
diff changeset
4 % Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
36223
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
5 %
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
6 % This file is part of GNU Emacs.
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
7 %
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
8 % GNU Emacs is free software; you can redistribute it and/or modify
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
9 % it under the terms of the GNU General Public License as published by
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
10 % the Free Software Foundation; either version 2, or (at your option)
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
11 % any later version.
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
12 %
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
13 % GNU Emacs is distributed in the hope that it will be useful,
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
14 % but WITHOUT ANY WARRANTY; without even the implied warranty of
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
15 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
16 % GNU General Public License for more details.
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
17 %
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
18 % You should have received a copy of the GNU General Public License
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
19 % along with GNU Emacs; see the file COPYING. If not, write to the
64083
23a17af379b1 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 54654
diff changeset
20 % Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23a17af379b1 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 54654
diff changeset
21 % Boston, MA 02110-1301, USA.
36223
b5a4db21c424 Add copyright notice.
Gerd Moellmann <gerd@gnu.org>
parents: 36216
diff changeset
22
46014
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
23 % As a special exception, the copyright holders of this module give
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
24 % you permission to include the module in a Postscript file generated
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
25 % by Emacs or other free software together with the result of
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
26 % converting text to be printed, regardless of the license terms of
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
27 % that text, and to use under terms of your choice the page images
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
28 % resulting from formatting said combination. If you modify this
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
29 % module, you may extend this exception to your version of the module
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
30 % but you are not obligated to do so. If you do not wish to do so,
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
31 % delete this exception statement from your version.
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
32
e5675426ff4c Add license exception.
Richard M. Stallman <rms@gnu.org>
parents: 37288
diff changeset
33
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
34 % ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4:
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
35 /ISOLatin1Encoding where{pop}{
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
36 % -- The ISO Latin-1 encoding vector isn't known, so define it.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
37 % -- The first half is the same as the standard encoding,
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
38 % -- except for minus instead of hyphen at code 055.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
39 /ISOLatin1Encoding
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
40 StandardEncoding 0 45 getinterval aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
41 /minus
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
42 StandardEncoding 46 82 getinterval aload pop
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
43 %*** NOTE: the following are missing in the Adobe documentation,
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
44 %*** but appear in the displayed table:
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
45 %*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
46 % 0200 (128)
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
47 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
48 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
49 /dotlessi/grave/acute/circumflex/tilde/macron/breve/dotaccent
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
50 /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
51 % 0240 (160)
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
52 /space/exclamdown/cent/sterling
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
53 /currency/yen/brokenbar/section
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
54 /dieresis/copyright/ordfeminine/guillemotleft
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
55 /logicalnot/hyphen/registered/macron
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
56 /degree/plusminus/twosuperior/threesuperior
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
57 /acute/mu/paragraph/periodcentered
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
58 /cedilla/onesuperior/ordmasculine/guillemotright
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
59 /onequarter/onehalf/threequarters/questiondown
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
60 % 0300 (192)
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
61 /Agrave/Aacute/Acircumflex/Atilde
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
62 /Adieresis/Aring/AE/Ccedilla
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
63 /Egrave/Eacute/Ecircumflex/Edieresis
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
64 /Igrave/Iacute/Icircumflex/Idieresis
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
65 /Eth/Ntilde/Ograve/Oacute
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
66 /Ocircumflex/Otilde/Odieresis/multiply
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
67 /Oslash/Ugrave/Uacute/Ucircumflex
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
68 /Udieresis/Yacute/Thorn/germandbls
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
69 % 0340 (224)
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
70 /agrave/aacute/acircumflex/atilde
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
71 /adieresis/aring/ae/ccedilla
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
72 /egrave/eacute/ecircumflex/edieresis
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
73 /igrave/iacute/icircumflex/idieresis
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
74 /eth/ntilde/ograve/oacute
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
75 /ocircumflex/otilde/odieresis/divide
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
76 /oslash/ugrave/uacute/ucircumflex
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
77 /udieresis/yacute/thorn/ydieresis
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
78 256 packedarray def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
79 }ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
80
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
81 /reencodeFontISO{ %def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
82 dup
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
83 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
84 % as the old one) with room for our new symbols.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
85
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
86 begin % Make the new font the current dictionary.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
87
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
88 % Copy each of the symbols from the old dictionary
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
89 % to the new one except for the font ID.
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
90 {1 index/FID ne{def}{pop pop}ifelse}forall
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
91
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
92 % Override the encoding with the ISOLatin1 encoding.
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
93 currentdict/FontType get 0 ne{/Encoding ISOLatin1Encoding def}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
94
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
95 % Use the font's bounding box to determine the ascent, descent,
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
96 % and overall height; don't forget that these values have to be
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
97 % transformed using the font's matrix.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
98
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
99 % ^ (x2 y2)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
100 % | |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
101 % | v
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
102 % | +----+ - -
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
103 % | | | ^
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
104 % | | | | Ascent (usually > 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
105 % | | | |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
106 % (0 0) -> +--+----+-------->
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
107 % | | |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
108 % | | v Descent (usually < 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
109 % (x1 y1) --> +----+ - -
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
110
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
111 currentdict/FontType get 0 ne
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
112 {/FontBBox load aload pop % -- x1 y1 x2 y2
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
113 FontMatrix transform/Ascent exch def pop
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
114 FontMatrix transform/Descent exch def pop}
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
115 {/PrimaryFont FDepVector 0 get def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
116 PrimaryFont/FontBBox get aload pop
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
117 PrimaryFont/FontMatrix get transform/Ascent exch def pop
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
118 PrimaryFont/FontMatrix get transform/Descent exch def pop}ifelse
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
119
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
120 /FontHeight Ascent Descent sub def % use `sub' because descent < 0
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
121
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
122 % Define these in case they're not in the FontInfo
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
123 % (also, here they're easier to get to).
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
124 /UnderlinePosition Descent 0.70 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
125 /OverlinePosition Descent UnderlinePosition sub Ascent add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
126 /StrikeoutPosition Ascent 0.30 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
127 /LineThickness FontHeight 0.05 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
128 /Xshadow FontHeight 0.08 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
129 /Yshadow FontHeight -0.09 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
130 /SpaceBackground Descent neg UnderlinePosition add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
131 /XBox Descent neg def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
132 /YBox LineThickness 0.7 mul def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
133
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
134 currentdict % Leave the new font on the stack
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
135 end % Stop using the font as the current dictionary.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
136 definefont % Put the font into the font dictionary
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
137 pop % Discard the returned font.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
138 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
139
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
140 % Font definition
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
141 /DefFont{findfont exch scalefont reencodeFontISO}def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
142
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
143 % Font selection
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
144 /F{
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
145 findfont
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
146 dup/Ascent get/Ascent exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
147 dup/Descent get/Descent exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
148 dup/FontHeight get/FontHeight exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
149 dup/UnderlinePosition get/UnderlinePosition exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
150 dup/OverlinePosition get/OverlinePosition exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
151 dup/StrikeoutPosition get/StrikeoutPosition exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
152 dup/LineThickness get/LineThickness exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
153 dup/Xshadow get/Xshadow exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
154 dup/Yshadow get/Yshadow exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
155 dup/SpaceBackground get/SpaceBackground exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
156 dup/XBox get/XBox exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
157 dup/YBox get/YBox exch def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
158 setfont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
159 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
160
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
161 /FG/setrgbcolor load def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
162
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
163 /bg false def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
164 /BG{
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
165 dup/bg exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
166 {[4 1 roll]}
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
167 {[1.0 1.0 1.0]}
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
168 ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
169 /bgcolor exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
170 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
171
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
172 % B width C
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
173 % +-----------+
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
174 % | Ascent (usually > 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
175 % A + +
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
176 % | Descent (usually < 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
177 % +-----------+
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
178 % E width D
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
179
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
180 /dobackground{ % width --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
181 currentpoint % -- width x y
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
182 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
183 newpath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
184 moveto % A (x y)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
185 0 Ascent rmoveto % B
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
186 dup 0 rlineto % C
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
187 0 Descent Ascent sub rlineto % D
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
188 neg 0 rlineto % E
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
189 closepath
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
190 FillBgColor
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
191 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
192 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
193
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
194 /eolbg{ % dobackground until right margin
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
195 PrintWidth % -- x-eol
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
196 currentpoint pop % -- cur-x
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
197 sub % -- width until eol
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
198 dobackground
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
199 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
200
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
201 /LineHS LineHeight LineSpacing add def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
202 /ParagraphHS LineHeight ParagraphSpacing add def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
203 /PSL{/h exch def bg{eolbg}if 0 currentpoint exch pop h sub moveto}def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
204 /PLN{PrintLineNumber{doLineNumber}if}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
205
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
206 /SL{LineHS PSL isLineStep pop}def % Soft Linefeed
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
207
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
208 /PHL{ParagraphHS PSL PLN}def % Paragraph Hard Linefeed
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
209 /LHL{LineHS PSL PLN}def % Hard Linefeed
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
210
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
211 % Some debug
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
212 /dcp{currentpoint exch 40 string cvs print(, )print =}def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
213 /dp{print 2 copy exch 40 string cvs print(, )print =}def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
214
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
215 /W{
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
216 ( )stringwidth % Get the width of a space in the current font.
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
217 pop % Discard the Y component.
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
218 mul % Multiply the width of a space
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
219 % by the number of spaces to plot
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
220 bg{dup dobackground}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
221 0 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
222 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
223
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
224 /Effect 0 def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
225 /EffectUnderline false def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
226 /EffectStrikeout false def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
227 /EffectOverline false def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
228 /EffectShadow false def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
229 /EffectBox false def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
230 /EffectOutline false def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
231
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
232 % effect: 1 - underline 2 - strikeout 4 - overline
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
233 % 8 - shadow 16 - box 32 - outline
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
234 /EF{
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
235 /Effect exch def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
236 /EffectUnderline Effect 1 and 0 ne def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
237 /EffectStrikeout Effect 2 and 0 ne def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
238 /EffectOverline Effect 4 and 0 ne def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
239 /EffectShadow Effect 8 and 0 ne def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
240 /EffectBox Effect 16 and 0 ne def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
241 /EffectOutline Effect 32 and 0 ne def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
242 }def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
243
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
244 % stack: string |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
245 /S{
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
246 /xx currentpoint dup Descent add/yy exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
247 Ascent add/YY exch def def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
248 dup stringwidth pop xx add/XX exch def
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
249 EffectShadow{
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
250 /yy yy Yshadow add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
251 /XX XX Xshadow add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
252 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
253 bg{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
254 true
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
255 EffectBox
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
256 {SpaceBackground doBox}
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
257 {xx yy XX YY doRect}
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
258 ifelse
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
259 }if % background
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
260 EffectBox {false 0 doBox}if % box
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
261 EffectShadow {dup doShadow}if % shadow
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
262 EffectOutline
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
263 {true doOutline} % outline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
264 {show} % normal text
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
265 ifelse
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
266 EffectUnderline{UnderlinePosition Hline}if % underline
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
267 EffectStrikeout{StrikeoutPosition Hline}if % strikeout
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
268 EffectOverline {OverlinePosition Hline}if % overline
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
269 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
270
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
271 % stack: position |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
272 /Hline{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
273 currentpoint exch pop add dup
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
274 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
275 newpath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
276 xx exch moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
277 XX exch lineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
278 closepath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
279 LineThickness setlinewidth stroke
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
280 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
281 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
282
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
283 % stack: fill-or-not delta |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
284 /doBox{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
285 /dd exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
286 xx XBox sub dd sub yy YBox sub dd sub
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
287 XX XBox add dd add YY YBox add dd add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
288 doRect
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
289 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
290
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
291 % stack: fill-or-not lower-x lower-y upper-x upper-y |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
292 /doRect{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
293 /rYY exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
294 /rXX exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
295 /ryy exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
296 /rxx exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
297 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
298 newpath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
299 rXX rYY moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
300 rxx rYY lineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
301 rxx ryy lineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
302 rXX ryy lineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
303 closepath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
304 % top of stack: fill-or-not
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
305 {FillBgColor}
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
306 {LineThickness setlinewidth stroke}ifelse
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
307 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
308 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
309
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
310 % stack: string |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
311 /doShadow{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
312 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
313 Xshadow Yshadow rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
314 false doOutline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
315 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
316 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
317
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
318 /st 1 string def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
319
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
320 % stack: string fill-or-not |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
321 /doOutline{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
322 /-fillp- exch def
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
323 /-ox- currentpoint/-oy- exch def def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
324 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
325 LineThickness setlinewidth
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
326 {st 0 3 -1 roll put
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
327 st dup true charpath
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
328 -fillp- {gsave FillBgColor grestore}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
329 stroke stringwidth
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
330 -oy- add/-oy- exch def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
331 -ox- add/-ox- exch def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
332 -ox- -oy- moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
333 }forall
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
334 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
335 -ox- -oy- moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
336 }bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
337
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 /FillBgColor{bgcolor aload pop setrgbcolor fill}bind def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
340
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
341 % stack: -- |- boolean
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
342 /isLineStep{
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
343 SyncLineZebra
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
344 {PLScounter 0 gt % or zebra
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
345 {/PLScounter PLScounter 1 sub def PLScounter 0 eq}
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
346 {false}ifelse
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
347 PrintLineStep 1 gt
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
348 {/PrintLineStep PrintLineStep 1 sub def}
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
349 {/PrintLineStep ZebraHeight def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
350 /PLScounter PrintLineStart def}ifelse}
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
351 {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
352 }def
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
353
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
354 % stack: --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
355 /doLineNumber{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
356 /LineNumber where
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
357 {pop
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
358 isLineStep % or line step
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
359 LineNumber Lines ge or % or last line
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
360 {currentfont
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
361 gsave
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
362 LineNumberColor SetColor
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
363 /L0 findfont setfont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
364 LineNumber Lines ge
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
365 {(end )}
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
366 {LineNumber 6 string cvs( )strcat}ifelse
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
367 dup stringwidth pop neg 0 rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
368 show
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
369 grestore
28762
8e8534ef4b0a PostScript level 1 compatibility, Upside-down
Gerd Moellmann <gerd@gnu.org>
parents: 28428
diff changeset
370 setfont}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
371 /LineNumber LineNumber 1 add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
372 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
373 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
374
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
375 % stack: color-specifier |- --
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
376 /SetColor{dup type/realtype eq{setgray}{aload pop setrgbcolor}ifelse}def
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
377
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
378 % stack: --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
379 /printZebra{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
380 gsave
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
381 ZebraColor SetColor
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
382 /double-zebra ZebraHeight ZebraHeight add def
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
383 /yiter double-zebra LineHS mul neg def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
384 /xiter PrintWidth InterColumn add def
34918
3256440cb4bf Handle form feed better when ps-zebra-stripe-follow
Gerd Moellmann <gerd@gnu.org>
parents: 34046
diff changeset
385 /zebra-line LinesPrinted def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
386 NumberOfColumns{LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
387 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
388 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
389
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
390 % stack: lines-per-column |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
391 /doColumnZebra{
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
392 /lpc exch def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
393 gsave
36216
aa6d6e43792f Code fix to support `ps-zebra-stripe-follow'
Gerd Moellmann <gerd@gnu.org>
parents: 34918
diff changeset
394 ZebraFollow 1 and 0 ne{
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
395 /H ZebraHeight zebra-line ZebraHeight mod sub def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
396 /lpc lpc H sub def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
397 zebra-line double-zebra mod ZebraHeight lt
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
398 {H doZebra % "black" stripe followed by a "white" stripe
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
399 /lpc lpc ZebraHeight sub def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
400 H ZebraHeight add}
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
401 {H}ifelse % "white" stripe
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
402 LineHS mul neg 0 exch rmoveto
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
403 /zebra-line zebra-line LinesPerColumn add def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
404 }if
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
405 /zspacing 0 def
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
406 lpc dup double-zebra idiv{ZebraHeight doZebra 0 yiter rmoveto}repeat
36216
aa6d6e43792f Code fix to support `ps-zebra-stripe-follow'
Gerd Moellmann <gerd@gnu.org>
parents: 34918
diff changeset
407 double-zebra mod dup 0 le{pop}
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
408 {dup ZebraHeight gt
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
409 {pop ZebraHeight}
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
410 {/zspacing LineSpacing def
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
411 ZebraFollow 2 and 0 ne{pop ZebraHeight}if}ifelse
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
412 doZebra}ifelse
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
413 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
414 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
415
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
416 % stack: zebra-height (in lines) |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
417 /doZebra{
37138
b582e8e39870 Line and paragraph spacing feature.
Gerd Moellmann <gerd@gnu.org>
parents: 36223
diff changeset
418 /zh exch 0.05 sub LineHS mul zspacing sub def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
419 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
420 0 LineHeight 0.65 mul rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
421 PrintWidth 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
422 0 zh neg rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
423 PrintWidth neg 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
424 0 zh rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
425 fill
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
426 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
427 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
428
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
429 % stack: --
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
430 /printBackground{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
431 /BackgroundColor where{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
432 pop gsave BackgroundColor SetColor
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
433 NumberOfColumns{
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
434 gsave
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
435 0 LineHeight 0.65 mul rmoveto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
436 PrintWidth 0 rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
437 0 PrintHeight neg rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
438 PrintWidth neg 0 rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
439 0 PrintHeight rlineto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
440 fill
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
441 grestore
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
442 PrintWidth InterColumn add 0 rmoveto
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
443 }repeat
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
444 grestore
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
445 }if
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
446 }def
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
447
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
448 % tx ty rotation xscale yscale xpos ypos BeginBackImage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
449 /BeginBackImage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
450 /-save-image- save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
451 /showpage{}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
452 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
453 scale
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
454 rotate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
455 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
456 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
457
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
458 /EndBackImage{-save-image- restore}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
459
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
460 % string fontsize fontname rotation gray xpos ypos ShowBackText
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
461 /ShowBackText{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
462 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
463 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
464 setgray
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
465 rotate
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
466 findfont exch dup/-offset- exch -0.25 mul def scalefont setfont
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
467 0 -offset- moveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
468 /-saveLineThickness- LineThickness def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
469 /LineThickness 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
470 false doOutline
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
471 /LineThickness -saveLineThickness- def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
472 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
473 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
474
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
475 /SetPageSize{
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
476 BMark/PageSize[PageWidth LandscapePageHeight LandscapeMode{exch}if]EMark setpagedevice
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
477 }def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
478
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
479 /BeginDoc{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
480 % ---- Remember space width of the normal text font `f0'.
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
481 /SpaceWidth/f0 findfont setfont( )stringwidth pop def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
482 % ---- save the state of the document (useful for ghostscript!)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
483 /docState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
484 % ---- [andrewi] set PageSize based on chosen dimensions
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
485 UseSetpagedevice{
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
486 WarnPaperSize{SetPageSize}{mark{SetPageSize}stopped cleartomark}ifelse
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
487 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
488 /ColumnWidth PrintWidth InterColumn add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
489 % ---- define where printing will start
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
490 /f0 F % this installs Ascent
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
491 /PrintStartY PrintHeight Ascent sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
492 /ColumnIndex 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
493 /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
494 /PLScounter PrintLineStart def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
495 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
496
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
497 /EndDoc{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
498 % ---- restore the state of the document (useful for ghostscript!)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
499 docState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
500 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
501
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
502 /BeginDSCPage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
503 % ---- when 1st column, save the state of the page
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
504 ColumnIndex 1 eq{/pageState save def}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
505 % ---- save the state of the column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
506 /columnState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
507 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
508
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
509 /PrintHeaderWidth PrintOnlyOneHeader{PrintPageWidth}{PrintWidth}ifelse def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
510
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
511 /BeginPage{
34918
3256440cb4bf Handle form feed better when ps-zebra-stripe-follow
Gerd Moellmann <gerd@gnu.org>
parents: 34046
diff changeset
512 /LinesPrinted exch def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
513 % ---- when 1st column, print all background effects
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
514 ColumnIndex 1 eq{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
515 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
516 printBackground
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
517 Zebra{printZebra}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
518 printGlobalBackground
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
519 printLocalBackground
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
520 }if
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
521 PrintOnlyOneHeader{ColumnIndex 1 eq}{true}ifelse
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
522 dup PrintHeader and{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
523 PrintHeaderFrame{HeaderFrame}if
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
524 HeaderText
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
525 }if
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
526 PrintFooter and{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
527 PrintFooterFrame{FooterFrame}if
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
528 FooterText
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
529 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
530 0 PrintStartY moveto % move to where printing will start
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
531 /LineNumber where
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
532 {pop
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
533 SyncLineZebra
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
534 {/H PageNumber 1 sub NumberOfColumns mul ColumnIndex 1 sub add
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
535 LinesPerColumn mul ZebraHeight mod def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
536 /PLScounter H PrintLineStart ge{0}{PrintLineStart H sub}ifelse def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
537 /PrintLineStep ZebraHeight H sub def}if}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
538 PLN
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
539 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
540
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
541 /EndPage{bg{eolbg}if}def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
542
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
543 /EndDSCPage{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
544 ColumnIndex NumberOfColumns eq{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
545 % ---- restore the state of the page
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
546 pageState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
547 /ColumnIndex 1 def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
548 % ---- N-up printing
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
549 N-Up 1 gt{
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
550 N-Up-Counter 0 gt
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
551 {% ---- Next page on same row
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
552 /N-Up-Counter N-Up-Counter 1 sub def
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
553 N-Up-XColumn N-Up-YColumn}
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
554 {% ---- Next page on next line
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
555 /N-Up-Counter N-Up-End 1 sub def
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
556 N-Up-XLine N-Up-YLine}ifelse
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
557 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
558 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
559 }{ % else
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
560 % ---- restore the state of the current column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
561 columnState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
562 % ---- and translate to the next column
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
563 ColumnWidth 0 translate
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
564 /ColumnIndex ColumnIndex 1 add def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
565 }ifelse
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
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
568 /TextStart{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
569 LeftMargin BottomMargin
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
570 PrintFooter{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
571 FooterPad add
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
572 FooterLines FooterLineHeight mul add
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
573 FooterPad add
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
574 FooterOffset add}if
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
575 }def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
576
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
577 % stack: number-of-pages-per-sheet |- --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
578 /BeginSheet{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
579 /sheetState save def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
580 /pages-per-sheet exch def
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
581
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
582 % ---- translate to bottom-right corner of Portrait page
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
583 LandscapeMode{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
584 LandscapePageHeight 0 translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
585 90 rotate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
586 }if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
587 % ---- [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
588 /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
589 UpsideDown{PageWidth LandscapePageHeight translate 180 rotate}if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
590 % ---- N-Up printing
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
591 N-Up 1 gt{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
592 % ---- landscape
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
593 N-Up-Landscape{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
594 PageWidth 0 translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
595 90 rotate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
596 }if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
597 N-Up-Margin dup translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
598 % ---- scale
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
599 LandscapeMode{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
600 /HH PageWidth def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
601 /WW LandscapePageHeight def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
602 }{
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
603 /HH LandscapePageHeight def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
604 /WW PageWidth def
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
605 }ifelse
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
606 /xx 0 def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
607 N-Up-Landscape{
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
608 /ww WW WW mul N-Up-Lines HH mul div def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
609 /cc HH N-Up-Columns N-Up-Missing add div def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
610 ww cc gt{/xx WW def/WW cc ww div WW mul def/xx xx WW sub def}if
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
611 }{
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
612 /hh HH N-Up-Columns N-Up-Missing add div def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
613 /cc HH N-Up-Lines div def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
614 hh cc gt{/xx WW def/WW cc hh div WW mul def/xx xx WW sub def}if
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
615 }ifelse
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
616 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
617 N-Up-Landscape
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
618 {N-Up-Lines div HH}
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
619 {N-Up-Columns N-Up-Missing add div WW}ifelse
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
620 div dup scale
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
621 LandscapeMode{/yy 0 def}{/yy xx def/xx 0 def}ifelse
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
622 xx N-Up-Repeat 1 sub LandscapePageHeight mul yy add translate
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
623 % ---- go to start position in page matrix
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
624 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
625 LandscapeMode
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
626 {LandscapePageHeight mul N-Up-YStart add}
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
627 {PageWidth mul add N-Up-YStart}ifelse
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
628 translate
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
629 }if
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
630 % ---- translate to lower left corner of TEXT
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
631 TextStart translate
28980
66e571cf74c6 PostScript code compatibility with other utilities
Gerd Moellmann <gerd@gnu.org>
parents: 28762
diff changeset
632
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
633 % ---- N-up printing
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
634 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
635 % ---- page border
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
636 gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
637 0 setgray
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
638 TextStart exch neg exch neg moveto
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
639 N-Up-Repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
640 {N-Up-End
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
641 {gsave
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
642 PageWidth 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
643 0 LandscapePageHeight rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
644 PageWidth neg 0 rlineto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
645 closepath stroke
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
646 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
647 /pages-per-sheet pages-per-sheet 1 sub def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
648 pages-per-sheet 0 le{exit}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
649 N-Up-XColumn N-Up-YColumn rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
650 }repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
651 pages-per-sheet 0 le{exit}if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
652 N-Up-XLine N-Up-XColumn sub N-Up-YLine rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
653 }repeat
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
654 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
655 }if
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
656 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
657
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
658 /EndSheet{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
659 showpage
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
660 sheetState restore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
661 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
662
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
663 /SetHeaderLines{ % nb-lines --
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
664 /HeaderLines exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
665 % ---- bottom up
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
666 HeaderPad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
667 HeaderLines 1 sub HeaderLineHeight mul add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
668 HeaderTitleLineHeight add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
669 HeaderPad add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
670 /HeaderHeight exch def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
671 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
672
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
673 /SetFooterLines{ % nb-lines --
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
674 /FooterLines exch def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
675 % ---- bottom up
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
676 FooterPad
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
677 FooterLines FooterLineHeight mul add
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
678 FooterPad add
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
679 /FooterHeight exch def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
680 }def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
681
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
682 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
683 % | tm |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
684 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
685 % | header |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
686 % |-+-------| <-- (x y)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
687 % | ho |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
688 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
689 % | text |
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
690 % |---------|
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
691 % | fo |
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
692 % |---------|
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
693 % | footer |
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
694 % |-+-------| <-- (0 0)
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
695 % | bm |
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
696 % |---------|
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
697
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
698 % -- |- x y
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
699 /HeaderFrameStart{0 PrintHeight HeaderOffset add}def
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
700 /FooterFrameStart{0 FooterHeight FooterOffset add neg}def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
701
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
702 /doFramePath{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
703 /h exch def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
704 PrintHeaderWidth 0 rlineto
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
705 0 h rlineto
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
706 PrintHeaderWidth neg 0 rlineto
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
707 0 h neg rlineto
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
708 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
709
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
710 /HeaderFramePath{HeaderHeight doFramePath}def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
711 /FooterFramePath{FooterHeight doFramePath}def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
712
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
713 % /path-fun /start-fun vector-property doFrame
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
714 /doFrame{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
715 /vecFrame exch def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
716 /startFrame exch load def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
717 /pathFrame exch load def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
718 gsave
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
719 vecFrame 2 get setlinewidth % frame border width
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
720 % ---- do the shadow of the next rectangle
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
721 startFrame moveto
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
722 1 -1 rmoveto
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
723 pathFrame
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
724 vecFrame 4 get SetColor fill % frame shadow color
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
725 % ---- do the next rectangle ...
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
726 startFrame moveto
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
727 pathFrame
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
728 gsave vecFrame 1 get SetColor fill grestore % frame background
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
729 gsave vecFrame 3 get SetColor stroke grestore % frame border color
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
730 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
731 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
732
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
733 /HeaderFrame{/HeaderFramePath /HeaderFrameStart HeaderFrameProperties doFrame}def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
734 /FooterFrame{/FooterFramePath /FooterFrameStart FooterFrameProperties doFrame}def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
735
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
736 /HeaderStart{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
737 HeaderFrameStart
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
738 exch HeaderPad add exch % horizontal pad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
739 % ---- bottom up
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
740 HeaderPad add % vertical pad
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
741 HeaderDescent sub
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
742 HeaderLineHeight HeaderLines 1 sub mul add
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
743 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
744
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
745 /FooterStart{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
746 FooterFrameStart
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
747 exch FooterPad add exch % horizontal pad
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
748 % ---- bottom up
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
749 FooterPad add % vertical pad
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
750 FooterDescent sub
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
751 FooterLineHeight FooterLines 1 sub mul add
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
752 }def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
753
54653
93ff165d67c8 Clip the header and footer area.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 46014
diff changeset
754 /HeaderClip{HeaderFrameStart moveto HeaderFramePath clip}def
93ff165d67c8 Clip the header and footer area.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 46014
diff changeset
755 /FooterClip{FooterFrameStart moveto FooterFramePath clip}def
93ff165d67c8 Clip the header and footer area.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 46014
diff changeset
756
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
757 /strcat{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
758 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
759 0 5 -1 roll putinterval
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
760 dup 4 2 roll exch putinterval
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
761 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
762
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
763 /pagenumberstring{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
764 PageNumber 32 string cvs
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
765 ShowNofN{(/)strcat PageCount 32 string cvs strcat}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
766 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
767
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
768 % lines is-right HeaderOrFooterTextLines
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
769 /HeaderOrFooterTextLines{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
770 /is_right exch def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
771 HFStart moveto
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
772 { % ---- process the lines
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
773 aload pop
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
774 exch F
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
775 gsave
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
776 dup xcheck{exec}if
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
777 is_right{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
778 dup stringwidth pop
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
779 PrintHeaderWidth exch sub HFPad HFPad add sub 0 rmoveto
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
780 }if
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
781 HFColor SetColor
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
782 show
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
783 grestore
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
784 0 HFLineHeight neg rmoveto
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
785 }forall
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
786 }def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
787
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
788 % right-lines left-lines /start lineheight pad fore-color HeaderOrFooterText
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
789 /HeaderOrFooterText{
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
790 /HFColor exch def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
791 /HFPad exch def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
792 /HFLineHeight exch def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
793 /HFStart exch load def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
794
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
795 % -- rightLines leftLines -- at stack
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
796
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
797 % ---- hack: `PN 1 and' == `PN 2 modulo'
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
798 % ---- if even page number and duplex, then exchange left and right
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
799 PageNumber 1 and 0 eq SwitchHeader and{exch}if
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
800
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
801 % ---- process the left lines
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
802 false HeaderOrFooterTextLines
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
803
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
804 % ---- process the right lines
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
805 true HeaderOrFooterTextLines
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
806 }def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
807
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
808 /HeaderText{
54653
93ff165d67c8 Clip the header and footer area.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 46014
diff changeset
809 gsave HeaderClip
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
810 HeaderLinesRight HeaderLinesLeft
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
811 /HeaderStart HeaderLineHeight HeaderPad
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
812 HeaderFrameProperties 0 get
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
813 HeaderOrFooterText
54653
93ff165d67c8 Clip the header and footer area.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 46014
diff changeset
814 grestore
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
815 }def
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
816
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
817 /FooterText{
54653
93ff165d67c8 Clip the header and footer area.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 46014
diff changeset
818 gsave FooterClip
37288
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
819 FooterLinesRight FooterLinesLeft
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
820 /FooterStart FooterLineHeight FooterPad
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
821 FooterFrameProperties 0 get
f7aaa73f592e Footer implementation. Doc fix.
Gerd Moellmann <gerd@gnu.org>
parents: 37138
diff changeset
822 HeaderOrFooterText
54653
93ff165d67c8 Clip the header and footer area.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 46014
diff changeset
823 grestore
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
824 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
825
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
826 /ReportFontInfo{
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
827 2 copy
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
828 /t0 3 1 roll DefFont
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
829 /t0 F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
830 /lh FontHeight def
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
831 /sw( )stringwidth pop def
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
832 /aw(01234567890abcdefghijklmnopqrstuvwxyz)dup length exch
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
833 stringwidth pop exch div def
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
834 /t1 12/Helvetica-Oblique DefFont
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
835 /t1 F
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
836 gsave
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
837 (languagelevel = )show
28428
b2d43a699564 Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28284
diff changeset
838 languagelevel 32 string cvs show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
839 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
840 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
841 gsave
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
842 (For )show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
843 128 string cvs show
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
844 ( )show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
845 32 string cvs show
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
846 ( point, the line height is )show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
847 lh 32 string cvs show
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
848 (, the space width is )show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
849 sw 32 string cvs show
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
850 (,)show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
851 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
852 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
853 gsave
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
854 (and a crude estimate of average character width is )show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
855 aw 32 string cvs show
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
856 (.)show
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
857 grestore
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
858 0 FontHeight neg rmoveto
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
859 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
860
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
861 % cm to point
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
862 /cm{72 mul 2.54 div}def
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
863
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
864 /ReportAllFontInfo{
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
865 % key = font name value = font dictionary
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
866 FontDirectory{pop 10 exch ReportFontInfo}forall
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
867 }def
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
868
29495
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
869 % 3 cm 20 cm moveto 10/Courier ReportFontInfo showpage
a6ce0d37c2cf Insert a version number comment (5.2.2). Can
Gerd Moellmann <gerd@gnu.org>
parents: 28980
diff changeset
870 % 3 cm 20 cm moveto ReportAllFontInfo showpage
27165
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
871
e0beb5cd0257 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
872 % === END ps-print prologue 1