annotate etc/mule/m2ps.ps @ 84:ac0620f6398e r20-0b92

Import from CVS: tag r20-0b92
author cvs
date Mon, 13 Aug 2007 09:08:29 +0200
parents 131b0175ea99
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1 %!PS
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
2 %% PostScript Header for use by m2ps Ver.2.2
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
3 %% Copyright (C) 1992 Free Software Foundation, Inc.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
4 %%
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
5 %% This file is part of Mule (MULtilingual Enhancement of GNU Emacs).
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
6 %%
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
7 %% Mule is free software distributed in the form of patches to GNU Emacs.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
8 %% You can redistribute it and/or modify
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
9 %% it under the terms of the GNU General Public License as published by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
10 %% the Free Software Foundation; either version 1, or (at your option)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
11 %% any later version.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
12 %%
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
13 %% Mule is distributed in the hope that it will be useful,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
14 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
15 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
16 %% GNU General Public License for more details.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
17 %%
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
18 %% You should have received a copy of the GNU General Public License
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
19 %% along with GNU Emacs; see the file COPYING. If not, write to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
20 %% the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
21 %%
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
22 %% 92.10.8 written by K.Handa <handa@etl.go.jp>
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
23 %% 92.12.15 modified by K.Handa <handa@etl.go.jp>
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
24 %% Support composite character.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
25
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
26 /Mydict 200 dict def % define a working dictionary
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
27 Mydict begin % start using it.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
28
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
29 %%%% Font Manipulation
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
30
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
31 /imagemaskmatrix [0 0 0 0 0 0] def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
32
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
33 /BuildGlyphDefault { % fontdict charname BuildGlyphDefault -
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
34 0 begin
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
35 1 index /CharData get exch get /ch exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
36 /FontSize get /fs exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
37 ch 0 get fs div 0 ch 1 4 getinterval { fs div } forall setcachedevice
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
38 ch 5 get ch 6 get 2 copy
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
39 0 gt exch 0 gt and {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
40 true
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
41 imagemaskmatrix
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
42 dup 0 fs put dup 3 fs neg put
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
43 dup 4 ch 7 get put dup 5 ch 8 get put
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
44 ch 9 1 getinterval cvx
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
45 imagemask
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
46 } {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
47 pop pop
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
48 } ifelse
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
49 end
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
50 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
51
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
52 /BuildGlyphNoCache { % fontdict charname BuildGlyphNoCache -
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
53 0 begin
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
54 1 index /CharData get exch get /ch exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
55 /FontSize get /fs exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
56 ch 0 get fs div 0 setcharwidth
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
57 ch 5 get ch 6 get 2 copy
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
58 0 gt exch 0 gt and {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
59 true
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
60 imagemaskmatrix
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
61 dup 0 fs put dup 3 fs neg put
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
62 dup 4 ch 7 get put dup 5 ch 8 get put
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
63 ch 9 1 getinterval cvx
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
64 imagemask
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
65 } {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
66 pop pop
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
67 } ifelse
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
68 end
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
69 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
71 /BuildGlyphDefault load 0 6 dict put
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
72 /BuildGlyphNoCache load 0 6 dict put
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
73
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
74 /work 4 string def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
75
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
76 /nf { % font fontname fsize bbox rel cache nf - % NEWFONT
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
77 13 dict begin
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
78 /FontType 3 def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
79 %ifelse
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
80 { /BuildGlyph { BuildGlyphDefault } def }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
81 { /BuildGlyph { BuildGlyphNoCache } def }
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
82 ifelse
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
83 /Relative exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
84 /FontBBox exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
85 /FontSize exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
86 /FontMatrix [1 0 0 1 0 0] def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
87 /Encoding 256 array %def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
88 dup 0 1 255 {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
89 dup (XXX) cvs
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
90 (CXXX) work copy pop
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
91 work exch 1 exch putinterval
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
92 work cvn
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
93 put dup
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
94 } for pop
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
95 def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
96 /CharData 256 dict def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
97 /BuildChar {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
98 1 index /Encoding get exch get
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
99 1 index /BuildGlyph get exec
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
100 } def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
101 dup currentdict
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
102 end
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
103 definefont pop
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
104 findfont FontScale scalefont def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
105 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
106
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
107 /g { % charname chardata g - % NEWGLYPH
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
108 currentfont begin
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
109 CharData begin def end
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
110 end
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
111 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
112
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
113 /f { % font f - % SETFONT
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
114 setfont
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
115 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
116
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
117 %%%% Page Control
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
118 /bp { % - bp - % BEGIN OF PAGE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
119 ShortMemory { save /SaveImage exch def } if
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
120 erasepage
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
121 /y TopMargin def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
122 LeftMargin y moveto
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
123 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
124
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
125 /ep { % - ep - % END OF PAGE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
126 copypage
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
127 ShortMemory { SaveImage restore } if
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
128 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
129
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
130 %%%% Miscellaneous Routines for reducing traffic
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
131
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
132 /r { % x r - % MOVE RIGHT
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
133 0 rmoveto
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
134 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
135
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
136 /n { % - n - % NEWLINE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
137 /y y LinePitch sub def LeftMargin y moveto
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
138 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
139
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
140 /s { % string s - % SHOW STRING
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
141 show
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
142 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
143
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
144 /cs1 { % string cs1 - % SHOW COMP-CHAR
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
145 dup 0 get /ch exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
146 currentfont /CharData get currentfont /Encoding get ch get get
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
147 dup 2 get /lly exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
148 4 get /ury exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
149 currentfont /Relative get /rel exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
150 ury rel lt { /ury rel def } if
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
151 lly 0 gt { /lly 0 def } if
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
152 currentpoint /yy exch def /xx exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
153 show
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
154 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
155
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
156 /cs2 { % string cs2 - % SHOW COMP-CHAR
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
157 gsave
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
158 dup 0 get /ch exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
159 currentfont /FontSize get /fs exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
160 currentfont /CharData get currentfont /Encoding get ch get get
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
161 dup 2 get /llyy exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
162 4 get /uryy exch def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
163 xx yy moveto
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
164 llyy rel ge {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
165 0 ury llyy sub 1 add fs div FontScale mul rmoveto
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
166 /ury ury llyy sub uryy add 1 add def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
167 } { uryy 0 le {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
168 0 lly uryy sub 1 sub fs div FontScale mul rmoveto
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
169 /lly lly uryy sub llyy add 1 sub def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
170 } {
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
171 uryy ury gt { /ury uryy def } if
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
172 llyy lly lt { /lly llyy def } if
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
173 } ifelse } ifelse
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
174 show
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
175 grestore
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
176 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
177
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
178 /cs3 { % string cs3 - % SHOW COMP-CHAR
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
179 gsave
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
180 xx yy moveto show
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
181 grestore
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
182 } bind def
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
183
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
184 end % end of Mydict