Mercurial > emacs
annotate lisp/ps-print.el @ 23762:f69129948f65
(read_process_output): Call signal_after_change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 25 Nov 1998 01:26:56 +0000 |
parents | cfeb9bcbd372 |
children | 422bd4826b2c |
rev | line source |
---|---|
19485
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
1 ;;; ps-print.el --- Print text from the buffer as PostScript |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
3 ;; Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. |
7257 | 4 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5 ;; Author: Jim Thompson (was <thompson@wg2.waii.com>) |
23551 | 6 ;; Author: Jacques Duthen (was <duthen@cegelec-red.fr>) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
7 ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> |
23551 | 8 ;; Author: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) |
9 ;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) | |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
10 ;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br> |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
11 ;; Keywords: print, PostScript |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
12 ;; Time-stamp: <98/10/13 15:42:23 vinicius> |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
13 ;; Version: 4.1.1 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
14 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
15 (defconst ps-print-version "4.1.1" |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
16 "ps-print.el, v 4.1.1 <98/10/13 vinicius> |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
17 |
19485
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
18 Vinicius's last change version -- this file may have been edited as part of |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
19 Emacs without changes to the version number. When reporting bugs, |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
20 please also report the version of Emacs, if any, that ps-print was |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
21 distributed with. |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
22 |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
23 Please send all bug fixes and enhancements to |
20331 | 24 Vinicius Jose Latorre <vinicius@cpqd.com.br>. |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
25 ") |
7257 | 26 |
10493 | 27 ;; This file is part of GNU Emacs. |
7257 | 28 |
29 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
30 ;; it under the terms of the GNU General Public License as published by | |
31 ;; the Free Software Foundation; either version 2, or (at your option) | |
32 ;; any later version. | |
33 | |
34 ;; GNU Emacs is distributed in the hope that it will be useful, | |
35 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
36 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
37 ;; GNU General Public License for more details. | |
38 | |
39 ;; You should have received a copy of the GNU General Public License | |
14169 | 40 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
41 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
42 ;; Boston, MA 02111-1307, USA. | |
7257 | 43 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
44 ;;; Commentary: |
7257 | 45 |
46 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
47 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
48 ;; About ps-print |
7257 | 49 ;; -------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
50 ;; |
7257 | 51 ;; This package provides printing of Emacs buffers on PostScript |
52 ;; printers; the buffer's bold and italic text attributes are | |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
53 ;; preserved in the printer output. ps-print is intended for use with |
10683 | 54 ;; Emacs 19 or Lucid Emacs, together with a fontifying package such as |
55 ;; font-lock or hilit. | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
56 ;; |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
57 ;; ps-print uses the same face attributes defined through font-lock or hilit |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
58 ;; to print a PostScript file, but some faces are better seeing on the screen |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
59 ;; than on paper, specially when you have a black/white PostScript printer. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
60 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
61 ;; ps-print allows a remap of face to another one that it is better to print, |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
62 ;; for example, the face font-lock-comment-face (if you are using font-lock) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
63 ;; could have bold or italic attribute when printing, besides foreground color. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
64 ;; This remap improves printing look (see How Ps-Print Maps Faces). |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
65 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
66 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
67 ;; Using ps-print |
7257 | 68 ;; -------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
69 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
70 ;; The Commands |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
71 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
72 ;; ps-print provides eight commands for generating PostScript images |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
73 ;; of Emacs buffers: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
74 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
75 ;; ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
76 ;; ps-print-buffer-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
77 ;; ps-print-region |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
78 ;; ps-print-region-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
79 ;; ps-spool-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
80 ;; ps-spool-buffer-with-faces |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
81 ;; ps-spool-region |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
82 ;; ps-spool-region-with-faces |
7257 | 83 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
84 ;; These commands all perform essentially the same function: they |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
85 ;; generate PostScript images suitable for printing on a PostScript |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
86 ;; printer or displaying with GhostScript. These commands are |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
87 ;; collectively referred to as "ps-print- commands". |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
88 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
89 ;; The word "print" or "spool" in the command name determines when the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
90 ;; PostScript image is sent to the printer: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
91 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
92 ;; print - The PostScript image is immediately sent to the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
93 ;; printer; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
94 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
95 ;; spool - The PostScript image is saved temporarily in an |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
96 ;; Emacs buffer. Many images may be spooled locally |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
97 ;; before printing them. To send the spooled images |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
98 ;; to the printer, use the command `ps-despool'. |
7257 | 99 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
100 ;; The spooling mechanism was designed for printing lots of small |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
101 ;; files (mail messages or netnews articles) to save paper that would |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
102 ;; otherwise be wasted on banner pages, and to make it easier to find |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
103 ;; your output at the printer (it's easier to pick up one 50-page |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
104 ;; printout than to find 50 single-page printouts). |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
105 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
106 ;; ps-print has a hook in the `kill-emacs-hook' so that you won't |
14040 | 107 ;; accidentally quit from Emacs while you have unprinted PostScript |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
108 ;; waiting in the spool buffer. If you do attempt to exit with |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
109 ;; spooled PostScript, you'll be asked if you want to print it, and if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
110 ;; you decline, you'll be asked to confirm the exit; this is modeled |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
111 ;; on the confirmation that Emacs uses for modified buffers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
112 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
113 ;; The word "buffer" or "region" in the command name determines how |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
114 ;; much of the buffer is printed: |
7257 | 115 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
116 ;; buffer - Print the entire buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
117 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
118 ;; region - Print just the current region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
119 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
120 ;; The -with-faces suffix on the command name means that the command |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
121 ;; will include font, color, and underline information in the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
122 ;; PostScript image, so the printed image can look as pretty as the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
123 ;; buffer. The ps-print- commands without the -with-faces suffix |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
124 ;; don't include font, color, or underline information; images printed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
125 ;; with these commands aren't as pretty, but are faster to generate. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
126 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
127 ;; Two ps-print- command examples: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
128 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
129 ;; ps-print-buffer - print the entire buffer, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
130 ;; without font, color, or |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
131 ;; underline information, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
132 ;; send it immediately to the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
133 ;; printer. |
7257 | 134 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
135 ;; ps-spool-region-with-faces - print just the current region; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
136 ;; include font, color, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
137 ;; underline information, and |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
138 ;; spool the image in Emacs to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
139 ;; send to the printer later. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
140 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
141 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
142 ;; Invoking Ps-Print |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
143 ;; ----------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
144 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
145 ;; To print your buffer, type |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
146 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
147 ;; M-x ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
148 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
149 ;; or substitute one of the other seven ps-print- commands. The |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
150 ;; command will generate the PostScript image and print or spool it as |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
151 ;; specified. By giving the command a prefix argument |
7257 | 152 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
153 ;; C-u M-x ps-print-buffer |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
154 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
155 ;; it will save the PostScript image to a file instead of sending it |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
156 ;; to the printer; you will be prompted for the name of the file to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
157 ;; save the image to. The prefix argument is ignored by the commands |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
158 ;; that spool their images, but you may save the spooled images to a |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
159 ;; file by giving a prefix argument to `ps-despool': |
7257 | 160 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
161 ;; C-u M-x ps-despool |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
162 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
163 ;; When invoked this way, `ps-despool' will prompt you for the name of |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
164 ;; the file to save to. |
7257 | 165 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
166 ;; Any of the `ps-print-' commands can be bound to keys; I recommend |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
167 ;; binding `ps-spool-buffer-with-faces', `ps-spool-region-with-faces', |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
168 ;; and `ps-despool'. Here are the bindings I use on my Sun 4 keyboard: |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
169 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
170 ;; (global-set-key 'f22 'ps-spool-buffer-with-faces) ;f22 is prsc |
7257 | 171 ;; (global-set-key '(shift f22) 'ps-spool-region-with-faces) |
172 ;; (global-set-key '(control f22) 'ps-despool) | |
173 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
174 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
175 ;; The Printer Interface |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
176 ;; --------------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
177 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
178 ;; The variables `ps-lpr-command' and `ps-lpr-switches' determine what |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
179 ;; command is used to send the PostScript images to the printer, and |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
180 ;; what arguments to give the command. These are analogous to |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
181 ;; `lpr-command' and `lpr-switches'. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
182 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
183 ;; Make sure that they contain appropriate values for your system; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
184 ;; see the usage notes below and the documentation of these variables. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
185 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
186 ;; The variable `ps-printer-name' determine the name of a local printer for |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
187 ;; printing PostScript files. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
188 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
189 ;; NOTE: `ps-lpr-command' and `ps-lpr-switches' take their initial values |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
190 ;; from the variables `lpr-command' and `lpr-switches'. If you have |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
191 ;; `lpr-command' set to invoke a pretty-printer such as `enscript', |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
192 ;; then ps-print won't work properly. `ps-lpr-command' must name |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
193 ;; a program that does not format the files it prints. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
194 ;; `ps-printer-name' takes its initial value from the variable |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
195 ;; `printer-name'. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
196 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
197 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
198 ;; The Page Layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
199 ;; --------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
200 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
201 ;; All dimensions are floats in PostScript points. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
202 ;; 1 inch == 2.54 cm == 72 points |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
203 ;; 1 cm == (/ 1 2.54) inch == (/ 72 2.54) points |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
204 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
205 ;; The variable `ps-paper-type' determines the size of paper ps-print |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
206 ;; formats for; it should contain one of the symbols: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
207 ;; `a4' `a3' `letter' `legal' `letter-small' `tabloid' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
208 ;; `ledger' `statement' `executive' `a4small' `b4' `b5' |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
209 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
210 ;; The variable `ps-landscape-mode' determines the orientation |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
211 ;; of the printing on the page: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
212 ;; nil means `portrait' mode, non-nil means `landscape' mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
213 ;; There is no oblique mode yet, though this is easy to do in ps. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
214 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
215 ;; In landscape mode, the text is NOT scaled: you may print 70 lines |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
216 ;; in portrait mode and only 50 lignes in landscape mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
217 ;; The margins represent margins in the printed paper: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
218 ;; the top margin is the margin between the top of the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
219 ;; and the printed header, whatever the orientation is. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
220 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
221 ;; The variable `ps-number-of-columns' determines the number of columns |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
222 ;; both in landscape and portrait mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
223 ;; You can use: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
224 ;; - (the standard) one column portrait mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
225 ;; - (my favorite) two columns landscape mode (which spares trees) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
226 ;; but also |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
227 ;; - one column landscape mode for files with very long lines. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
228 ;; - multi-column portrait or landscape mode |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
229 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
230 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
231 ;; Horizontal layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
232 ;; ----------------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
233 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
234 ;; The horizontal layout is determined by the variables |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
235 ;; `ps-left-margin' `ps-inter-column' `ps-right-margin' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
236 ;; as follows: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
237 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
238 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
239 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
240 ;; | lm | text | ic | text | ic | text | rm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
241 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
242 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
243 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
244 ;; If `ps-number-of-columns' is 1, `ps-inter-column' is not relevant. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
245 ;; Usually, lm = rm > 0 and ic = lm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
246 ;; If (ic < 0), the text of adjacent columns can overlap. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
247 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
248 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
249 ;; Vertical layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
250 ;; --------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
251 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
252 ;; The vertical layout is determined by the variables |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
253 ;; `ps-bottom-margin' `ps-top-margin' `ps-header-offset' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
254 ;; as follows: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
255 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
256 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
257 ;; | tm | | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
258 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
259 ;; | header | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
260 ;; |--------| | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
261 ;; | ho | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
262 ;; |--------| or | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
263 ;; | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
264 ;; | text | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
265 ;; | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
266 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
267 ;; | bm | | bm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
268 ;; |--------| |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
269 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
270 ;; If `ps-print-header' is nil, `ps-header-offset' is not relevant. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
271 ;; The margins represent margins in the printed paper: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
272 ;; the top margin is the margin between the top of the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
273 ;; and the printed header, whatever the orientation is. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
274 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
275 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
276 ;; Headers |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
277 ;; ------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
278 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
279 ;; ps-print can print headers at the top of each column or at the top |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
280 ;; of each page; the default headers contain the following four items: |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
281 ;; on the left, the name of the buffer and, if the buffer is visiting |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
282 ;; a file, the file's directory; on the right, the page number and |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
283 ;; date of printing. The default headers look something like this: |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
284 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
285 ;; ps-print.el 1/21 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
286 ;; /home/jct/emacs-lisp/ps/new 94/12/31 |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
287 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
288 ;; When printing on duplex printers, left and right are reversed so |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
289 ;; that the page numbers are toward the outside (cf. `ps-spool-duplex'). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
290 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
291 ;; Headers are configurable: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
292 ;; To turn them off completely, set `ps-print-header' to nil. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
293 ;; To turn off the header's gaudy framing box, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
294 ;; set `ps-print-header-frame' to nil. |
7257 | 295 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
296 ;; To print only one header at the top of each page, |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
297 ;; set `ps-print-only-one-header' to t. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
298 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
299 ;; The font family and size of text in the header are determined |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
300 ;; by the variables `ps-header-font-family', `ps-header-font-size' and |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
301 ;; `ps-header-title-font-size' (see below). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
302 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
303 ;; The variable `ps-header-line-pad' determines the portion of a header |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
304 ;; title line height to insert between the header frame and the text |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
305 ;; it contains, both in the vertical and horizontal directions: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
306 ;; .5 means half a line. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
307 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
308 ;; Page numbers are printed in `n/m' format, indicating page n of m pages; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
309 ;; to omit the total page count and just print the page number, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
310 ;; set `ps-show-n-of-n' to nil. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
311 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
312 ;; The amount of information in the header can be changed by changing |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
313 ;; the number of lines. To show less, set `ps-header-lines' to 1, and |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
314 ;; the header will show only the buffer name and page number. To show |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
315 ;; more, set `ps-header-lines' to 3, and the header will show the time of |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
316 ;; printing below the date. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
317 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
318 ;; To change the content of the headers, change the variables |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
319 ;; `ps-left-header' and `ps-right-header'. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
320 ;; These variables are lists, specifying top-to-bottom the text |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
321 ;; to display on the left or right side of the header. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
322 ;; Each element of the list should be a string or a symbol. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
323 ;; Strings are inserted directly into the PostScript arrays, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
324 ;; and should contain the PostScript string delimiters '(' and ')'. |
7257 | 325 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
326 ;; Symbols in the header format lists can either represent functions |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
327 ;; or variables. Functions are called, and should return a string to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
328 ;; show in the header. Variables should contain strings to display in |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
329 ;; the header. In either case, function or variable, the PostScript |
14040 | 330 ;; string delimiters are added by ps-print, and should not be part of |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
331 ;; the returned value. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
332 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
333 ;; Here's an example: say we want the left header to display the text |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
334 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
335 ;; Moe |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
336 ;; Larry |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
337 ;; Curly |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
338 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
339 ;; where we have a function to return "Moe" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
340 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
341 ;; (defun moe-func () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
342 ;; "Moe") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
343 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
344 ;; a variable specifying "Larry" |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
345 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
346 ;; (setq larry-var "Larry") |
7257 | 347 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
348 ;; and a literal for "Curly". Here's how `ps-left-header' should be |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
349 ;; set: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
350 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
351 ;; (setq ps-left-header (list 'moe-func 'larry-var "(Curly)")) |
7257 | 352 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
353 ;; Note that Curly has the PostScript string delimiters inside his |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
354 ;; quotes -- those aren't misplaced lisp delimiters! |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
355 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
356 ;; Without them, PostScript would attempt to call the undefined |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
357 ;; function Curly, which would result in a PostScript error. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
358 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
359 ;; Since most printers don't report PostScript errors except by |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
360 ;; aborting the print job, this kind of error can be hard to track down. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
361 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
362 ;; Consider yourself warned! |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
363 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
364 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
365 ;; PostScript Prologue Header |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
366 ;; -------------------------- |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
367 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
368 ;; It is possible to add PostScript prologue header comments besides that |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
369 ;; ps-print generates by setting the variable `ps-print-prologue-header'. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
370 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
371 ;; `ps-print-prologue-header' may be a string or a symbol function which |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
372 ;; returns a string. Note that this string is inserted on PostScript prologue |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
373 ;; header section which is used to define some document characteristic through |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
374 ;; PostScript special comments, like "%%Requirements: jog\n". |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
375 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
376 ;; By default `ps-print-prologue-header' is nil. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
377 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
378 ;; ps-print always inserts the %%Requirements: comment, so if you need to insert |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
379 ;; more requirements put them first in `ps-print-prologue-header' using the |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
380 ;; "%%+" comment. For example, if you need to set numcopies to 3 and jog on |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
381 ;; requirements and set %%LanguageLevel: to 2, do: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
382 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
383 ;; (setq ps-print-prologue-header |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
384 ;; "%%+ numcopies(3) jog\n%%LanguageLevel: 2\n") |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
385 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
386 ;; The duplex requirement is inserted by ps-print (see section Duplex Printers). |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
387 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
388 ;; Do not forget to terminate the string with "\n". |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
389 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
390 ;; For more information about PostScript document comments, see: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
391 ;; PostScript Language Reference Manual (2nd edition) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
392 ;; Adobe Systems Incorporated |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
393 ;; Appendix G: Document Structuring Conventions -- Version 3.0 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
394 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
395 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
396 ;; Duplex Printers |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
397 ;; --------------- |
7257 | 398 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
399 ;; If you have a duplex-capable printer (one that prints both sides of |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
400 ;; the paper), set `ps-spool-duplex' to t. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
401 ;; ps-print will insert blank pages to make sure each buffer starts |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
402 ;; on the correct side of the paper. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
403 ;; Don't forget to set `ps-lpr-switches' to select duplex printing |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
404 ;; for your printer. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
405 ;; |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
406 ;; |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
407 ;; Control And 8-bit Characters |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
408 ;; ---------------------------- |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
409 ;; |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
410 ;; The variable `ps-print-control-characters' specifies whether you want to see |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
411 ;; a printable form for control and 8-bit characters, that is, instead of |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
412 ;; sending, for example, a ^D (\004) to printer, it is sent the string "^D". |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
413 ;; |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
414 ;; Valid values for `ps-print-control-characters' are: |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
415 ;; |
23307 | 416 ;; 8-bit This is the value to use when you want an ASCII encoding of |
417 ;; any control or non-ASCII character. Control characters are | |
418 ;; encoded as "^D", and non-ASCII characters have an | |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
419 ;; octal encoding. |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
420 ;; |
23307 | 421 ;; control-8-bit This is the value to use when you want an ASCII encoding of |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
422 ;; any control character, whether it is 7 or 8-bit. |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
423 ;; European 8-bits accented characters are printed according |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
424 ;; the current font. |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
425 ;; |
23307 | 426 ;; control Only ASCII control characters have an ASCII encoding. |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
427 ;; European 8-bits accented characters are printed according |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
428 ;; the current font. |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
429 ;; |
23307 | 430 ;; nil No ASCII encoding. Any character is printed according the |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
431 ;; current font. |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
432 ;; |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
433 ;; Any other value is treated as nil. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
434 ;; |
21955
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
435 ;; The default is `control-8-bit'. |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
436 ;; |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
437 ;; Characters TAB, NEWLINE and FORMFEED are always treated by ps-print engine. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
438 ;; |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
439 ;; |
23551 | 440 ;; Printing Multi-byte Buffer |
441 ;; -------------------------- | |
442 ;; | |
443 ;; The variable `ps-multibyte-buffer' specifies the ps-print multi-byte buffer | |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
444 ;; handling. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
445 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
446 ;; Valid values for `ps-multibyte-buffer' are: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
447 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
448 ;; nil This is the value to use when you are printing |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
449 ;; buffer with only ASCII and Latin characters. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
450 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
451 ;; `non-latin-printer' This is the value to use when you have a japanese |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
452 ;; or korean PostScript printer and want to print |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
453 ;; buffer with ASCII, Latin-1, Japanese (JISX0208 and |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
454 ;; JISX0201-Kana) and Korean characters. At present, |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
455 ;; it was not tested the Korean characters printing. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
456 ;; If you have a korean PostScript printer, please, |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
457 ;; test it. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
458 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
459 ;; `bdf-font' This is the value to use when you want to print |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
460 ;; buffer with BDF fonts. BDF fonts include both latin |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
461 ;; and non-latin fonts. BDF (Bitmap Distribution |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
462 ;; Format) is a format used for distributing X's font |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
463 ;; source file. BDF fonts are included in |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
464 ;; `intlfonts-1.1' which is a collection of X11 fonts |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
465 ;; for all characters supported by Emacs. In order to |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
466 ;; use this value, be sure to have installed |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
467 ;; `intlfonts-1.1' and set the variable |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
468 ;; `bdf-directory-list' appropriately (see bdf.el for |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
469 ;; documentation of this variable). |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
470 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
471 ;; `bdf-font-except-latin' This is like `bdf-font' except that it is used |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
472 ;; PostScript default fonts to print ASCII and Latin-1 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
473 ;; characters. This is convenient when you want or |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
474 ;; need to use both latin and non-latin characters on |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
475 ;; the same buffer. See `ps-font-family', |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
476 ;; `ps-header-font-family' and `ps-font-info-database'. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
477 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
478 ;; Any other value is treated as nil. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
479 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
480 ;; The default is nil. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
481 ;; |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
482 ;; |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
483 ;; Line Number |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
484 ;; ----------- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
485 ;; |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
486 ;; The variable `ps-line-number' specifies whether to number each line; |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
487 ;; non-nil means do so. The default is nil (don't number each line). |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
488 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
489 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
490 ;; Zebra Stripes |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
491 ;; ------------- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
492 ;; |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
493 ;; Zebra stripes are a kind of background that appear "underneath" the text |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
494 ;; and can make the text easier to read. They look like this: |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
495 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
496 ;; XXXXXXXXXXXXXXXXXXXXXXXX |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
497 ;; XXXXXXXXXXXXXXXXXXXXXXXX |
19485
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
498 ;; XXXXXXXXXXXXXXXXXXXXXXXX |
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
499 ;; |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
500 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
501 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
502 ;; XXXXXXXXXXXXXXXXXXXXXXXX |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
503 ;; XXXXXXXXXXXXXXXXXXXXXXXX |
19485
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
504 ;; XXXXXXXXXXXXXXXXXXXXXXXX |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
505 ;; |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
506 ;; The blocks of X's represent rectangles filled with a light gray color. |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
507 ;; Each rectangle extends all the way across the page. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
508 ;; |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
509 ;; The height, in lines, of each rectangle is controlled by |
19485
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
510 ;; the variable `ps-zebra-stripe-height', which is 3 by default. |
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
511 ;; The distance between stripes equals the height of a stripe. |
20331 | 512 ;; |
19787
4ea00387fb08
(ps-setup): ps-zebra-stripe => ps-zebra-stripes.
Richard M. Stallman <rms@gnu.org>
parents:
19773
diff
changeset
|
513 ;; The variable `ps-zebra-stripes' controls whether to print zebra stripes. |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
514 ;; Non-nil means yes, nil means no. The default is nil. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
515 ;; |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
516 ;; See also section How Ps-Print Has A Text And/Or Image On Background. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
517 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
518 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
519 ;; Hooks |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
520 ;; ----- |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
521 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
522 ;; ps-print has the following hook variables: |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
523 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
524 ;; `ps-print-hook' |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
525 ;; It is evaluated once before any printing process. This is the right |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
526 ;; place to initialize ps-print global data. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
527 ;; For an example, see section Adding a New Font Family. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
528 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
529 ;; `ps-print-begin-page-hook' |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
530 ;; It is evaluated on each real beginning of page, that is, ps-print |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
531 ;; considers each beginning of column as a beginning of page, and a real |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
532 ;; beginning of page is when the beginning of column coincides with a |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
533 ;; paper change on your printer. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
534 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
535 ;; `ps-print-begin-column-hook' |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
536 ;; It is evaluated on each beginning of column, except in the beginning |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
537 ;; of column that `ps-print-begin-page-hook' is evaluated. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
538 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
539 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
540 ;; Font Managing |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
541 ;; ------------- |
7257 | 542 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
543 ;; ps-print now knows rather precisely some fonts: |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
544 ;; the variable `ps-font-info-database' contains information |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
545 ;; for a list of font families (currently mainly `Courier' `Helvetica' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
546 ;; `Times' `Palatino' `Helvetica-Narrow' `NewCenturySchlbk'). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
547 ;; Each font family contains the font names for standard, bold, italic |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
548 ;; and bold-italic characters, a reference size (usually 10) and the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
549 ;; corresponding line height, width of a space and average character width. |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
550 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
551 ;; The variable `ps-font-family' determines which font family |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
552 ;; is to be used for ordinary text. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
553 ;; If its value does not correspond to a known font family, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
554 ;; an error message is printed into the `*Messages*' buffer, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
555 ;; which lists the currently available font families. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
556 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
557 ;; The variable `ps-font-size' determines the size (in points) |
23138
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
558 ;; of the font for ordinary text, when generating PostScript. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
559 ;; Its value is a float. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
560 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
561 ;; Similarly, the variable `ps-header-font-family' determines |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
562 ;; which font family is to be used for text in the header. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
563 ;; The variable `ps-header-font-size' determines the font size, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
564 ;; in points, for text in the header. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
565 ;; The variable `ps-header-title-font-size' determines the font size, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
566 ;; in points, for the top line of text in the header. |
7257 | 567 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
568 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
569 ;; Adding a New Font Family |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
570 ;; ------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
571 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
572 ;; To use a new font family, you MUST first teach ps-print |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
573 ;; this font, i.e., add its information to `ps-font-info-database', |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
574 ;; otherwise ps-print cannot correctly place line and page breaks. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
575 ;; |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
576 ;; For example, assuming `Helvetica' is unknown, |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
577 ;; you first need to do the following ONLY ONCE: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
578 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
579 ;; - create a new buffer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
580 ;; - generate the PostScript image to a file (C-u M-x ps-print-buffer) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
581 ;; - open this file and find the line: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
582 ;; `% 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage' |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
583 ;; - delete the leading `%' (which is the PostScript comment character) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
584 ;; - replace in this line `Courier' by the new font (say `Helvetica') |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
585 ;; to get the line: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
586 ;; `3 cm 20 cm moveto 10 /Helvetica ReportFontInfo showpage' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
587 ;; - send this file to the printer (or to ghostscript). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
588 ;; You should read the following on the output page: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
589 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
590 ;; For Helvetica 10 point, the line height is 11.56, the space width is 2.78 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
591 ;; and a crude estimate of average character width is 5.09243 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
592 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
593 ;; - Add these values to the `ps-font-info-database': |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
594 ;; (setq ps-font-info-database |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
595 ;; (append |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
596 ;; '((Helvetica ; the family key |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
597 ;; (fonts (normal . "Helvetica") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
598 ;; (bold . "Helvetica-Bold") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
599 ;; (italic . "Helvetica-Oblique") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
600 ;; (bold-italic . "Helvetica-BoldOblique")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
601 ;; (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
602 ;; (line-height . 11.56) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
603 ;; (space-width . 2.78) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
604 ;; (avg-char-width . 5.09243))) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
605 ;; ps-font-info-database)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
606 ;; - Now you can use this font family with any size: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
607 ;; (setq ps-font-family 'Helvetica) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
608 ;; - if you want to use this family in another emacs session, you must |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
609 ;; put into your `~/.emacs': |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
610 ;; (require 'ps-print) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
611 ;; (setq ps-font-info-database (append ...))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
612 ;; if you don't want to load ps-print, you have to copy the whole value: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
613 ;; (setq ps-font-info-database '(<your stuff> <the standard stuff>)) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
614 ;; or, use `ps-print-hook' (see section Hooks): |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
615 ;; (add-hook 'ps-print-hook |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
616 ;; '(lambda () (setq ps-font-info-database (append ...)))) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
617 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
618 ;; You can create new `mixed' font families like: |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
619 ;; (my-mixed-family |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
620 ;; (fonts (normal . "Courier-Bold") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
621 ;; (bold . "Helvetica") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
622 ;; (italic . "Zapf-Chancery-MediumItalic") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
623 ;; (bold-italic . "NewCenturySchlbk-BoldItalic") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
624 ;; (w3-table-hack-x-face . "LineDrawNormal")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
625 ;; (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
626 ;; (line-height . 10.55) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
627 ;; (space-width . 6.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
628 ;; (avg-char-width . 6.0)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
629 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
630 ;; Now you can use your new font family with any size: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
631 ;; (setq ps-font-family 'my-mixed-family) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
632 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
633 ;; Note that on above example the `w3-table-hack-x-face' entry refers to |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
634 ;; a face symbol, so when printing this face it'll be used the font |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
635 ;; `LineDrawNormal'. If the face `w3-table-hack-x-face' is remapped to |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
636 ;; use bold and/or italic attribute, the corresponding entry (bold, italic |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
637 ;; or bold-italic) will be used instead of `w3-table-hack-x-face' entry. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
638 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
639 ;; Note also that the font family entry order is irrelevant, so the above |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
640 ;; example could also be written: |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
641 ;; (my-mixed-family |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
642 ;; (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
643 ;; (fonts (w3-table-hack-x-face . "LineDrawNormal") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
644 ;; (bold . "Helvetica") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
645 ;; (bold-italic . "NewCenturySchlbk-BoldItalic") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
646 ;; (italic . "Zapf-Chancery-MediumItalic") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
647 ;; (normal . "Courier-Bold")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
648 ;; (avg-char-width . 6.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
649 ;; (space-width . 6.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
650 ;; (line-height . 10.55)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
651 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
652 ;; Despite the note above, it is recommended that some convention about |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
653 ;; entry order be used. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
654 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
655 ;; You can get information on all the fonts resident in YOUR printer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
656 ;; by uncommenting the line: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
657 ;; % 3 cm 20 cm moveto ReportAllFontInfo showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
658 ;; |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
659 ;; The PostScript file should be sent to YOUR PostScript printer. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
660 ;; If you send it to ghostscript or to another PostScript printer, |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
661 ;; you may get slightly different results. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
662 ;; Anyway, as ghostscript fonts are autoload, you won't get |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
663 ;; much font info. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
664 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
665 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
666 ;; How Ps-Print Deals With Faces |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
667 ;; ----------------------------- |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
668 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
669 ;; The ps-print-*-with-faces commands attempt to determine which faces |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
670 ;; should be printed in bold or italic, but their guesses aren't |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
671 ;; always right. For example, you might want to map colors into faces |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
672 ;; so that blue faces print in bold, and red faces in italic. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
673 ;; |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
674 ;; It is possible to force ps-print to consider specific faces bold, |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
675 ;; italic or underline, no matter what font they are displayed in, by setting |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
676 ;; the variables `ps-bold-faces', `ps-italic-faces' and `ps-underlined-faces'. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
677 ;; These variables contain lists of faces that ps-print should consider bold, |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
678 ;; italic or underline; to set them, put code like the following into your |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
679 ;; .emacs file: |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
680 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
681 ;; (setq ps-bold-faces '(my-blue-face)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
682 ;; (setq ps-italic-faces '(my-red-face)) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
683 ;; (setq ps-underlined-faces '(my-green-face)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
684 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
685 ;; Faces like bold-italic that are both bold and italic should go in |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
686 ;; *both* lists. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
687 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
688 ;; ps-print keeps internal lists of which fonts are bold and which are |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
689 ;; italic; these lists are built the first time you invoke ps-print. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
690 ;; For the sake of efficiency, the lists are built only once; the same |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
691 ;; lists are referred in later invocations of ps-print. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
692 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
693 ;; Because these lists are built only once, it's possible for them to |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
694 ;; get out of sync, if a face changes, or if new faces are added. To |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
695 ;; get the lists back in sync, you can set the variable |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
696 ;; `ps-build-face-reference' to t, and the lists will be rebuilt the |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
697 ;; next time ps-print is invoked. If you need that the lists always be |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
698 ;; rebuilt when ps-print is invoked, set the variable |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
699 ;; `ps-always-build-face-reference' to t. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
700 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
701 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
702 ;; How Ps-Print Deals With Color |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
703 ;; ----------------------------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
704 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
705 ;; ps-print detects faces with foreground and background colors |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
706 ;; defined and embeds color information in the PostScript image. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
707 ;; The default foreground and background colors are defined by the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
708 ;; variables `ps-default-fg' and `ps-default-bg'. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
709 ;; On black-and-white printers, colors are displayed in grayscale. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
710 ;; To turn off color output, set `ps-print-color-p' to nil. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
711 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
712 ;; |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
713 ;; How Ps-Print Maps Faces |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
714 ;; ----------------------- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
715 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
716 ;; As ps-print uses PostScript to print buffers, it is possible to have |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
717 ;; other attributes associated with faces. So the new attributes used |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
718 ;; by ps-print are: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
719 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
720 ;; strikeout - like underline, but the line is in middle of text. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
721 ;; overline - like underline, but the line is over the text. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
722 ;; shadow - text will have a shadow. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
723 ;; box - text will be surrounded by a box. |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
724 ;; outline - print characters as hollow outlines. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
725 ;; |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
726 ;; See the documentation for `ps-extend-face'. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
727 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
728 ;; Let's, for example, remap font-lock-keyword-face to another foreground color |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
729 ;; and bold attribute: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
730 ;; |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
731 ;; (ps-extend-face '(font-lock-keyword-face "RoyalBlue" nil bold) 'MERGE) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
732 ;; |
19446
15ecd855fec8
(ps-print-face-extension-alist): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19445
diff
changeset
|
733 ;; If you want to use a new face, define it first with `defface', |
15ecd855fec8
(ps-print-face-extension-alist): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19445
diff
changeset
|
734 ;; and then call `ps-extend-face' to specify how to print it. |
15ecd855fec8
(ps-print-face-extension-alist): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19445
diff
changeset
|
735 ;; |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
736 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
737 ;; How Ps-Print Has A Text And/Or Image On Background |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
738 ;; -------------------------------------------------- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
739 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
740 ;; ps-print can print texts and/or EPS PostScript images on background; it is |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
741 ;; possible to define the following text attributes: font name, font size, |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
742 ;; initial position, angle, gray scale and pages to print. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
743 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
744 ;; It has the following EPS PostScript images attributes: file name containing |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
745 ;; the image, initial position, X and Y scales, angle and pages to print. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
746 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
747 ;; See documentation for `ps-print-background-text' and |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
748 ;; `ps-print-background-image'. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
749 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
750 ;; For example, if we wish to print text "preliminary" on all pages and text |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
751 ;; "special" on page 5 and from page 11 to page 17, we could specify: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
752 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
753 ;; (setq ps-print-background-text |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
754 ;; '(("preliminary") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
755 ;; ("special" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
756 ;; "LeftMargin" "BottomMargin PrintHeight add" ; X and Y position |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
757 ;; ; (upper left corner) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
758 ;; nil nil nil |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
759 ;; "PrintHeight neg PrintPageWidth atan" ; angle |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
760 ;; 5 (11 . 17)) ; page list |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
761 ;; )) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
762 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
763 ;; Similarly, we could print image "~/images/EPS-image1.ps" on all pages and |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
764 ;; image "~/images/EPS-image2.ps" on page 5 and from page 11 to page 17, we |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
765 ;; specify: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
766 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
767 ;; (setq ps-print-background-image |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
768 ;; '(("~/images/EPS-image1.ps" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
769 ;; "LeftMargin" "BottomMargin") ; X and Y position (lower left corner) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
770 ;; ("~/images/EPS-image2.ps" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
771 ;; "LeftMargin" "BottomMargin PrintHeight 2 div add" ; X and Y position |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
772 ;; ; (upper left corner) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
773 ;; nil nil nil |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
774 ;; 5 (11 . 17)) ; page list |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
775 ;; )) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
776 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
777 ;; If it is not possible to read (or does not exist) an image file, that file |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
778 ;; is ignored. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
779 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
780 ;; The printing order is: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
781 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
782 ;; 1. Print zebra stripes |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
783 ;; 2. Print background texts that it should be on all pages |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
784 ;; 3. Print background images that it should be on all pages |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
785 ;; 4. Print background texts only for current page (if any) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
786 ;; 5. Print background images only for current page (if any) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
787 ;; 6. Print header |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
788 ;; 7. Print buffer text (with faces, if specified) and line number |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
789 ;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
790 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
791 ;; Utilities |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
792 ;; --------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
793 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
794 ;; Some tools are provided to help you customize your font setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
795 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
796 ;; `ps-setup' returns (some part of) the current setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
797 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
798 ;; To avoid wrapping too many lines, you may want to adjust the |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
799 ;; left and right margins and the font size. On UN*X systems, do: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
800 ;; pr -t file | awk '{printf "%3d %s\n", length($0), $0}' | sort -r | head |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
801 ;; to determine the longest lines of your file. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
802 ;; Then, the command `ps-line-lengths' will give you the correspondence |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
803 ;; between a line length (number of characters) and the maximum font |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
804 ;; size which doesn't wrap such a line with the current ps-print setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
805 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
806 ;; The commands `ps-nb-pages-buffer' and `ps-nb-pages-region' display |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
807 ;; the correspondence between a number of pages and the maximum font |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
808 ;; size which allow the number of lines of the current buffer or of |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
809 ;; its current region to fit in this number of pages. |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
810 ;; |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
811 ;; NOTE: line folding is not taken into account in this process and could |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
812 ;; change the results. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
813 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
814 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
815 ;; New since version 1.5 |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
816 ;; --------------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
817 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
818 ;; Color output capability. |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
819 ;; Automatic detection of font attributes (bold, italic). |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
820 ;; Configurable headers with page numbers. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
821 ;; Slightly faster. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
822 ;; Support for different paper sizes. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
823 ;; Better conformance to PostScript Document Structure Conventions. |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
824 ;; |
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
825 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
826 ;; New since version 2.8 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
827 ;; --------------------- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
828 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
829 ;; [vinicius] 980922 Vinicius Jose Latorre <vinicius@cpqd.com.br> |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
830 ;; |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
831 ;; PostScript prologue header comment insertion. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
832 ;; Skip invisible text better. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
833 ;; |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
834 ;; [keinichi] 980819 Kein'ichi Handa <handa@etl.go.jp> |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
835 ;; |
23551 | 836 ;; Multi-byte buffer handling. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
837 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
838 ;; [vinicius] 980306 Vinicius Jose Latorre <vinicius@cpqd.com.br> |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
839 ;; |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
840 ;; Skip invisible text. |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
841 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
842 ;; [vinicius] 971130 Vinicius Jose Latorre <vinicius@cpqd.com.br> |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
843 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
844 ;; Hooks: `ps-print-hook', `ps-print-begin-page-hook' and |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
845 ;; `ps-print-begin-column-hook'. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
846 ;; Put one header per page over the columns. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
847 ;; Better database font management. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
848 ;; Better control characters handling. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
849 ;; |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
850 ;; [vinicius] 971121 Vinicius Jose Latorre <vinicius@cpqd.com.br> |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
851 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
852 ;; Dynamic evaluation at print time of `ps-lpr-switches'. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
853 ;; Handle control characters. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
854 ;; Face remapping. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
855 ;; New face attributes. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
856 ;; Line number. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
857 ;; Zebra stripes. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
858 ;; Text and/or image on background. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
859 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
860 ;; [jack] 960517 Jacques Duthen <duthen@cegelec-red.fr> |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
861 ;; |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
862 ;; Font family and float size for text and header. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
863 ;; Landscape mode. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
864 ;; Multiple columns. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
865 ;; Tools for page setup. |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
866 ;; |
7257 | 867 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
868 ;; Known bugs and limitations of ps-print |
7257 | 869 ;; -------------------------------------- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
870 ;; |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
871 ;; Although color printing will work in XEmacs 19.12, it doesn't work |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
872 ;; well; in particular, bold or italic fonts don't print in the right |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
873 ;; background color. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
874 ;; |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
875 ;; Invisible properties aren't correctly ignored in XEmacs 19.12. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
876 ;; |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
877 ;; Automatic font-attribute detection doesn't work well, especially |
10683 | 878 ;; with hilit19 and older versions of get-create-face. Users having |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
879 ;; problems with auto-font detection should use the lists |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
880 ;; `ps-italic-faces', `ps-bold-faces' and `ps-underlined-faces' and/or |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
881 ;; turn off automatic detection by setting `ps-auto-font-detect' to nil. |
10683 | 882 ;; |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
883 ;; Automatic font-attribute detection doesn't work with XEmacs 19.12 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
884 ;; in tty mode; use the lists `ps-italic-faces', `ps-bold-faces' and |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
885 ;; `ps-underlined-faces' instead. |
7257 | 886 ;; |
10683 | 887 ;; Still too slow; could use some hand-optimization. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
888 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
889 ;; Default background color isn't working. |
7257 | 890 ;; |
891 ;; Faces are always treated as opaque. | |
892 ;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
893 ;; Epoch and Emacs 18 not supported. At all. |
7257 | 894 ;; |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
895 ;; Fixed-pitch fonts work better for line folding, but are not required. |
7257 | 896 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
897 ;; `ps-nb-pages-buffer' and `ps-nb-pages-region' don't take care |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
898 ;; of folding lines. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
899 ;; |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
900 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
901 ;; Things to change |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
902 ;; ---------------- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
903 ;; |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
904 ;; 2-up and 4-up capabilities. |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
905 ;; Avoid page break inside a paragraph. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
906 ;; Add `ps-non-bold-faces' and `ps-non-italic-faces' (should be easy). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
907 ;; Improve the memory management for big files (hard?). |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
908 ;; `ps-nb-pages-buffer' and `ps-nb-pages-region' should take care |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
909 ;; of folding lines. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
910 ;; |
7257 | 911 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
912 ;; Acknowledgements |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
913 ;; ---------------- |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
914 ;; |
23551 | 915 ;; Thanks to Kein'ichi Handa <handa@etl.go.jp> for multi-byte buffer handling. |
23138
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
916 ;; |
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
917 ;; Thanks to Matthew O Persico <Matthew.Persico@lazard.com> for line number on |
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
918 ;; empty columns. |
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
919 ;; |
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
920 ;; Thanks to Theodore Jump <tjump@cais.com> for adjust PostScript code order on |
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
921 ;; last page. |
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
922 ;; |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
923 ;; Thanks to Roland Ducournau <ducour@lirmm.fr> for |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
924 ;; `ps-print-control-characters' variable documentation. |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
925 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
926 ;; Thanks to Marcus G Daniels <marcus@cathcart.sysc.pdx.edu> for a better |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
927 ;; database font management. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
928 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
929 ;; Thanks to Martin Boyer <gamin@videotron.ca> for some ideas on putting one |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
930 ;; header per page over the columns and correct line numbers when printing a |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
931 ;; region. |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
932 ;; |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
933 ;; Thanks to Steven L Baur <steve@miranova.com> for dynamic evaluation at |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
934 ;; print time of `ps-lpr-switches'. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
935 ;; |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
936 ;; Thanks to Kevin Rodgers <kevinr@ihs.com> for handling control characters |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
937 ;; (his code was severely modified, but the main idea was kept). |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
938 ;; |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
939 ;; Thanks to some suggestions on: |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
940 ;; * Face color map: Marco Melgazzi <marco@techie.com> |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
941 ;; * XEmacs compatibility: William J. Henney <will@astrosmo.unam.mx> |
22093
5818374d88e7
(ps-file-end): Put Trailer and Pages before EndDoc.
Richard M. Stallman <rms@gnu.org>
parents:
21999
diff
changeset
|
942 ;; * Check `ps-paper-type': Sudhakar Frederick <sfrederi@asc.corp.mot.com> |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
943 ;; |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
944 ;; Thanks to Jacques Duthen <duthen@cegelec-red.fr> (Jack) for the 3.4 version |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
945 ;; I started from. [vinicius] |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
946 ;; |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
947 ;; Thanks to Jim Thompson <?@?> for the 2.8 version I started from. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
948 ;; [jack] |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
949 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
950 ;; Thanks to Kevin Rodgers <kevinr@ihs.com> for adding support for |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
951 ;; color and the invisible property. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
952 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
953 ;; Thanks to Avishai Yacobi, avishaiy@mcil.comm.mot.com, for writing |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
954 ;; the initial port to Emacs 19. His code is no longer part of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
955 ;; ps-print, but his work is still appreciated. |
7257 | 956 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
957 ;; Thanks to Remi Houdaille and Michel Train, michel@metasoft.fdn.org, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
958 ;; for adding underline support. Their code also is no longer part of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
959 ;; ps-print, but their efforts are not forgotten. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
960 ;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
961 ;; Thanks also to all of you who mailed code to add features to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
962 ;; ps-print; although I didn't use your code, I still appreciate your |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
963 ;; sharing it with me. |
7257 | 964 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
965 ;; Thanks to all who mailed comments, encouragement, and criticism. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
966 ;; Thanks also to all who responded to my survey; I had too many |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
967 ;; responses to reply to them all, but I greatly appreciate your |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
968 ;; interest. |
7257 | 969 ;; |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
970 ;; Jim |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
971 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7257 | 972 |
973 ;;; Code: | |
974 | |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
975 (unless (featurep 'lisp-float-type) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
976 (error "`ps-print' requires floating point support")) |
7257 | 977 |
978 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
979 ;; User Variables: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
980 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
981 ;;; Interface to the command system |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
982 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
983 (defgroup ps-print nil |
20331 | 984 "PostScript generator for Emacs 19" |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
985 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
986 :group 'wp) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
987 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
988 (defgroup ps-print-horizontal nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
989 "Horizontal page layout" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
990 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
991 :tag "Horizontal" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
992 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
993 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
994 (defgroup ps-print-vertical nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
995 "Vertical page layout" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
996 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
997 :tag "Vertical" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
998 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
999 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1000 (defgroup ps-print-header nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1001 "Headers layout" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1002 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1003 :tag "Header" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1004 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1005 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1006 (defgroup ps-print-font nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1007 "Fonts customization" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1008 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1009 :tag "Font" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1010 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1011 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1012 (defgroup ps-print-color nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1013 "Color customization" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1014 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1015 :tag "Color" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1016 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1017 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1018 (defgroup ps-print-face nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1019 "Faces customization" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1020 :prefix "ps-" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1021 :tag "PS Faces" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1022 :group 'ps-print |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1023 :group 'faces) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1024 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1025 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1026 (defcustom ps-multibyte-buffer nil |
23551 | 1027 "*Specifies the multi-byte buffer handling. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1028 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1029 Valid values are: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1030 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1031 nil This is the value to use when you are printing |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1032 buffer with only ASCII and Latin characters. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1033 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1034 `non-latin-printer' This is the value to use when you have a japanese |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1035 or korean PostScript printer and want to print |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1036 buffer with ASCII, Latin-1, Japanese (JISX0208 and |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1037 JISX0201-Kana) and Korean characters. At present, |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1038 it was not tested the Korean characters printing. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1039 If you have a korean PostScript printer, please, |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1040 test it. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1041 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1042 `bdf-font' This is the value to use when you want to print |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1043 buffer with BDF fonts. BDF fonts include both latin |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1044 and non-latin fonts. BDF (Bitmap Distribution |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1045 Format) is a format used for distributing X's font |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1046 source file. BDF fonts are included in |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1047 `intlfonts-1.1' which is a collection of X11 fonts |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1048 for all characters supported by Emacs. In order to |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1049 use this value, be sure to have installed |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1050 `intlfonts-1.1' and set the variable |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1051 `bdf-directory-list' appropriately (see bdf.el for |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1052 documentation of this variable). |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1053 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1054 `bdf-font-except-latin' This is like `bdf-font' except that it is used |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1055 PostScript default fonts to print ASCII and Latin-1 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1056 characters. This is convenient when you want or |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1057 need to use both latin and non-latin characters on |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1058 the same buffer. See `ps-font-family', |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1059 `ps-header-font-family' and `ps-font-info-database'. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1060 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1061 Any other value is treated as nil." |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1062 :type '(choice (const non-latin-printer) (const bdf-font) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1063 (const bdf-font-except-latin) (other :tag "nil" nil)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1064 :group 'ps-print-font) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1065 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1066 (defcustom ps-print-prologue-header nil |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1067 "*PostScript prologue header comments besides that ps-print generates. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1068 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1069 `ps-print-prologue-header' may be a string or a symbol function which |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1070 returns a string. Note that this string is inserted on PostScript prologue |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1071 header section which is used to define some document characteristic through |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1072 PostScript special comments, like \"%%Requirements: jog\\n\". |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1073 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1074 ps-print always inserts the %%Requirements: comment, so if you need to insert |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1075 more requirements put them first in `ps-print-prologue-header' using the |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1076 \"%%+\" comment. For example, if you need to set numcopies to 3 and jog on |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1077 requirements and set %%LanguageLevel: to 2, do: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1078 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1079 (setq ps-print-prologue-header |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1080 \"%%+ numcopies(3) jog\\n%%LanguageLevel: 2\\n\") |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1081 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1082 The duplex requirement is inserted by ps-print (see `ps-spool-duplex'). |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1083 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1084 Do not forget to terminate the string with \"\\n\". |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1085 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1086 For more information about PostScript document comments, see: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1087 PostScript Language Reference Manual (2nd edition) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1088 Adobe Systems Incorporated |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1089 Appendix G: Document Structuring Conventions -- Version 3.0" |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1090 :type '(choice string symbol (other :tag "nil" nil)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1091 :group 'ps-print) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1092 |
22680
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1093 (defcustom ps-printer-name printer-name |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1094 "*The name of a local printer for printing PostScript files. |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1095 |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1096 On Unix-like systems, a string value should be a name understood by |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1097 lpr's -P option; otherwise the value should be nil. |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1098 |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1099 On MS-DOS and MS-Windows systems, if the value is a string, then it is |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1100 taken as the name of the device to which PostScript files are written. |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1101 By default it is the same as `printer-name'; typical non-default |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1102 settings would be \"LPT1\" to \"LPT3\" for parallel printers, or |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1103 \"COM1\" to \"COM4\" or \"AUX\" for serial printers, or |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1104 \"//hostname/printer\" for a shared network printer. You can also set |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1105 it to a name of a file, in which case the output gets appended to that |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1106 file. \(Note that `ps-print' package already has facilities for |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1107 printing to a file, so you might as well use them instead of changing |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1108 the setting of this variable.\) If you want to silently discard the |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1109 printed output, set this to \"NUL\". |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1110 |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1111 On DOS/Windows, if the value is anything but a string, PostScript files |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1112 will be piped to the program given by `ps-lpr-command', with switches |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1113 given by `ps-lpr-switches', which see." |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1114 :type '(choice file (other :tag "Pipe to ps-lpr-command" pipe)) |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1115 :group 'ps-print) |
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
1116 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1117 (defcustom ps-lpr-command lpr-command |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1118 "*The shell command for printing a PostScript file." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1119 :type 'string |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1120 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1121 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1122 (defcustom ps-lpr-switches lpr-switches |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1123 "*A list of extra switches to pass to `ps-lpr-command'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1124 :type '(repeat string) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1125 :group 'ps-print) |
7257 | 1126 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1127 ;;; Page layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1128 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1129 ;; All page dimensions are in PostScript points. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1130 ;; 1 inch == 2.54 cm == 72 points |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1131 ;; 1 cm == (/ 1 2.54) inch == (/ 72 2.54) points |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1132 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1133 ;; Letter 8.5 inch x 11.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1134 ;; Legal 8.5 inch x 14.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1135 ;; A4 8.26 inch x 11.69 inch = 21.0 cm x 29.7 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1136 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1137 ;; LetterSmall 7.68 inch x 10.16 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1138 ;; Tabloid 11.0 inch x 17.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1139 ;; Ledger 17.0 inch x 11.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1140 ;; Statement 5.5 inch x 8.5 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1141 ;; Executive 7.5 inch x 10.0 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1142 ;; A3 11.69 inch x 16.5 inch = 29.7 cm x 42.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1143 ;; A4Small 7.47 inch x 10.85 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1144 ;; B4 10.125 inch x 14.33 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1145 ;; B5 7.16 inch x 10.125 inch |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1146 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1147 (defcustom ps-page-dimensions-database |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1148 (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1149 (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1150 (list 'letter (* 72 8.5) (* 72 11.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1151 (list 'legal (* 72 8.5) (* 72 14.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1152 (list 'letter-small (* 72 7.68) (* 72 10.16)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1153 (list 'tabloid (* 72 11.0) (* 72 17.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1154 (list 'ledger (* 72 17.0) (* 72 11.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1155 (list 'statement (* 72 5.5) (* 72 8.5)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1156 (list 'executive (* 72 7.5) (* 72 10.0)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1157 (list 'a4small (* 72 7.47) (* 72 10.85)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1158 (list 'b4 (* 72 10.125) (* 72 14.33)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1159 (list 'b5 (* 72 7.16) (* 72 10.125))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1160 "*List associating a symbolic paper type to its width and height. |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1161 see `ps-paper-type'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1162 :type '(repeat (list :tag "Paper Type" |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1163 (symbol :tag "Name") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1164 (number :tag "Width") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1165 (number :tag "Height"))) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1166 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1167 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1168 ;;;###autoload |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1169 (defcustom ps-paper-type 'letter |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1170 "*Specifies the size of paper to format for. |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1171 Should be one of the paper types defined in `ps-page-dimensions-database', for |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1172 example `letter', `legal' or `a4'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1173 :type '(symbol :validate (lambda (wid) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1174 (if (assq (widget-value wid) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1175 ps-page-dimensions-database) |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1176 nil |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1177 (widget-put wid :error "Unknown paper size") |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1178 wid))) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1179 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1180 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1181 (defcustom ps-landscape-mode nil |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1182 "*Non-nil means print in landscape mode." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1183 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1184 :group 'ps-print) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1185 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1186 (defcustom ps-print-control-characters 'control-8-bit |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1187 "*Specifies the printable form for control and 8-bit characters. |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
1188 That is, instead of sending, for example, a ^D (\004) to printer, |
23138
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
1189 it is sent the string \"^D\". |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
1190 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1191 Valid values are: |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
1192 |
22093
5818374d88e7
(ps-file-end): Put Trailer and Pages before EndDoc.
Richard M. Stallman <rms@gnu.org>
parents:
21999
diff
changeset
|
1193 `8-bit' This is the value to use when you want an ASCII encoding of |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1194 any control or non-ASCII character. Control characters are |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1195 encoded as \"^D\", and non-ASCII characters have an |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1196 octal encoding. |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
1197 |
22093
5818374d88e7
(ps-file-end): Put Trailer and Pages before EndDoc.
Richard M. Stallman <rms@gnu.org>
parents:
21999
diff
changeset
|
1198 `control-8-bit' This is the value to use when you want an ASCII encoding of |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1199 any control character, whether it is 7 or 8-bit. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1200 European 8-bits accented characters are printed according |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1201 the current font. |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
1202 |
23307 | 1203 `control' Only ASCII control characters have an ASCII encoding. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1204 European 8-bits accented characters are printed according |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1205 the current font. |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
1206 |
22093
5818374d88e7
(ps-file-end): Put Trailer and Pages before EndDoc.
Richard M. Stallman <rms@gnu.org>
parents:
21999
diff
changeset
|
1207 nil No ASCII encoding. Any character is printed according the |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1208 current font. |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
1209 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1210 Any other value is treated as nil." |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1211 :type '(choice (const 8-bit) (const control-8-bit) |
22596
b926b360d222
(ps-print-control-characters): Use `other' widget
Andreas Schwab <schwab@suse.de>
parents:
22397
diff
changeset
|
1212 (const control) (other :tag "nil" nil)) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1213 :group 'ps-print) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1214 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1215 (defcustom ps-number-of-columns (if ps-landscape-mode 2 1) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1216 "*Specifies the number of columns" |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1217 :type 'number |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1218 :group 'ps-print) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1219 |
19485
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
1220 (defcustom ps-zebra-stripes nil |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1221 "*Non-nil means print zebra stripes. |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
1222 See also documentation for `ps-zebra-stripe-height'." |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1223 :type 'boolean |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1224 :group 'ps-print) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1225 |
19485
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
1226 (defcustom ps-zebra-stripe-height 3 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1227 "*Number of zebra stripe lines. |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
1228 See also documentation for `ps-zebra-stripes'." |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1229 :type 'number |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1230 :group 'ps-print) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1231 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1232 (defcustom ps-line-number nil |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1233 "*Non-nil means print line number." |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1234 :type 'boolean |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1235 :group 'ps-print) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1236 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1237 (defcustom ps-print-background-image nil |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1238 "*EPS image list to be printed on background. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1239 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1240 The elements are: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1241 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1242 (FILENAME X Y XSCALE YSCALE ROTATION PAGES...) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1243 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1244 FILENAME is a file name which contains an EPS image or some PostScript |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1245 programming like EPS. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1246 FILENAME is ignored, if it doesn't exist or is read protected. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1247 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1248 X and Y are relative positions on paper to put the image. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1249 If X and Y are nil, the image is centralized on paper. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1250 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1251 XSCALE and YSCALE are scale factor to be applied to image before printing. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1252 If XSCALE and YSCALE are nil, the original size is used. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1253 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1254 ROTATION is the image rotation angle; if nil, the default is 0. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1255 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1256 PAGES designates the page to print background image. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1257 PAGES may be a number or a cons cell (FROM . TO) designating FROM page |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1258 to TO page. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1259 If PAGES is nil, print background image on all pages. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1260 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1261 X, Y, XSCALE, YSCALE and ROTATION may be a floating point number, |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1262 an integer number or a string. If it is a string, the string should contain |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1263 PostScript programming that returns a float or integer value. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1264 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1265 For example, if you wish to print an EPS image on all pages do: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1266 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1267 '((\"~/images/EPS-image.ps\"))" |
20019
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1268 :type '(repeat (list file |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1269 (choice :tag "X" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1270 (choice :tag "Y" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1271 (choice :tag "X Scale" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1272 (choice :tag "Y Scale" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1273 (choice :tag "Rotation" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1274 (repeat :tag "Pages" :inline t |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1275 (radio integer |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1276 (cons :tag "Range" |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1277 (integer :tag "From") |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1278 (integer :tag "To")))))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1279 :group 'ps-print) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1280 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1281 (defcustom ps-print-background-text nil |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1282 "*Text list to be printed on background. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1283 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1284 The elements are: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1285 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1286 (STRING X Y FONT FONTSIZE GRAY ROTATION PAGES...) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1287 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1288 STRING is the text to be printed on background. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1289 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1290 X and Y are positions on paper to put the text. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1291 If X and Y are nil, the text is positioned at lower left corner. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1292 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1293 FONT is a font name to be used on printing the text. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1294 If nil, \"Times-Roman\" is used. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1295 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1296 FONTSIZE is font size to be used, if nil, 200 is used. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1297 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1298 GRAY is the text gray factor (should be very light like 0.8). |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1299 If nil, the default is 0.85. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1300 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1301 ROTATION is the text rotation angle; if nil, the angle is given by |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1302 the diagonal from lower left corner to upper right corner. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1303 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1304 PAGES designates the page to print background text. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1305 PAGES may be a number or a cons cell (FROM . TO) designating FROM page |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1306 to TO page. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1307 If PAGES is nil, print background text on all pages. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1308 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1309 X, Y, FONTSIZE, GRAY and ROTATION may be a floating point number, |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1310 an integer number or a string. If it is a string, the string should contain |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1311 PostScript programming that returns a float or integer value. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1312 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1313 For example, if you wish to print text \"Preliminary\" on all pages do: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1314 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1315 '((\"Preliminary\"))" |
20019
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1316 :type '(repeat (list string |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1317 (choice :tag "X" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1318 (choice :tag "Y" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1319 (choice :tag "Font" string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1320 (choice :tag "Fontsize" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1321 (choice :tag "Gray" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1322 (choice :tag "Rotation" number string (const nil)) |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1323 (repeat :tag "Pages" :inline t |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1324 (radio integer |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1325 (cons :tag "Range" |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1326 (integer :tag "From") |
d8e290881d8c
(ps-print-background-image): Fix customize type.
Karl Heuer <kwzh@gnu.org>
parents:
19879
diff
changeset
|
1327 (integer :tag "To")))))) |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1328 :group 'ps-print) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1329 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1330 ;;; Horizontal layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1331 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1332 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1333 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1334 ;; | lm | text | ic | text | ic | text | rm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1335 ;; | | | | | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1336 ;; ------------------------------------------ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1337 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1338 (defcustom ps-left-margin (/ (* 72 2.0) 2.54) ; 2 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1339 "*Left margin in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1340 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1341 :group 'ps-print-horizontal) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1342 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1343 (defcustom ps-right-margin (/ (* 72 2.0) 2.54) ; 2 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1344 "*Right margin in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1345 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1346 :group 'ps-print-horizontal) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1347 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1348 (defcustom ps-inter-column (/ (* 72 2.0) 2.54) ; 2 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1349 "*Horizontal space between columns in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1350 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1351 :group 'ps-print-horizontal) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1352 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1353 ;;; Vertical layout |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1354 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1355 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1356 ;; | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1357 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1358 ;; | header | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1359 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1360 ;; | ho | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1361 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1362 ;; | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1363 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1364 ;; | bm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1365 ;; |--------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1366 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1367 (defcustom ps-bottom-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1368 "*Bottom margin in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1369 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1370 :group 'ps-print-vertical) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1371 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1372 (defcustom ps-top-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1373 "*Top margin in points (1/72 inch)." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1374 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1375 :group 'ps-print-vertical) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1376 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1377 (defcustom ps-header-offset (/ (* 72 1.0) 2.54) ; 1.0 cm |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1378 "*Vertical space in points (1/72 inch) between the main text and the header." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1379 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1380 :group 'ps-print-vertical) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1381 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1382 (defcustom ps-header-line-pad 0.15 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1383 "*Portion of a header title line height to insert between the header frame |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1384 and the text it contains, both in the vertical and horizontal directions." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1385 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1386 :group 'ps-print-vertical) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1387 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1388 ;;; Header setup |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1389 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1390 (defcustom ps-print-header t |
10493 | 1391 "*Non-nil means print a header at the top of each page. |
1392 By default, the header displays the buffer name, page number, and, if | |
1393 the buffer is visiting a file, the file's directory. Headers are | |
16949
18731f7e2c73
(ps-print-header): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
16870
diff
changeset
|
1394 customizable by changing variables `ps-left-header' and |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1395 `ps-right-header'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1396 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1397 :group 'ps-print-header) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1398 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1399 (defcustom ps-print-only-one-header nil |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1400 "*Non-nil means print only one header at the top of each page. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1401 This is useful when printing more than one column, so it is possible |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1402 to have only one header over all columns or one header per column. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1403 See also `ps-print-header'." |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1404 :type 'boolean |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1405 :group 'ps-print-header) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1406 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1407 (defcustom ps-print-header-frame t |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1408 "*Non-nil means draw a gaudy frame around the header." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1409 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1410 :group 'ps-print-header) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1411 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1412 (defcustom ps-header-lines 2 |
20331 | 1413 "*Number of lines to display in page header, when generating PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1414 :type 'integer |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1415 :group 'ps-print-header) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1416 (make-variable-buffer-local 'ps-header-lines) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1417 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1418 (defcustom ps-show-n-of-n t |
10683 | 1419 "*Non-nil means show page numbers as N/M, meaning page N of M. |
20331 | 1420 NOTE: page numbers are displayed as part of headers, |
1421 see variable `ps-print-headers'." | |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1422 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1423 :group 'ps-print-header) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1424 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1425 (defcustom ps-spool-duplex nil ; Not many people have duplex |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1426 ; printers, so default to nil. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1427 "*Non-nil indicates spooling is for a two-sided printer. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1428 For a duplex printer, the `ps-spool-*' commands will insert blank pages |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1429 as needed between print jobs so that the next buffer printed will |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1430 start on the right page. Also, if headers are turned on, the headers |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1431 will be reversed on duplex printers so that the page numbers fall to |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1432 the left on even-numbered pages." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1433 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1434 :group 'ps-print-header) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1435 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1436 ;;; Fonts |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1437 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1438 (defcustom ps-font-info-database |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1439 '((Courier ; the family key |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1440 (fonts (normal . "Courier") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1441 (bold . "Courier-Bold") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1442 (italic . "Courier-Oblique") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1443 (bold-italic . "Courier-BoldOblique")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1444 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1445 (line-height . 10.55) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1446 (space-width . 6.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1447 (avg-char-width . 6.0)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1448 (Helvetica ; the family key |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1449 (fonts (normal . "Helvetica") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1450 (bold . "Helvetica-Bold") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1451 (italic . "Helvetica-Oblique") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1452 (bold-italic . "Helvetica-BoldOblique")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1453 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1454 (line-height . 11.56) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1455 (space-width . 2.78) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1456 (avg-char-width . 5.09243)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1457 (Times |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1458 (fonts (normal . "Times-Roman") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1459 (bold . "Times-Bold") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1460 (italic . "Times-Italic") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1461 (bold-italic . "Times-BoldItalic")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1462 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1463 (line-height . 11.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1464 (space-width . 2.5) |
23273
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1465 (avg-char-width . 4.71432)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1466 (Palatino |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1467 (fonts (normal . "Palatino-Roman") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1468 (bold . "Palatino-Bold") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1469 (italic . "Palatino-Italic") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1470 (bold-italic . "Palatino-BoldItalic")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1471 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1472 (line-height . 12.1) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1473 (space-width . 2.5) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1474 (avg-char-width . 5.08676)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1475 (Helvetica-Narrow |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1476 (fonts (normal . "Helvetica-Narrow") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1477 (bold . "Helvetica-Narrow-Bold") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1478 (italic . "Helvetica-Narrow-Oblique") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1479 (bold-italic . "Helvetica-Narrow-BoldOblique")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1480 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1481 (line-height . 11.56) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1482 (space-width . 2.2796) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1483 (avg-char-width . 4.17579)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1484 (NewCenturySchlbk |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1485 (fonts (normal . "NewCenturySchlbk-Roman") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1486 (bold . "NewCenturySchlbk-Bold") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1487 (italic . "NewCenturySchlbk-Italic") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1488 (bold-italic . "NewCenturySchlbk-BoldItalic")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1489 (size . 10.0) |
23273
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1490 (line-height . 12.15) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1491 (space-width . 2.78) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1492 (avg-char-width . 5.31162)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1493 ;; got no bold for the next ones |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1494 (AvantGarde-Book |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1495 (fonts (normal . "AvantGarde-Book") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1496 (italic . "AvantGarde-BookOblique")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1497 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1498 (line-height . 11.77) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1499 (space-width . 2.77) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1500 (avg-char-width . 5.45189)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1501 (AvantGarde-Demi |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1502 (fonts (normal . "AvantGarde-Demi") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1503 (italic . "AvantGarde-DemiOblique")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1504 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1505 (line-height . 12.72) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1506 (space-width . 2.8) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1507 (avg-char-width . 5.51351)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1508 (Bookman-Demi |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1509 (fonts (normal . "Bookman-Demi") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1510 (italic . "Bookman-DemiItalic")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1511 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1512 (line-height . 11.77) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1513 (space-width . 3.4) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1514 (avg-char-width . 6.05946)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1515 (Bookman-Light |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1516 (fonts (normal . "Bookman-Light") |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1517 (italic . "Bookman-LightItalic")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1518 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1519 (line-height . 11.79) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1520 (space-width . 3.2) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1521 (avg-char-width . 5.67027)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1522 ;; got no bold and no italic for the next ones |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1523 (Symbol |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1524 (fonts (normal . "Symbol")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1525 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1526 (line-height . 13.03) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1527 (space-width . 2.5) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1528 (avg-char-width . 3.24324)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1529 (Zapf-Dingbats |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1530 (fonts (normal . "Zapf-Dingbats")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1531 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1532 (line-height . 9.63) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1533 (space-width . 2.78) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1534 (avg-char-width . 2.78)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1535 (Zapf-Chancery-MediumItalic |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1536 (fonts (normal . "Zapf-Chancery-MediumItalic")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1537 (size . 10.0) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1538 (line-height . 11.45) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1539 (space-width . 2.2) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1540 (avg-char-width . 4.10811)) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1541 ) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1542 "*Font info database: font family (the key), name, bold, italic, bold-italic, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1543 reference size, line height, space width, average character width. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1544 To get the info for another specific font (say Helvetica), do the following: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1545 - create a new buffer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1546 - generate the PostScript image to a file (C-u M-x ps-print-buffer) |
20331 | 1547 - open this file and delete the leading `%' (which is the PostScript |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1548 comment character) from the line |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1549 `% 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage' |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1550 to get the line |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1551 `3 cm 20 cm moveto 10 /Helvetica ReportFontInfo showpage' |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1552 - add the values to `ps-font-info-database'. |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1553 You can get all the fonts of YOUR printer using `ReportAllFontInfo'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1554 :type '(repeat (list :tag "Font Definition" |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1555 (symbol :tag "Font Family") |
23273
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1556 (cons :format "%v" |
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1557 (const :format "" fonts) |
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1558 (repeat :tag "Faces" |
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1559 (cons (choice (const normal) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1560 (const bold) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1561 (const italic) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1562 (const bold-italic) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1563 (symbol :tag "Face")) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1564 (string :tag "Font Name")))) |
23273
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1565 (cons :format "%v" |
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1566 (const :format "" size) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1567 (number :tag "Reference Size")) |
23273
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1568 (cons :format "%v" |
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1569 (const :format "" line-height) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1570 (number :tag "Line Height")) |
23273
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1571 (cons :format "%v" |
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1572 (const :format "" space-width) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1573 (number :tag "Space Width")) |
23273
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1574 (cons :format "%v" |
519bc559e950
(ps-font-info-database): Add missing dots in value.
Andreas Schwab <schwab@suse.de>
parents:
23204
diff
changeset
|
1575 (const :format "" avg-char-width) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
1576 (number :tag "Average Character Width")))) |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1577 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1578 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1579 (defcustom ps-font-family 'Courier |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1580 "*Font family name for ordinary text, when generating PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1581 :type 'symbol |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1582 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1583 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1584 (defcustom ps-font-size (if ps-landscape-mode 7 8.5) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1585 "*Font size, in points, for ordinary text, when generating PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1586 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1587 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1588 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1589 (defcustom ps-header-font-family 'Helvetica |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1590 "*Font family name for text in the header, when generating PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1591 :type 'symbol |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1592 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1593 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1594 (defcustom ps-header-font-size (if ps-landscape-mode 10 12) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1595 "*Font size, in points, for text in the header, when generating PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1596 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1597 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1598 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1599 (defcustom ps-header-title-font-size (if ps-landscape-mode 12 14) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1600 "*Font size, in points, for the top line of text in header, in PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1601 :type 'number |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1602 :group 'ps-print-font) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1603 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1604 ;;; Colors |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1605 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1606 ;; Printing color requires x-color-values. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1607 (defcustom ps-print-color-p (or (fboundp 'x-color-values) ; Emacs |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1608 (fboundp 'color-instance-rgb-components)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1609 ; XEmacs |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1610 "*If non-nil, print the buffer's text in color." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1611 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1612 :group 'ps-print-color) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1613 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1614 (defcustom ps-default-fg '(0.0 0.0 0.0) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1615 "*RGB values of the default foreground color. Defaults to black." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1616 :type '(list (number :tag "Red") (number :tag "Green") (number :tag "Blue")) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1617 :group 'ps-print-color) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1618 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1619 (defcustom ps-default-bg '(1.0 1.0 1.0) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1620 "*RGB values of the default background color. Defaults to white." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1621 :type '(list (number :tag "Red") (number :tag "Green") (number :tag "Blue")) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1622 :group 'ps-print-color) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1623 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1624 (defcustom ps-auto-font-detect t |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1625 "*Non-nil means automatically detect bold/italic face attributes. |
19843
0c9342c1054d
(ps-face-bold-p): Use face-bold-p.
Richard M. Stallman <rms@gnu.org>
parents:
19787
diff
changeset
|
1626 If nil, we rely solely on the lists `ps-bold-faces', `ps-italic-faces', |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1627 and `ps-underlined-faces'." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1628 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1629 :group 'ps-print-font) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1630 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1631 (defcustom ps-bold-faces |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1632 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1633 '(font-lock-function-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1634 font-lock-builtin-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1635 font-lock-variable-name-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1636 font-lock-keyword-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1637 font-lock-warning-face)) |
10493 | 1638 "*A list of the \(non-bold\) faces that should be printed in bold font. |
20331 | 1639 This applies to generating PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1640 :type '(repeat face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1641 :group 'ps-print-face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1642 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1643 (defcustom ps-italic-faces |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1644 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1645 '(font-lock-variable-name-face |
20331 | 1646 font-lock-type-face |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1647 font-lock-string-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1648 font-lock-comment-face |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1649 font-lock-warning-face)) |
10493 | 1650 "*A list of the \(non-italic\) faces that should be printed in italic font. |
20331 | 1651 This applies to generating PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1652 :type '(repeat face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1653 :group 'ps-print-face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1654 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1655 (defcustom ps-underlined-faces |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1656 (unless ps-print-color-p |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1657 '(font-lock-function-name-face |
20953
f3f9df46d008
Changed font-lock-reference-face to font-lock-constant-face.
Simon Marshall <simon@gnu.org>
parents:
20516
diff
changeset
|
1658 font-lock-constant-face |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1659 font-lock-warning-face)) |
10493 | 1660 "*A list of the \(non-underlined\) faces that should be printed underlined. |
20331 | 1661 This applies to generating PostScript." |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1662 :type '(repeat face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1663 :group 'ps-print-face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1664 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1665 (defcustom ps-left-header |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1666 (list 'ps-get-buffer-name 'ps-header-dirpart) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1667 "*The items to display (each on a line) on the left part of the page header. |
20331 | 1668 This applies to generating PostScript. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1669 |
10493 | 1670 The value should be a list of strings and symbols, each representing an |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1671 entry in the PostScript array HeaderLinesLeft. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1672 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1673 Strings are inserted unchanged into the array; those representing |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1674 PostScript string literals should be delimited with PostScript string |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1675 delimiters '(' and ')'. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1676 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1677 For symbols with bound functions, the function is called and should |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1678 return a string to be inserted into the array. For symbols with bound |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1679 values, the value should be a string to be inserted into the array. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1680 In either case, function or variable, the string value has PostScript |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1681 string delimiters added to it." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1682 :type '(repeat (choice string symbol)) |
17681 | 1683 :group 'ps-print-header) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1684 (make-variable-buffer-local 'ps-left-header) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1685 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1686 (defcustom ps-right-header |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
1687 (list "/pagenumberstring load" 'time-stamp-mon-dd-yyyy 'time-stamp-hh:mm:ss) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1688 "*The items to display (each on a line) on the right part of the page header. |
20331 | 1689 This applies to generating PostScript. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1690 |
10493 | 1691 See the variable `ps-left-header' for a description of the format of |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1692 this variable." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1693 :type '(repeat (choice string symbol)) |
17681 | 1694 :group 'ps-print-header) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1695 (make-variable-buffer-local 'ps-right-header) |
7257 | 1696 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1697 (defcustom ps-razzle-dazzle t |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1698 "*Non-nil means report progress while formatting buffer." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1699 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1700 :group 'ps-print) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1701 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1702 (defcustom ps-adobe-tag "%!PS-Adobe-3.0\n" |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1703 "*Contains the header line identifying the output as PostScript. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1704 By default, `ps-adobe-tag' contains the standard identifier. Some |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1705 printers require slightly different versions of this line." |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1706 :type 'string |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1707 :group 'ps-print) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1708 |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1709 (defcustom ps-build-face-reference t |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1710 "*Non-nil means build the reference face lists. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1711 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1712 ps-print sets this value to nil after it builds its internal reference |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1713 lists of bold and italic faces. By settings its value back to t, you |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1714 can force ps-print to rebuild the lists the next time you invoke one |
10493 | 1715 of the ...-with-faces commands. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1716 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1717 You should set this value back to t after you change the attributes of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1718 any face, or create new faces. Most users shouldn't have to worry |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1719 about its setting, though." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1720 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1721 :group 'ps-print-face) |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1722 |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1723 (defcustom ps-always-build-face-reference nil |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1724 "*Non-nil means always rebuild the reference face lists. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1725 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1726 If this variable is non-nil, ps-print will rebuild its internal |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1727 reference lists of bold and italic faces *every* time one of the |
21955
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
1728 ...-with-faces commands is called. Most users shouldn't need to set this |
17405
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1729 variable." |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1730 :type 'boolean |
1c2363f760ef
Add defgroup's; change use defcustom for user vars.
Richard M. Stallman <rms@gnu.org>
parents:
17377
diff
changeset
|
1731 :group 'ps-print-face) |
7257 | 1732 |
1733 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1734 ;; User commands |
7257 | 1735 |
10683 | 1736 ;;;###autoload |
7257 | 1737 (defun ps-print-buffer (&optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1738 "Generate and print a PostScript image of the buffer. |
7257 | 1739 |
23466
fa40617f5902
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23310
diff
changeset
|
1740 Interactively, when you use a prefix argument (C-u), the command |
fa40617f5902
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23310
diff
changeset
|
1741 prompts the user for a file name, and saves the PostScript image |
fa40617f5902
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23310
diff
changeset
|
1742 in that file instead of sending it to the printer. |
fa40617f5902
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23310
diff
changeset
|
1743 |
fa40617f5902
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23310
diff
changeset
|
1744 Noninteractively, the argument FILENAME is treated as follows: if it |
7257 | 1745 is nil, send the image to the printer. If FILENAME is a string, save |
23468
969f4c2e38c0
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23466
diff
changeset
|
1746 the PostScript image in a file with that name." |
10683 | 1747 (interactive (list (ps-print-preprint current-prefix-arg))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1748 (ps-print-without-faces (point-min) (point-max) filename)) |
7257 | 1749 |
1750 | |
10683 | 1751 ;;;###autoload |
7257 | 1752 (defun ps-print-buffer-with-faces (&optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1753 "Generate and print a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1754 Like `ps-print-buffer', but includes font, color, and underline |
13807 | 1755 information in the generated image. This command works only if you |
1756 are using a window system, so it has a way to determine color values." | |
10683 | 1757 (interactive (list (ps-print-preprint current-prefix-arg))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1758 (ps-print-with-faces (point-min) (point-max) filename)) |
7257 | 1759 |
1760 | |
10683 | 1761 ;;;###autoload |
7257 | 1762 (defun ps-print-region (from to &optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1763 "Generate and print a PostScript image of the region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1764 Like `ps-print-buffer', but prints just the current region." |
10683 | 1765 (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg))) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1766 (ps-print-without-faces from to filename t)) |
7257 | 1767 |
1768 | |
10683 | 1769 ;;;###autoload |
7257 | 1770 (defun ps-print-region-with-faces (from to &optional filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1771 "Generate and print a PostScript image of the region. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1772 Like `ps-print-region', but includes font, color, and underline |
13807 | 1773 information in the generated image. This command works only if you |
1774 are using a window system, so it has a way to determine color values." | |
10683 | 1775 (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg))) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1776 (ps-print-with-faces from to filename t)) |
7257 | 1777 |
1778 | |
10683 | 1779 ;;;###autoload |
7257 | 1780 (defun ps-spool-buffer () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1781 "Generate and spool a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1782 Like `ps-print-buffer' except that the PostScript image is saved in a |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1783 local buffer to be sent to the printer later. |
7257 | 1784 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1785 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1786 (interactive) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1787 (ps-spool-without-faces (point-min) (point-max))) |
7257 | 1788 |
1789 | |
10683 | 1790 ;;;###autoload |
7257 | 1791 (defun ps-spool-buffer-with-faces () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1792 "Generate and spool a PostScript image of the buffer. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1793 Like `ps-spool-buffer', but includes font, color, and underline |
13807 | 1794 information in the generated image. This command works only if you |
13828
612d7bd4b5d1
(ps-spool-buffer-with-faces): Fix typo in previous chg.
Richard M. Stallman <rms@gnu.org>
parents:
13807
diff
changeset
|
1795 are using a window system, so it has a way to determine color values. |
7257 | 1796 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1797 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1798 (interactive) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
1799 (ps-spool-with-faces (point-min) (point-max))) |
7257 | 1800 |
1801 | |
10683 | 1802 ;;;###autoload |
7257 | 1803 (defun ps-spool-region (from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1804 "Generate a PostScript image of the region and spool locally. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1805 Like `ps-spool-buffer', but spools just the current region. |
7257 | 1806 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1807 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1808 (interactive "r") |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1809 (ps-spool-without-faces from to t)) |
7257 | 1810 |
1811 | |
10683 | 1812 ;;;###autoload |
7257 | 1813 (defun ps-spool-region-with-faces (from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1814 "Generate a PostScript image of the region and spool locally. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1815 Like `ps-spool-region', but includes font, color, and underline |
13807 | 1816 information in the generated image. This command works only if you |
13828
612d7bd4b5d1
(ps-spool-buffer-with-faces): Fix typo in previous chg.
Richard M. Stallman <rms@gnu.org>
parents:
13807
diff
changeset
|
1817 are using a window system, so it has a way to determine color values. |
7257 | 1818 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1819 Use the command `ps-despool' to send the spooled images to the printer." |
7257 | 1820 (interactive "r") |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1821 (ps-spool-with-faces from to t)) |
7257 | 1822 |
10683 | 1823 ;;;###autoload |
7257 | 1824 (defun ps-despool (&optional filename) |
1825 "Send the spooled PostScript to the printer. | |
1826 | |
23468
969f4c2e38c0
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23466
diff
changeset
|
1827 Interactively, when you use a prefix argument (C-u), the command |
969f4c2e38c0
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23466
diff
changeset
|
1828 prompts the user for a file name, and saves the spooled PostScript |
969f4c2e38c0
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23466
diff
changeset
|
1829 image in that file instead of sending it to the printer. |
7257 | 1830 |
1831 More specifically, the FILENAME argument is treated as follows: if it | |
1832 is nil, send the image to the printer. If FILENAME is a string, save | |
23468
969f4c2e38c0
(ps-print-buffer): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
23466
diff
changeset
|
1833 the PostScript image in a file with that name." |
10683 | 1834 (interactive (list (ps-print-preprint current-prefix-arg))) |
1835 (ps-do-despool filename)) | |
7257 | 1836 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1837 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1838 (defun ps-line-lengths () |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
1839 "Display the correspondence between a line length and a font size, |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1840 using the current ps-print setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1841 Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1842 (interactive) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1843 (ps-line-lengths-internal)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1844 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1845 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1846 (defun ps-nb-pages-buffer (nb-lines) |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
1847 "Display number of pages to print this buffer, for various font heights. |
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
1848 The table depends on the current ps-print setup." |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1849 (interactive (list (count-lines (point-min) (point-max)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1850 (ps-nb-pages nb-lines)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1851 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1852 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1853 (defun ps-nb-pages-region (nb-lines) |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
1854 "Display number of pages to print the region, for various font heights. |
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
1855 The table depends on the current ps-print setup." |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1856 (interactive (list (count-lines (mark) (point)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1857 (ps-nb-pages nb-lines)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1858 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1859 ;;;###autoload |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1860 (defun ps-setup () |
21955
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
1861 "Return the current PostScript-generation setup." |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1862 (format |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1863 " |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1864 \(setq ps-print-color-p %s |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1865 ps-lpr-command %S |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1866 ps-lpr-switches %S |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1867 ps-printer-name %S |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1868 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1869 ps-paper-type %S |
20331 | 1870 ps-landscape-mode %s |
1871 ps-number-of-columns %s | |
1872 | |
1873 ps-zebra-stripes %s | |
19787
4ea00387fb08
(ps-setup): ps-zebra-stripe => ps-zebra-stripes.
Richard M. Stallman <rms@gnu.org>
parents:
19773
diff
changeset
|
1874 ps-zebra-stripe-height %s |
20331 | 1875 ps-line-number %s |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1876 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1877 ps-print-control-characters %S |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1878 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1879 ps-print-background-image %S |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1880 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1881 ps-print-background-text %S |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1882 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1883 ps-print-prologue-header %S |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1884 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1885 ps-left-margin %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1886 ps-right-margin %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1887 ps-inter-column %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1888 ps-bottom-margin %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1889 ps-top-margin %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1890 ps-header-offset %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1891 ps-header-line-pad %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1892 ps-print-header %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1893 ps-print-only-one-header %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1894 ps-print-header-frame %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1895 ps-header-lines %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1896 ps-show-n-of-n %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1897 ps-spool-duplex %s |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1898 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1899 ps-multibyte-buffer %S |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1900 ps-font-family %S |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1901 ps-font-size %s |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1902 ps-header-font-family %S |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1903 ps-header-font-size %s |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1904 ps-header-title-font-size %s) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1905 " |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1906 ps-print-color-p |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1907 ps-lpr-command |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1908 (ps-print-quote ps-lpr-switches) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1909 ps-printer-name |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1910 (ps-print-quote ps-paper-type) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1911 ps-landscape-mode |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1912 ps-number-of-columns |
19787
4ea00387fb08
(ps-setup): ps-zebra-stripe => ps-zebra-stripes.
Richard M. Stallman <rms@gnu.org>
parents:
19773
diff
changeset
|
1913 ps-zebra-stripes |
4ea00387fb08
(ps-setup): ps-zebra-stripe => ps-zebra-stripes.
Richard M. Stallman <rms@gnu.org>
parents:
19773
diff
changeset
|
1914 ps-zebra-stripe-height |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1915 ps-line-number |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1916 (ps-print-quote ps-print-control-characters) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1917 (ps-print-quote ps-print-background-image) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1918 (ps-print-quote ps-print-background-text) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1919 (ps-print-quote ps-print-prologue-header) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1920 ps-left-margin |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1921 ps-right-margin |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1922 ps-inter-column |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1923 ps-bottom-margin |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1924 ps-top-margin |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1925 ps-header-offset |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1926 ps-header-line-pad |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1927 ps-print-header |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1928 ps-print-only-one-header |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1929 ps-print-header-frame |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1930 ps-header-lines |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1931 ps-show-n-of-n |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1932 ps-spool-duplex |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1933 (ps-print-quote ps-multibyte-buffer) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1934 (ps-print-quote ps-font-family) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1935 ps-font-size |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1936 (ps-print-quote ps-header-font-family) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1937 ps-header-font-size |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
1938 ps-header-title-font-size)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1939 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1940 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1941 ;; Utility functions and variables: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1942 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1943 (defun ps-print-quote (sym) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1944 (and sym |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1945 (if (or (symbolp sym) (listp sym)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1946 (format "'%S" sym) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1947 sym))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
1948 |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1949 (defvar ps-print-emacs-type |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1950 (cond ((string-match "XEmacs" emacs-version) 'xemacs) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1951 ((string-match "Lucid" emacs-version) 'lucid) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1952 ((string-match "Epoch" emacs-version) 'epoch) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1953 (t 'emacs))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1954 |
12769
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1955 (if (or (eq ps-print-emacs-type 'lucid) |
4a905565cfa6
(ps-print-emacs-type): Renamed from emacs-type.
Richard M. Stallman <rms@gnu.org>
parents:
12768
diff
changeset
|
1956 (eq ps-print-emacs-type 'xemacs)) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
1957 (if (< emacs-minor-version 12) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
1958 (setq ps-print-color-p nil)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1959 (require 'faces)) ; face-font, face-underline-p, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1960 ; x-font-regexp |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1961 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1962 ;; Return t if the device (which can be changed during an emacs session) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1963 ;; can handle colors. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1964 ;; This is function is not yet implemented for GNU emacs. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1965 (cond ((and (eq ps-print-emacs-type 'xemacs) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1966 (>= emacs-minor-version 12)) ; xemacs |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1967 (defun ps-color-device () |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1968 (eq (device-class) 'color)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1969 ) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1970 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1971 (t ; emacs |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1972 (defun ps-color-device () |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1973 t) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1974 )) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
1975 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
1976 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1977 (require 'time-stamp) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1978 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1979 (defvar ps-print-prologue-1 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1980 "% ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4: |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1981 /ISOLatin1Encoding where { pop } { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1982 % -- The ISO Latin-1 encoding vector isn't known, so define it. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1983 % -- The first half is the same as the standard encoding, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1984 % -- except for minus instead of hyphen at code 055. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1985 /ISOLatin1Encoding |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1986 StandardEncoding 0 45 getinterval aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1987 /minus |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1988 StandardEncoding 46 82 getinterval aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1989 %*** NOTE: the following are missing in the Adobe documentation, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1990 %*** but appear in the displayed table: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1991 %*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1992 % 0200 (128) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1993 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1994 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1995 /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1996 /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
1997 % 0240 (160) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1998 /space /exclamdown /cent /sterling |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
1999 /currency /yen /brokenbar /section |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2000 /dieresis /copyright /ordfeminine /guillemotleft |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2001 /logicalnot /hyphen /registered /macron |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2002 /degree /plusminus /twosuperior /threesuperior |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2003 /acute /mu /paragraph /periodcentered |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2004 /cedilla /onesuperior /ordmasculine /guillemotright |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2005 /onequarter /onehalf /threequarters /questiondown |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2006 % 0300 (192) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2007 /Agrave /Aacute /Acircumflex /Atilde |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2008 /Adieresis /Aring /AE /Ccedilla |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2009 /Egrave /Eacute /Ecircumflex /Edieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2010 /Igrave /Iacute /Icircumflex /Idieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2011 /Eth /Ntilde /Ograve /Oacute |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2012 /Ocircumflex /Otilde /Odieresis /multiply |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2013 /Oslash /Ugrave /Uacute /Ucircumflex |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2014 /Udieresis /Yacute /Thorn /germandbls |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2015 % 0340 (224) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2016 /agrave /aacute /acircumflex /atilde |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2017 /adieresis /aring /ae /ccedilla |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2018 /egrave /eacute /ecircumflex /edieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2019 /igrave /iacute /icircumflex /idieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2020 /eth /ntilde /ograve /oacute |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2021 /ocircumflex /otilde /odieresis /divide |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2022 /oslash /ugrave /uacute /ucircumflex |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2023 /udieresis /yacute /thorn /ydieresis |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2024 256 packedarray def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2025 } ifelse |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2026 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2027 /reencodeFontISO { %def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2028 dup |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2029 length 12 add dict % Make a new font (a new dict the same size |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2030 % as the old one) with room for our new symbols. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2031 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2032 begin % Make the new font the current dictionary. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2033 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2034 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2035 { 1 index /FID ne |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2036 { def } { pop pop } ifelse |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2037 } forall % Copy each of the symbols from the old dictionary |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2038 % to the new one except for the font ID. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2039 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2040 currentdict /FontType get 0 ne { |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2041 /Encoding ISOLatin1Encoding def % Override the encoding with |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2042 % the ISOLatin1 encoding. |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2043 } if |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2044 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2045 % Use the font's bounding box to determine the ascent, descent, |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2046 % and overall height; don't forget that these values have to be |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2047 % transformed using the font's matrix. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2048 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2049 % ^ (x2 y2) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2050 % | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2051 % | v |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2052 % | +----+ - - |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2053 % | | | ^ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2054 % | | | | Ascent (usually > 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2055 % | | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2056 % (0 0) -> +--+----+--------> |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2057 % | | | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2058 % | | v Descent (usually < 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2059 % (x1 y1) --> +----+ - - |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2060 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2061 currentdict /FontType get 0 ne { |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2062 /FontBBox load aload pop % -- x1 y1 x2 y2 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2063 FontMatrix transform /Ascent exch def pop |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2064 FontMatrix transform /Descent exch def pop |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2065 } { |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2066 /PrimaryFont FDepVector 0 get def |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2067 PrimaryFont /FontBBox get aload pop |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2068 PrimaryFont /FontMatrix get transform /Ascent exch def pop |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2069 PrimaryFont /FontMatrix get transform /Descent exch def pop |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2070 } ifelse |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2071 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2072 /FontHeight Ascent Descent sub def % use `sub' because descent < 0 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2073 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2074 % Define these in case they're not in the FontInfo |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2075 % (also, here they're easier to get to). |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2076 /UnderlinePosition Descent 0.70 mul def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2077 /OverlinePosition Descent UnderlinePosition sub Ascent add def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2078 /StrikeoutPosition Ascent 0.30 mul def |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2079 /LineThickness FontHeight 0.05 mul def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2080 /Xshadow FontHeight 0.08 mul def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2081 /Yshadow FontHeight -0.09 mul def |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2082 /SpaceBackground Descent neg UnderlinePosition add def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2083 /XBox Descent neg def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2084 /YBox LineThickness 0.7 mul def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2085 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2086 currentdict % Leave the new font on the stack |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2087 end % Stop using the font as the current dictionary. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2088 definefont % Put the font into the font dictionary |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2089 pop % Discard the returned font. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2090 } bind def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2091 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2092 /DefFont { % Font definition |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2093 findfont exch scalefont reencodeFontISO |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2094 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2095 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2096 /F { % Font selection |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2097 findfont |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2098 dup /Ascent get /Ascent exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2099 dup /Descent get /Descent exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2100 dup /FontHeight get /FontHeight exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2101 dup /UnderlinePosition get /UnderlinePosition exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2102 dup /OverlinePosition get /OverlinePosition exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2103 dup /StrikeoutPosition get /StrikeoutPosition exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2104 dup /LineThickness get /LineThickness exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2105 dup /Xshadow get /Xshadow exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2106 dup /Yshadow get /Yshadow exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2107 dup /SpaceBackground get /SpaceBackground exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2108 dup /XBox get /XBox exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2109 dup /YBox get /YBox exch def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2110 setfont |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2111 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2112 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2113 /FG /setrgbcolor load def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2114 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2115 /bg false def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2116 /BG { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2117 dup /bg exch def |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2118 {mark 4 1 roll ]} |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2119 {[ 1.0 1.0 1.0 ]} |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2120 ifelse |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2121 /bgcolor exch def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2122 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2123 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2124 % B width C |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2125 % +-----------+ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2126 % | Ascent (usually > 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2127 % A + + |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2128 % | Descent (usually < 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2129 % +-----------+ |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2130 % E width D |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2131 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2132 /dobackground { % width -- |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2133 currentpoint % -- width x y |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2134 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2135 newpath |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2136 moveto % A (x y) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2137 0 Ascent rmoveto % B |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2138 dup 0 rlineto % C |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2139 0 Descent Ascent sub rlineto % D |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2140 neg 0 rlineto % E |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2141 closepath |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2142 bgcolor aload pop setrgbcolor |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2143 fill |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2144 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2145 } def |
7257 | 2146 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2147 /eolbg { % dobackground until right margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2148 PrintWidth % -- x-eol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2149 currentpoint pop % -- cur-x |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2150 sub % -- width until eol |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2151 dobackground |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2152 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2153 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2154 /PLN {PrintLineNumber {doLineNumber}if} def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2155 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2156 /SL { % Soft Linefeed |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2157 bg { eolbg } if |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2158 0 currentpoint exch pop LineHeight sub moveto |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2159 } def |
7257 | 2160 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2161 /HL {SL PLN} def % Hard Linefeed |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2162 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2163 % Some debug |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2164 /dcp { currentpoint exch 40 string cvs print (, ) print = } def |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2165 /dp { print 2 copy exch 40 string cvs print (, ) print = } def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2166 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2167 /W { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2168 ( ) stringwidth % Get the width of a space in the current font. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2169 pop % Discard the Y component. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2170 mul % Multiply the width of a space |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2171 % by the number of spaces to plot |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2172 bg { dup dobackground } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2173 0 rmoveto |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2174 } def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2175 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2176 /Effect 0 def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2177 /EF {/Effect exch def} def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2178 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2179 % stack: string |- -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2180 % effect: 1 - underline 2 - strikeout 4 - overline |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2181 % 8 - shadow 16 - box 32 - outline |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2182 /S { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2183 /xx currentpoint dup Descent add /yy exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2184 Ascent add /YY exch def def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2185 dup stringwidth pop xx add /XX exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2186 Effect 8 and 0 ne { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2187 /yy yy Yshadow add def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2188 /XX XX Xshadow add def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2189 } if |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2190 bg { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2191 true |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2192 Effect 16 and 0 ne |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2193 {SpaceBackground doBox} |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2194 {xx yy XX YY doRect} |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2195 ifelse |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2196 } if % background |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2197 Effect 16 and 0 ne {false 0 doBox}if % box |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2198 Effect 8 and 0 ne {dup doShadow}if % shadow |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2199 Effect 32 and 0 ne |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2200 {true doOutline} % outline |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2201 {show} % normal text |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2202 ifelse |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2203 Effect 1 and 0 ne {UnderlinePosition Hline}if % underline |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2204 Effect 2 and 0 ne {StrikeoutPosition Hline}if % strikeout |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2205 Effect 4 and 0 ne {OverlinePosition Hline}if % overline |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2206 } bind def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2207 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2208 % stack: position |- -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2209 /Hline { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2210 currentpoint exch pop add dup |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2211 gsave |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2212 newpath |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2213 xx exch moveto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2214 XX exch lineto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2215 closepath |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2216 LineThickness setlinewidth stroke |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2217 grestore |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2218 } bind def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2219 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2220 % stack: fill-or-not delta |- -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2221 /doBox { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2222 /dd exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2223 xx XBox sub dd sub yy YBox sub dd sub |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2224 XX XBox add dd add YY YBox add dd add |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2225 doRect |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2226 } bind def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2227 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2228 % stack: fill-or-not lower-x lower-y upper-x upper-y |- -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2229 /doRect { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2230 /rYY exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2231 /rXX exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2232 /ryy exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2233 /rxx exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2234 gsave |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2235 newpath |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2236 rXX rYY moveto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2237 rxx rYY lineto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2238 rxx ryy lineto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2239 rXX ryy lineto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2240 closepath |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2241 % top of stack: fill-or-not |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2242 {FillBgColor} |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2243 {LineThickness setlinewidth stroke} |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2244 ifelse |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2245 grestore |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2246 } bind def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2247 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2248 % stack: string |- -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2249 /doShadow { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2250 gsave |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2251 Xshadow Yshadow rmoveto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2252 false doOutline |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2253 grestore |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2254 } bind def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2255 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2256 /st 1 string def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2257 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2258 % stack: string fill-or-not |- -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2259 /doOutline { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2260 /-fillp- exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2261 /-ox- currentpoint /-oy- exch def def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2262 gsave |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2263 LineThickness setlinewidth |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2264 { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2265 st 0 3 -1 roll put |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2266 st dup true charpath |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2267 -fillp- {gsave FillBgColor grestore}if |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2268 stroke stringwidth |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2269 -oy- add /-oy- exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2270 -ox- add /-ox- exch def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2271 -ox- -oy- moveto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2272 } forall |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2273 grestore |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2274 -ox- -oy- moveto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2275 } bind def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2276 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2277 % stack: -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2278 /FillBgColor {bgcolor aload pop setrgbcolor fill} bind def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2279 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2280 /L0 6 /Times-Italic DefFont |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2281 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2282 % stack: -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2283 /doLineNumber { |
22204
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2284 /LineNumber where |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2285 { |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2286 pop |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2287 currentfont |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2288 gsave |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2289 0.0 0.0 0.0 setrgbcolor |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2290 /L0 findfont setfont |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2291 LineNumber Lines ge |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2292 {(end )} |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2293 {LineNumber 6 string cvs ( ) strcat} |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2294 ifelse |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2295 dup stringwidth pop neg 0 rmoveto |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2296 show |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2297 grestore |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2298 setfont |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2299 /LineNumber LineNumber 1 add def |
e1921cd8a532
(ps-print-version): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
22093
diff
changeset
|
2300 } if |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2301 } def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2302 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2303 % stack: -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2304 /printZebra { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2305 gsave |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2306 0.985 setgray |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2307 /double-zebra ZebraHeight ZebraHeight add def |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2308 /yiter double-zebra LineHeight mul neg def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2309 /xiter PrintWidth InterColumn add def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2310 NumberOfColumns {LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2311 grestore |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2312 } def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2313 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2314 % stack: lines-per-column |- -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2315 /doColumnZebra { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2316 gsave |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2317 dup double-zebra idiv {ZebraHeight doZebra 0 yiter rmoveto}repeat |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2318 double-zebra mod |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2319 dup 0 le {pop}{dup ZebraHeight gt {pop ZebraHeight}if doZebra}ifelse |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2320 grestore |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2321 } def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2322 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2323 % stack: zebra-height (in lines) |- -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2324 /doZebra { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2325 /zh exch 0.05 sub LineHeight mul def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2326 gsave |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2327 0 LineHeight 0.65 mul rmoveto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2328 PrintWidth 0 rlineto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2329 0 zh neg rlineto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2330 PrintWidth neg 0 rlineto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2331 0 zh rlineto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2332 fill |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2333 grestore |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2334 } def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2335 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2336 % tx ty rotation xscale yscale xpos ypos BeginBackImage |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2337 /BeginBackImage { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2338 /-save-image- save def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2339 /showpage {}def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2340 translate |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2341 scale |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2342 rotate |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2343 translate |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2344 } def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2345 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2346 /EndBackImage { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2347 -save-image- restore |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2348 } def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2349 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2350 % string fontsize fontname rotation gray xpos ypos ShowBackText |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2351 /ShowBackText { |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2352 gsave |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2353 translate |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2354 setgray |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2355 rotate |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2356 findfont exch dup /-offset- exch -0.25 mul def scalefont setfont |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2357 0 -offset- moveto |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2358 /-saveLineThickness- LineThickness def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2359 /LineThickness 1 def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2360 false doOutline |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2361 /LineThickness -saveLineThickness- def |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2362 grestore |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2363 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2364 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2365 /BeginDoc { |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2366 % ---- Remember space width of the normal text font `f0'. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2367 /SpaceWidth /f0 findfont setfont ( ) stringwidth pop def |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2368 % ---- save the state of the document (useful for ghostscript!) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2369 /docState save def |
23691
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2370 /JackGhostscript where {pop 1 27.7 29.7 div scale}if |
23666
53776c6e94b8
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
Andrew Innes <andrewi@gnu.org>
parents:
23551
diff
changeset
|
2371 % ---- [andrewi] set PageSize based on chosen dimensions |
53776c6e94b8
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
Andrew Innes <andrewi@gnu.org>
parents:
23551
diff
changeset
|
2372 /setpagedevice where { |
53776c6e94b8
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
Andrew Innes <andrewi@gnu.org>
parents:
23551
diff
changeset
|
2373 pop |
53776c6e94b8
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
Andrew Innes <andrewi@gnu.org>
parents:
23551
diff
changeset
|
2374 1 dict dup |
23691
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2375 /PageSize [ PrintPageWidth LeftMargin add RightMargin add |
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2376 LandscapePageHeight ] put |
23666
53776c6e94b8
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
Andrew Innes <andrewi@gnu.org>
parents:
23551
diff
changeset
|
2377 setpagedevice |
23691
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2378 }{ |
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2379 LandscapeMode { |
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2380 % ---- translate to bottom-right corner of Portrait page |
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2381 LandscapePageHeight 0 translate |
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2382 90 rotate |
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2383 }if |
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
2384 }ifelse |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2385 /ColumnWidth PrintWidth InterColumn add def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2386 % ---- translate to lower left corner of TEXT |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2387 LeftMargin BottomMargin translate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2388 % ---- define where printing will start |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2389 /f0 F % this installs Ascent |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2390 /PrintStartY PrintHeight Ascent sub def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2391 /ColumnIndex 1 def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2392 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2393 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2394 /EndDoc { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2395 % ---- on last page but not last column, spit out the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2396 ColumnIndex 1 eq not { showpage } if |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2397 % ---- restore the state of the document (useful for ghostscript!) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2398 docState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2399 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2400 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2401 /BeginDSCPage { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2402 % ---- when 1st column, save the state of the page |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2403 ColumnIndex 1 eq { /pageState save def } if |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2404 % ---- save the state of the column |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2405 /columnState save def |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2406 } def |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2407 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2408 /PrintHeaderWidth PrintOnlyOneHeader{PrintPageWidth}{PrintWidth}ifelse def |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2409 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2410 /BeginPage { |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2411 % ---- when 1st column, print all background effects |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2412 ColumnIndex 1 eq { |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2413 0 PrintStartY moveto % move to where printing will start |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2414 Zebra {printZebra}if |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2415 printGlobalBackground |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2416 printLocalBackground |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2417 } if |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2418 PrintHeader { |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2419 PrintOnlyOneHeader{ColumnIndex 1 eq}{true}ifelse { |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2420 PrintHeaderFrame {HeaderFrame}if |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2421 HeaderText |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2422 } if |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2423 } if |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2424 0 PrintStartY moveto % move to where printing will start |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2425 PLN |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2426 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2427 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2428 /EndPage { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2429 bg { eolbg } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2430 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2431 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2432 /EndDSCPage { |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2433 ColumnIndex NumberOfColumns eq { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2434 % ---- on last column, spit out the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2435 showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2436 % ---- restore the state of the page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2437 pageState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2438 /ColumnIndex 1 def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2439 } { % else |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2440 % ---- restore the state of the current column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2441 columnState restore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2442 % ---- and translate to the next column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2443 ColumnWidth 0 translate |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2444 /ColumnIndex ColumnIndex 1 add def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2445 } ifelse |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2446 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2447 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2448 /SetHeaderLines { % nb-lines -- |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2449 /HeaderLines exch def |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2450 % ---- bottom up |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2451 HeaderPad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2452 HeaderLines 1 sub HeaderLineHeight mul add |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2453 HeaderTitleLineHeight add |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2454 HeaderPad add |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2455 /HeaderHeight exch def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2456 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2457 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2458 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2459 % | tm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2460 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2461 % | header | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2462 % |-+-------| <-- (x y) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2463 % | ho | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2464 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2465 % | text | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2466 % |-+-------| <-- (0 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2467 % | bm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2468 % |---------| |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2469 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2470 /HeaderFrameStart { % -- x y |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2471 0 PrintHeight HeaderOffset add |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2472 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2473 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2474 /HeaderFramePath { |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2475 PrintHeaderWidth 0 rlineto |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2476 0 HeaderHeight rlineto |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2477 PrintHeaderWidth neg 0 rlineto |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2478 0 HeaderHeight neg rlineto |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2479 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2480 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2481 /HeaderFrame { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2482 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2483 0.4 setlinewidth |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2484 % ---- fill a black rectangle (the shadow of the next one) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2485 HeaderFrameStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2486 1 -1 rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2487 HeaderFramePath |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2488 0 setgray fill |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2489 % ---- do the next rectangle ... |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2490 HeaderFrameStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2491 HeaderFramePath |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2492 gsave 0.9 setgray fill grestore % filled with grey |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2493 gsave 0 setgray stroke grestore % drawn with black |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2494 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2495 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2496 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2497 /HeaderStart { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2498 HeaderFrameStart |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2499 exch HeaderPad add exch % horizontal pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2500 % ---- bottom up |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2501 HeaderPad add % vertical pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2502 HeaderDescent sub |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2503 HeaderLineHeight HeaderLines 1 sub mul add |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2504 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2505 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2506 /strcat { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2507 dup length 3 -1 roll dup length dup 4 -1 roll add string dup |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2508 0 5 -1 roll putinterval |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2509 dup 4 2 roll exch putinterval |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2510 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2511 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2512 /pagenumberstring { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2513 PageNumber 32 string cvs |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2514 ShowNofN { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2515 (/) strcat |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2516 PageCount 32 string cvs strcat |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2517 } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2518 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2519 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2520 /HeaderText { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2521 HeaderStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2522 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2523 HeaderLinesRight HeaderLinesLeft % -- rightLines leftLines |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2524 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2525 % ---- hack: `PN 1 and' == `PN 2 modulo' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2526 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2527 % ---- if duplex and even page number, then exchange left and right |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2528 Duplex PageNumber 1 and 0 eq and { exch } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2529 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2530 { % ---- process the left lines |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2531 aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2532 exch F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2533 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2534 dup xcheck { exec } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2535 show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2536 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2537 0 HeaderLineHeight neg rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2538 } forall |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2539 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2540 HeaderStart moveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2541 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2542 { % ---- process the right lines |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2543 aload pop |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2544 exch F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2545 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2546 dup xcheck { exec } if |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2547 dup stringwidth pop |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2548 PrintHeaderWidth exch sub HeaderPad 2 mul sub 0 rmoveto |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2549 show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2550 grestore |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2551 0 HeaderLineHeight neg rmoveto |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2552 } forall |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2553 } def |
7257 | 2554 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2555 /ReportFontInfo { |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2556 2 copy |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2557 /t0 3 1 roll DefFont |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2558 /t0 F |
10683 | 2559 /lh FontHeight def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2560 /sw ( ) stringwidth pop def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2561 /aw (01234567890abcdefghijklmnopqrstuvwxyz) dup length exch |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2562 stringwidth pop exch div def |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2563 /t1 12 /Helvetica-Oblique DefFont |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2564 /t1 F |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2565 gsave |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2566 (For ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2567 128 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2568 ( ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2569 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2570 ( point, the line height is ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2571 lh 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2572 (, the space width is ) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2573 sw 32 string cvs show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2574 (,) show |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2575 grestore |
10683 | 2576 0 FontHeight neg rmoveto |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2577 gsave |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2578 (and a crude estimate of average character width is ) show |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2579 aw 32 string cvs show |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2580 (.) show |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2581 grestore |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2582 0 FontHeight neg rmoveto |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2583 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2584 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2585 /cm { % cm to point |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2586 72 mul 2.54 div |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2587 } def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2588 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2589 /ReportAllFontInfo { |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2590 FontDirectory |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2591 { % key = font name value = font dictionary |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2592 pop 10 exch ReportFontInfo |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2593 } forall |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2594 } def |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2595 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2596 % 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2597 % 3 cm 20 cm moveto ReportAllFontInfo showpage |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2598 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2599 ") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2600 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2601 (defvar ps-print-prologue-2 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2602 " |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2603 % ---- These lines must be kept together because... |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2604 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2605 /h0 F |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2606 /HeaderTitleLineHeight FontHeight def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2607 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2608 /h1 F |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2609 /HeaderLineHeight FontHeight def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2610 /HeaderDescent Descent def |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2611 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2612 % ---- ...because `F' has a side-effect on `FontHeight' and `Descent' |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2613 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2614 ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2615 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2616 ;; Start Editing Here: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2617 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2618 (defvar ps-source-buffer nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2619 (defvar ps-spool-buffer-name "*PostScript*") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2620 (defvar ps-spool-buffer nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2621 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2622 (defvar ps-output-head nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2623 (defvar ps-output-tail nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2624 |
22397 | 2625 (defvar ps-page-postscript 0) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2626 (defvar ps-page-count 0) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2627 (defvar ps-showline-count 1) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2628 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2629 (defvar ps-control-or-escape-regexp nil) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2630 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2631 (defvar ps-background-pages nil) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2632 (defvar ps-background-all-pages nil) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2633 (defvar ps-background-text-count 0) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2634 (defvar ps-background-image-count 0) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2635 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2636 (defvar ps-current-font 0) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2637 (defvar ps-default-color (and ps-print-color-p ps-default-fg)) ; black |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2638 (defvar ps-current-color ps-default-color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2639 (defvar ps-current-bg nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2640 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2641 (defvar ps-razchunk 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2642 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2643 (defvar ps-color-p nil) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2644 (defvar ps-color-format |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2645 (if (eq ps-print-emacs-type 'emacs) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2646 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2647 ;; Emacs understands the %f format; we'll use it to limit color RGB |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2648 ;; values to three decimals to cut down some on the size of the |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2649 ;; PostScript output. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2650 "%0.3f %0.3f %0.3f" |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2651 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2652 ;; Lucid emacsen will have to make do with %s (princ) for floats. |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2653 "%s %s %s")) |
7257 | 2654 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2655 ;; These values determine how much print-height to deduct when headers |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2656 ;; are turned on. This is a pretty clumsy way of handling it, but |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2657 ;; it'll do for now. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2658 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2659 (defvar ps-header-pad 0 |
21955
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
2660 "Vertical and horizontal space between the header frame and the text. |
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
2661 This is in units of points (1/72 inch).") |
7257 | 2662 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2663 ;; Define accessors to the dimensions list. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2664 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2665 (defmacro ps-page-dimensions-get-width (dims) `(nth 0 ,dims)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2666 (defmacro ps-page-dimensions-get-height (dims) `(nth 1 ,dims)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2667 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2668 (defvar ps-landscape-page-height nil) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2669 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2670 (defvar ps-print-width nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2671 (defvar ps-print-height nil) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2672 |
20331 | 2673 (defvar ps-height-remaining nil) |
2674 (defvar ps-width-remaining nil) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2675 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2676 (defvar ps-print-color-scale nil) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
2677 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2678 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2679 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2680 ;; Internal Variables |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2681 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2682 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2683 (defvar ps-print-face-extension-alist nil |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2684 "Alist of symbolic faces *WITH* extension features (box, outline, etc). |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2685 An element of this list has the following form: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2686 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2687 (FACE . [BITS FG BG]) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2688 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2689 FACE is a symbol denoting a face name |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2690 BITS is a bit vector, where each bit correspond |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2691 to a feature (bold, underline, etc) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2692 (see documentation for `ps-print-face-map-alist') |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2693 FG foreground color (string or nil) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2694 BG background color (string or nil) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2695 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2696 Don't change this list directly; instead, |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2697 use `ps-extend-face' and `ps-extend-face-list'. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2698 See documentation for `ps-extend-face' for valid extension symbol.") |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2699 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2700 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2701 (defvar ps-print-face-alist nil |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2702 "Alist of symbolic faces *WITHOUT* extension features (box, outline, etc). |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2703 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2704 An element of this list has the same form as an element of |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2705 `ps-print-face-extension-alist'. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2706 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2707 Don't change this list directly; this list is used by `ps-face-attributes', |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2708 `ps-map-face' and `ps-build-reference-face-lists'.") |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2709 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2710 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2711 (defconst ps-print-face-map-alist |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2712 '((bold . 1) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2713 (italic . 2) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2714 (underline . 4) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2715 (strikeout . 8) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2716 (overline . 16) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2717 (shadow . 32) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2718 (box . 64) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2719 (outline . 128)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2720 "Alist of all features and the corresponding bit mask. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2721 Each symbol correspond to one bit in a bit vector.") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2722 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2723 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2724 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2725 ;; Remapping Faces |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2726 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2727 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2728 ;;;###autoload |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2729 (defun ps-extend-face-list (face-extension-list &optional merge-p) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2730 "Extend face in `ps-print-face-extension-alist'. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2731 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2732 If optional MERGE-P is non-nil, extensions in FACE-EXTENSION-LIST are merged |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2733 with face extension in `ps-print-face-extension-alist'; otherwise, overrides. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2734 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2735 The elements in FACE-EXTENSION-LIST is like those for `ps-extend-face'. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2736 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2737 See `ps-extend-face' for documentation." |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2738 (while face-extension-list |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2739 (ps-extend-face (car face-extension-list) merge-p) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2740 (setq face-extension-list (cdr face-extension-list)))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2741 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2742 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2743 ;;;###autoload |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2744 (defun ps-extend-face (face-extension &optional merge-p) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2745 "Extend face in `ps-print-face-extension-alist'. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2746 |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
2747 If optional MERGE-P is non-nil, extensions in FACE-EXTENSION list are merged |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2748 with face extensions in `ps-print-face-extension-alist'; otherwise, overrides. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2749 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2750 The elements of FACE-EXTENSION list have the form: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2751 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2752 (FACE-NAME FOREGROUND BACKGROUND EXTENSION...) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2753 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2754 FACE-NAME is a face name symbol. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2755 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2756 FOREGROUND and BACKGROUND may be nil or a string that denotes the |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2757 foreground and background colors respectively. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2758 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2759 EXTENSION is one of the following symbols: |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2760 bold - use bold font. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2761 italic - use italic font. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2762 underline - put a line under text. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2763 strikeout - like underline, but the line is in middle of text. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2764 overline - like underline, but the line is over the text. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2765 shadow - text will have a shadow. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2766 box - text will be surrounded by a box. |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2767 outline - print characters as hollow outlines. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2768 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2769 If EXTENSION is any other symbol, it is ignored." |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2770 (let* ((face-name (nth 0 face-extension)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2771 (foreground (nth 1 face-extension)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2772 (background (nth 2 face-extension)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2773 (ps-face (cdr (assq face-name ps-print-face-extension-alist))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2774 (face-vector (or ps-face (vector 0 nil nil))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2775 (face-bit (ps-extension-bit face-extension))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2776 ;; extend face |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2777 (aset face-vector 0 (if merge-p |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2778 (logior (aref face-vector 0) face-bit) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2779 face-bit)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2780 (and foreground (stringp foreground) (aset face-vector 1 foreground)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2781 (and background (stringp background) (aset face-vector 2 background)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2782 ;; if face does not exist, insert it |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2783 (or ps-face |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2784 (setq ps-print-face-extension-alist |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2785 (cons (cons face-name face-vector) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2786 ps-print-face-extension-alist))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2787 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2788 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2789 (defun ps-extension-bit (face-extension) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2790 (let ((face-bit 0)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2791 ;; map valid symbol extension to bit vector |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2792 (setq face-extension (cdr (cdr face-extension))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2793 (while (setq face-extension (cdr face-extension)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2794 (setq face-bit (logior face-bit |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2795 (or (cdr (assq (car face-extension) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2796 ps-print-face-map-alist)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2797 0)))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2798 face-bit)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2799 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2800 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2801 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2802 ;; Adapted from font-lock: |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2803 ;; Originally face attributes were specified via `font-lock-face-attributes'. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2804 ;; Users then changed the default face attributes by setting that variable. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2805 ;; However, we try and be back-compatible and respect its value if set except |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2806 ;; for faces where M-x customize has been used to save changes for the face. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2807 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2808 (defun ps-font-lock-face-attributes () |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2809 (and (boundp 'font-lock-mode) (symbol-value 'font-lock-mode) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2810 (boundp 'font-lock-face-attributes) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2811 (let ((face-attributes font-lock-face-attributes)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2812 (while face-attributes |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
2813 (let* ((face-attribute |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
2814 (car (prog1 face-attributes |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
2815 (setq face-attributes (cdr face-attributes))))) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2816 (face (car face-attribute))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2817 ;; Rustle up a `defface' SPEC from a |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2818 ;; `font-lock-face-attributes' entry. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2819 (unless (get face 'saved-face) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2820 (let ((foreground (nth 1 face-attribute)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2821 (background (nth 2 face-attribute)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2822 (bold-p (nth 3 face-attribute)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2823 (italic-p (nth 4 face-attribute)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2824 (underline-p (nth 5 face-attribute)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2825 face-spec) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2826 (when foreground |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2827 (setq face-spec (cons ':foreground |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2828 (cons foreground face-spec)))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2829 (when background |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2830 (setq face-spec (cons ':background |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2831 (cons background face-spec)))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2832 (when bold-p |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2833 (setq face-spec (append '(:bold t) face-spec))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2834 (when italic-p |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2835 (setq face-spec (append '(:italic t) face-spec))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2836 (when underline-p |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2837 (setq face-spec (append '(:underline t) face-spec))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2838 (custom-declare-face face (list (list t face-spec)) nil) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2839 ))))))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2840 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2841 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2842 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2843 ;; Internal functions and variables |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2844 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2845 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2846 (make-local-hook 'ps-print-hook) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2847 (make-local-hook 'ps-print-begin-page-hook) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2848 (make-local-hook 'ps-print-begin-column-hook) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2849 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2850 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2851 (defun ps-print-without-faces (from to &optional filename region-p) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2852 (ps-spool-without-faces from to region-p) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2853 (ps-do-despool filename)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2854 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2855 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2856 (defun ps-spool-without-faces (from to &optional region-p) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2857 (run-hooks 'ps-print-hook) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2858 (ps-printing-region region-p) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2859 (ps-generate (current-buffer) from to 'ps-generate-postscript)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2860 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2861 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2862 (defun ps-print-with-faces (from to &optional filename region-p) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2863 (ps-spool-with-faces from to region-p) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2864 (ps-do-despool filename)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2865 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2866 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2867 (defun ps-spool-with-faces (from to &optional region-p) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2868 (run-hooks 'ps-print-hook) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2869 (ps-printing-region region-p) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2870 (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2871 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2872 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2873 (defsubst ps-count-lines (from to) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2874 (+ (count-lines from to) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2875 (save-excursion |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2876 (goto-char to) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
2877 (if (= (current-column) 0) 1 0)))) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2878 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2879 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2880 (defvar ps-printing-region nil |
21955
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
2881 "Variable used to indicate if ps-print is printing a region. |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2882 If non-nil, it is a cons, the car of which is the line number |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2883 where the region begins, and its cdr is the total number of lines |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2884 in the buffer. Formatting functions can use this information |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2885 to print the original line number (and not the number of lines printed), |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2886 and to indicate in the header that the printout is of a partial file.") |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2887 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2888 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2889 (defun ps-printing-region (region-p) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2890 (setq ps-printing-region |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2891 (and region-p |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2892 (cons (ps-count-lines (point-min) (region-beginning)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
2893 (ps-count-lines (point-min) (point-max)))))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2894 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
2895 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2896 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2897 ;; Internal functions |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
2898 |
21999
35efe9eafc6c
(ps-alist-position): Renamed from ps-position.
Richard M. Stallman <rms@gnu.org>
parents:
21955
diff
changeset
|
2899 (defsubst ps-font-alist (font-sym) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2900 (get font-sym 'fonts)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2901 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2902 (defun ps-font (font-sym font-type) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2903 "Font family name for text of `font-type', when generating PostScript." |
21999
35efe9eafc6c
(ps-alist-position): Renamed from ps-position.
Richard M. Stallman <rms@gnu.org>
parents:
21955
diff
changeset
|
2904 (let* ((font-list (ps-font-alist font-sym)) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2905 (normal-font (cdr (assq 'normal font-list)))) |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
2906 (while (and font-list (not (eq font-type (car (car font-list))))) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
2907 (setq font-list (cdr font-list))) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
2908 (or (cdr (car font-list)) normal-font))) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2909 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2910 (defun ps-fonts (font-sym) |
21999
35efe9eafc6c
(ps-alist-position): Renamed from ps-position.
Richard M. Stallman <rms@gnu.org>
parents:
21955
diff
changeset
|
2911 (mapcar 'cdr (ps-font-alist font-sym))) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2912 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2913 (defun ps-font-number (font-sym font-type) |
21999
35efe9eafc6c
(ps-alist-position): Renamed from ps-position.
Richard M. Stallman <rms@gnu.org>
parents:
21955
diff
changeset
|
2914 (or (ps-alist-position font-type (ps-font-alist font-sym)) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2915 0)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2916 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2917 (defsubst ps-line-height (font-sym) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2918 "The height of a line, for generating PostScript. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2919 This is the value that ps-print uses to determine the height, |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2920 y-dimension, of the lines of text it has printed, and thus affects the |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2921 point at which page-breaks are placed. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2922 The line-height is *not* the same as the point size of the font." |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2923 (get font-sym 'line-height)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2924 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2925 (defsubst ps-title-line-height (font-sym) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2926 "The height of a `title' line, for generating PostScript. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2927 This is the value that ps-print uses to determine the height, |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2928 y-dimension, of the lines of text it has printed, and thus affects the |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2929 point at which page-breaks are placed. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2930 The title-line-height is *not* the same as the point size of the font." |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2931 (get font-sym 'title-line-height)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2932 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2933 (defsubst ps-space-width (font-sym) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2934 "The width of a space character, for generating PostScript. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2935 This value is used in expanding tab characters." |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2936 (get font-sym 'space-width)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2937 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2938 (defsubst ps-avg-char-width (font-sym) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2939 "The average width, in points, of a character, for generating PostScript. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2940 This is the value that ps-print uses to determine the length, |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2941 x-dimension, of the text it has printed, and thus affects the point at |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2942 which long lines wrap around." |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2943 (get font-sym 'avg-char-width)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
2944 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2945 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2946 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
23551 | 2947 ;; For handling multi-byte characters -- Begin. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2948 ;; |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2949 ;; The following comments apply only to this part (through the next ^L). |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2950 ;; Author: Kenichi Handa <handa@etl.go.jp> |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2951 ;; Maintainer: Kenichi Handa <handa@etl.go.jp> |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2952 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2953 (eval-and-compile |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2954 (if (not (string< mule-version "4.0")) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2955 (progn |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2956 (defalias 'ps-mule-next-point '1+) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2957 (defalias 'ps-mule-chars-in-string 'length) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2958 (defalias 'ps-mule-string-char 'aref) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2959 (defsubst ps-mule-next-index (str i) (1+ i))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2960 (defun set-buffer-multibyte (arg) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2961 (setq enable-multibyte-characters arg)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2962 (defun string-as-unibyte (arg) arg) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2963 (defun string-as-multibyte (arg) arg) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2964 (defun charset-after (&optional arg) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2965 (char-charset (char-after arg))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2966 (defun ps-mule-next-point (arg) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2967 (save-excursion (goto-char arg) (forward-char 1) (point))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2968 (defun ps-mule-chars-in-string (string) |
23484
d13d8b3b3d69
(ps-mule-chars-in-string): No need to use sref.
Richard M. Stallman <rms@gnu.org>
parents:
23468
diff
changeset
|
2969 (length string)) |
d13d8b3b3d69
(ps-mule-chars-in-string): No need to use sref.
Richard M. Stallman <rms@gnu.org>
parents:
23468
diff
changeset
|
2970 (defalias 'ps-mule-string-char 'aref) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2971 (defun ps-mule-next-index (str i) |
23484
d13d8b3b3d69
(ps-mule-chars-in-string): No need to use sref.
Richard M. Stallman <rms@gnu.org>
parents:
23468
diff
changeset
|
2972 (1+ i))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2973 ) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2974 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2975 (defvar ps-mule-font-info-database |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2976 nil |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2977 "Alist of charsets with the corresponding font information. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2978 Each element has the form: |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2979 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2980 (CHARSET (FONT-TYPE FONT-SRC FONT-NAME ENCODING BYTES) ...) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2981 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2982 Where |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2983 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2984 CHARSET is a charset (symbol) for this font family, |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2985 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2986 FONT-TYPE is a font type: normal, bold, italic, or bold-italic. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2987 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2988 FONT-SRC is a font source: builtin, bdf, vflib, or nil. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2989 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2990 If FONT-SRC is builtin, FONT-NAME is a buitin PostScript font name. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2991 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2992 If FONT-SRC is bdf, FONT-NAME is a BDF font file name. To use this font, |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2993 the external library `bdf' is required. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2994 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2995 If FONT-SRC is vflib, FONT-NAME is the name of a font that VFlib knows. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2996 To use this font, the external library `vflib' is required. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2997 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
2998 If FONT-SRC is nil, a proper ASCII font in the variable |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
2999 `ps-font-info-database' is used. This is useful for Latin-1 characters. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3000 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3001 ENCODING is a coding system to encode a string of characters of CHARSET into a |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3002 proper string matching an encoding of the specified font. ENCODING may be a |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3003 function that does this encoding. In this case, the function is called with |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3004 one argument, the string to encode, and it should return an encoded string. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3005 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3006 BYTES specifies how many bytes each character has in the encoded byte |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3007 sequence; it should be 1 or 2. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3008 |
23551 | 3009 All multi-byte characters are printed by fonts specified in this database |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3010 regardless of a font family of ASCII characters. The exception is Latin-1 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3011 characters which are printed by the same font as ASCII characters, thus obey |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3012 font family. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3013 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3014 See also the variable `ps-font-info-database'.") |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3015 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3016 (defconst ps-mule-font-info-database-latin |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3017 '((latin-iso8859-1 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3018 (normal nil nil iso-latin-1))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3019 "Sample setting of `ps-mule-font-info-database' to use latin fonts.") |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3020 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3021 (defconst ps-mule-font-info-database-ps |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3022 '((katakana-jisx0201 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3023 (normal builtin "Ryumin-Light.Katakana" ps-mule-encode-7bit 1) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3024 (bold builtin "GothicBBB-Medium.Katakana" ps-mule-encode-7bit 1) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3025 (bold-italic builtin "GothicBBB-Medium.Katakana" ps-mule-encode-7bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3026 (latin-jisx0201 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3027 (normat builtin "Ryumin-Light.Hankaku" ps-mule-encode-7bit 1) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3028 (bold builtin "GothicBBB-Medium.Hankaku" ps-mule-encode-7bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3029 (japanese-jisx0208 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3030 (normal builtin "Ryumin-Light-H" ps-mule-encode-7bit 2) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3031 (bold builtin "GothicBBB-Medium-H" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3032 (korean-ksc5601 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3033 (normal builtin "Batang-Medium-KSC-H" ps-mule-encode-7bit 2) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3034 (bold builtin " Gulim-Medium-KSC-H" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3035 ) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3036 "Sample setting of the `ps-mule-font-info-database' to use builtin PS font. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3037 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3038 Currently, data for Japanese and Korean PostScript printers are listed.") |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3039 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3040 (defconst ps-mule-font-info-database-bdf |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3041 '((ascii |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3042 (normal bdf "etl24-latin1.bdf" nil 1) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3043 (bold bdf "etl16b-latin1.bdf" iso-latin-1 1) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3044 (italic bdf "etl16i-latin1.bdf" iso-latin-1 1) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3045 (bold-italic bdf "etl16bi-latin1.bdf" iso-latin-1 1)) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3046 (latin-iso8859-1 |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3047 (normal bdf "etl24-latin1.bdf" iso-latin-1 1) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3048 (bold bdf "etl16b-latin1.bdf" iso-latin-1 1) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3049 (italic bdf "etl16i-latin1.bdf" iso-latin-1 1) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3050 (bold-italic bdf "etl16bi-latin1.bdf" iso-latin-1 1)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3051 (latin-iso8859-2 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3052 (normal bdf "etl24-latin2.bdf" iso-latin-2 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3053 (latin-iso8859-3 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3054 (normal bdf "etl24-latin3.bdf" iso-latin-3 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3055 (latin-iso8859-4 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3056 (normal bdf "etl24-latin4.bdf" iso-latin-4 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3057 (thai-tis620 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3058 (normal bdf "thai-24.bdf" thai-tis620 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3059 (greek-iso8859-7 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3060 (normal bdf "etl24-greek.bdf" greek-iso-8bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3061 ;; (arabic-iso8859-6 nil) ; not yet available |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3062 (hebrew-iso8859-8 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3063 (normal bdf "etl24-hebrew.bdf" hebrew-iso-8bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3064 (katakana-jisx0201 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3065 (normal bdf "12x24rk.bdf" ps-mule-encode-8bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3066 (latin-jisx0201 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3067 (normal bdf "12x24rk.bdf" ps-mule-encode-7bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3068 (cyrillic-iso8859-5 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3069 (normal bdf "etl24-cyrillic.bdf" cyrillic-iso-8bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3070 (latin-iso8859-9 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3071 (normal bdf "etl24-latin5.bdf" iso-latin-5 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3072 (japanese-jisx0208-1978 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3073 (normal bdf "jiskan24.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3074 (chinese-gb2312 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3075 (normal bdf "gb24st.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3076 (japanese-jisx0208 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3077 (normal bdf "jiskan24.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3078 (korean-ksc5601 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3079 (normal bdf "hanglm24.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3080 (japanese-jisx0212 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3081 (normal bdf "jisksp40.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3082 (chinese-cns11643-1 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3083 (normal bdf "cns-1-40.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3084 (chinese-cns11643-2 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3085 (normal bdf "cns-2-40.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3086 (chinese-big5-1 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3087 (normal bdf "taipei24.bdf" chinese-big5 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3088 (chinese-big5-2 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3089 (normal bdf "taipei24.bdf" chinese-big5 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3090 (chinese-sisheng |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3091 (normal bdf "etl24-sisheng.bdf" ps-mule-encode-8bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3092 (ipa |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3093 (normal bdf "etl24-ipa.bdf" ps-mule-encode-8bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3094 (vietnamese-viscii-lower |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3095 (normal bdf "etl24-viscii.bdf" vietnamese-viscii 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3096 (vietnamese-viscii-upper |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3097 (normal bdf "etl24-viscii.bdf" vietnamese-viscii 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3098 (arabic-digit |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3099 (normal bdf "etl24-arabic0.bdf" ps-mule-encode-7bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3100 (arabic-1-column |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3101 (normal bdf "etl24-arabic1.bdf" ps-mule-encode-7bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3102 ;; (ascii-right-to-left nil) ; not yet available |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3103 (lao |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3104 (normal bdf "mule-lao-24.bdf" lao 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3105 (arabic-2-column |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3106 (normal bdf "etl24-arabic2.bdf" ps-mule-encode-7bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3107 (indian-is13194 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3108 (normal bdf "mule-iscii-24.bdf" ps-mule-encode-7bit 1)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3109 (indian-1-column |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3110 (normal bdf "mule-indian-1col-24.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3111 (tibetan-1-column |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3112 (normal bdf "mule-tibmdx-1col-24.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3113 (ethiopic |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3114 (normal bdf "ethiomx24f-uni.bdf" ps-mule-encode-ethiopic 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3115 (chinese-cns11643-3 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3116 (normal bdf "cns-3-40.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3117 (chinese-cns11643-4 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3118 (normal bdf "cns-4-40.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3119 (chinese-cns11643-5 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3120 (normal bdf "cns-5-40.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3121 (chinese-cns11643-6 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3122 (normal bdf "cns-6-40.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3123 (chinese-cns11643-7 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3124 (normal bdf "cns-7-40.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3125 (indian-2-column |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3126 (normal bdf "mule-indian-24.bdf" ps-mule-encode-7bit 2)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3127 (tibetan |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3128 (normal bdf "mule-tibmdx-24.bdf" ps-mule-encode-7bit 2))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3129 "Sample setting of the `ps-mule-font-info-database' to use BDF fonts. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3130 BDF (Bitmap Distribution Format) is a format used for distributing X's font |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3131 source file. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3132 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3133 Current default value list for BDF fonts is included in `intlfonts-1.1' which is |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3134 a collection of X11 fonts for all characters supported by Emacs. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3135 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3136 Using this list as default value to `ps-mule-font-info-database', all characters |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3137 including ASCII and Latin-1 are printed by BDF fonts. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3138 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3139 See also `ps-mule-font-info-database-ps-bdf'.") |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3140 |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3141 (defconst ps-mule-font-info-database-ps-bdf |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3142 (cons (car ps-mule-font-info-database-latin) |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3143 (cdr (cdr ps-mule-font-info-database-bdf))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3144 "Sample setting of the `ps-mule-font-info-database' to use BDF fonts. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3145 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3146 Current default value list for BDF fonts is included in `intlfonts-1.1' which is |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3147 a collection of X11 fonts for all characters supported by Emacs. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3148 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3149 Using this list as default value to `ps-mule-font-info-database', all characters |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3150 except ASCII and Latin-1 characters are printed by BDF fonts. ASCII and Latin-1 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3151 characters are printed by PostScript font specified by `ps-font-family' and |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3152 `ps-header-font-family'. |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3153 |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3154 See also `ps-mule-font-info-database-bdf'.") |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3155 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3156 ;; Two typical encoding functions for PostScript fonts. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3157 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3158 (defun ps-mule-encode-7bit (string) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3159 (ps-mule-encode-bit string 0)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3160 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3161 (defun ps-mule-encode-8bit (string) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3162 (ps-mule-encode-bit string 128)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3163 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3164 (defun ps-mule-encode-bit (string delta) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3165 (let* ((dim (charset-dimension (char-charset (ps-mule-string-char string 0)))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3166 (len (* (ps-mule-chars-in-string string) dim)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3167 (str (make-string len 0)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3168 (i 0) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3169 (j 0)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3170 (if (= dim 1) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3171 (while (< j len) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3172 (aset str j |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3173 (+ (nth 1 (split-char (ps-mule-string-char string i))) delta)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3174 (setq i (ps-mule-next-index string i) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3175 j (1+ j))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3176 (while (< j len) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3177 (let ((split (split-char (ps-mule-string-char string i)))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3178 (aset str j (+ (nth 1 split) delta)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3179 (aset str (1+ j) (+ (nth 2 split) delta)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3180 (setq i (ps-mule-next-index string i) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3181 j (+ j 2))))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3182 str)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3183 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3184 ;; Special encoding function for Ethiopic. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3185 (define-ccl-program ccl-encode-ethio-unicode |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3186 `(1 |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3187 ((read r2) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3188 (loop |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3189 (if (r2 == ,leading-code-private-22) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3190 ((read r0) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3191 (if (r0 == ,(charset-id 'ethiopic)) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3192 ((read r1 r2) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3193 (r1 &= 127) (r2 &= 127) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3194 (call ccl-encode-ethio-font) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3195 (write r1) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3196 (write-read-repeat r2)) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3197 ((write r2 r0) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3198 (repeat)))) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3199 (write-read-repeat r2)))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3200 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3201 (defun ps-mule-encode-ethiopic (string) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3202 (ccl-execute-on-string (symbol-value 'ccl-encode-ethio-unicode) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3203 (make-vector 9 nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3204 string)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3205 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3206 ;; A charset which we are now processing. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3207 (defvar ps-mule-current-charset nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3208 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3209 (defun ps-mule-get-font-spec (charset font-type) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3210 "Return FONT-SPEC for printing characters CHARSET with FONT-TYPE. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3211 FONT-SPEC is a list that has the form: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3212 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3213 (FONT-SRC FONT-NAME ENCODING BYTES) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3214 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3215 FONT-SPEC is extracted from `ps-mule-font-info-database'. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3216 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3217 See the documentation of `ps-mule-font-info-database' for the meaning of each |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3218 element of the list." |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3219 (let ((slot (cdr (assq charset ps-mule-font-info-database)))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3220 (and slot |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3221 (cdr (or (assq font-type slot) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3222 (and (eq font-type 'bold-italic) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3223 (or (assq 'bold slot) (assq 'italic slot))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3224 (assq 'normal slot)))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3225 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3226 ;; Functions to access each element of FONT-SPEC. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3227 (defsubst ps-mule-font-spec-src (font-spec) (car font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3228 (defsubst ps-mule-font-spec-name (font-spec) (nth 1 font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3229 (defsubst ps-mule-font-spec-encoding (font-spec) (nth 2 font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3230 (defsubst ps-mule-font-spec-bytes (font-spec) (nth 3 font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3231 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3232 (defsubst ps-mule-printable-p (charset) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3233 "Non-nil if characters in CHARSET is printable." |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3234 (ps-mule-get-font-spec charset 'normal)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3235 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3236 (defconst ps-mule-external-libraries |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3237 '((builtin nil |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3238 nil nil nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3239 (bdf nil |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3240 bdf-generate-prologue bdf-generate-font bdf-generate-glyphs) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3241 (pcf nil |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3242 pcf-generate-prologue pcf-generate-font pcf-generate-glyphs) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3243 (vflib nil |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3244 vflib-generate-prologue vflib-generate-font vflib-generate-glyphs)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3245 "Alist of information of external libraries to support PostScript printing. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3246 Each element has the form: |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3247 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3248 (FONT-SRC INITIALIZED-P PROLOGUE-FUNC FONT-FUNC GLYPHS-FUNC) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3249 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3250 FONT-SRC is the font source: builtin, bdf, pcf, or vflib. Except for `builtin', |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3251 libraries must have the same name as indicated by FONT-SRC. Currently, we only |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3252 have the `bdf' library. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3253 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3254 INITIALIZED-P indicates if this library is initialized or not. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3255 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3256 PROLOGUE-FUNC is a function to generate PostScript code which define several |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3257 PostScript procedures that will be called by FONT-FUNC and GLYPHS-FUNC. It is |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3258 called with no argument, and should return a list of strings. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3259 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3260 FONT-FUNC is a function to generate PostScript code which define a new font. It |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3261 is called with one argument FONT-SPEC, and should return a list of strings. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3262 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3263 GLYPHS-FUNC is a function to generate PostScript code which define glyphs of |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3264 characters. It is called with three arguments FONT-SPEC, CODE-LIST, and BYTES, |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3265 and should return a list of strings.") |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3266 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3267 (defun ps-mule-init-external-library (font-spec) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3268 "Initialize external library specified by FONT-SPEC for PostScript printing. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3269 See the documentation of `ps-mule-get-font-spec' for FONT-SPEC's meaning." |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3270 (let* ((font-src (ps-mule-font-spec-src font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3271 (slot (assq font-src ps-mule-external-libraries))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3272 (or (not font-src) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3273 (nth 1 slot) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3274 (let ((func (nth 2 slot))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3275 (if func |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3276 (progn |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3277 (or (featurep font-src) (require font-src)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3278 (ps-output-prologue (funcall func)))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3279 (setcar (cdr slot) t))))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3280 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3281 ;; Cached glyph information of fonts, alist of: |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3282 ;; (FONT-NAME ((FONT-TYPE-NUMBER . SCALED-FONT-NAME) ...) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3283 ;; cache CODE0 CODE1 ...) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3284 (defvar ps-mule-font-cache nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3285 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3286 (defun ps-mule-generate-font (font-spec charset) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3287 "Generate PostScript codes to define a new font in FONT-SPEC for CHARSET." |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3288 (let* ((font-cache (assoc (ps-mule-font-spec-name font-spec) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3289 ps-mule-font-cache)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3290 (font-src (ps-mule-font-spec-src font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3291 (font-name (ps-mule-font-spec-name font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3292 (func (nth 3 (assq font-src ps-mule-external-libraries))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3293 (scaled-font-name |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3294 (if (eq charset 'ascii) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3295 (format "f%d" ps-current-font) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3296 (format "f%02x-%d" |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3297 (charset-id charset) ps-current-font)))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3298 (and func (not font-cache) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3299 (ps-output-prologue (funcall func charset font-spec))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3300 (ps-output-prologue |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3301 (list (format "/%s %f /%s Def%sFontMule\n" |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3302 scaled-font-name ps-font-size font-name |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3303 (if (eq ps-mule-current-charset 'ascii) "Ascii" "")))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3304 (if font-cache |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3305 (setcar (cdr font-cache) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3306 (cons (cons ps-current-font scaled-font-name) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3307 (nth 1 font-cache))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3308 (setq font-cache (list font-name |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3309 (list (cons ps-current-font scaled-font-name)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3310 'cache) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3311 ps-mule-font-cache (cons font-cache ps-mule-font-cache))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3312 font-cache)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3313 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3314 (defun ps-mule-generate-glyphs (font-spec code-list) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3315 "Generate PostScript codes which generate glyphs for CODE-LIST of FONT-SPEC." |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3316 (let* ((font-src (ps-mule-font-spec-src font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3317 (func (nth 4 (assq font-src ps-mule-external-libraries)))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3318 (and func |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3319 (ps-output-prologue |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3320 (funcall func font-spec code-list |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3321 (ps-mule-font-spec-bytes font-spec)))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3322 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3323 (defvar ps-last-font nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3324 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3325 (defun ps-mule-prepare-font (font-spec string charset &optional no-setfont) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3326 "Generate PostScript codes to print STRING of CHARSET by font FONT-SPEC. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3327 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3328 The generated code is inserted on prologue part except the code that sets the |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3329 current font (using PostScript procedure `FM'). |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3330 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3331 If optional arg NO-SETFONT is non-nil, don't generate the code for setting the |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3332 current font." |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3333 (let ((font-cache (assoc (ps-mule-font-spec-name font-spec) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3334 ps-mule-font-cache))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3335 (or (and font-cache (assq ps-current-font (nth 1 font-cache))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3336 (setq font-cache (ps-mule-generate-font font-spec charset))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3337 (or no-setfont |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3338 (let ((new-font (cdr (assq ps-current-font (nth 1 font-cache))))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3339 (or (equal new-font ps-last-font) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3340 (progn |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3341 (ps-output (format "/%s FM\n" new-font)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3342 (setq ps-last-font new-font))))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3343 (if (nth 4 (assq (ps-mule-font-spec-src font-spec) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3344 ps-mule-external-libraries)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3345 ;; We have to generate PostScript codes which define glyphs. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3346 (let* ((cached-codes (nthcdr 2 font-cache)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3347 (newcodes nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3348 (bytes (ps-mule-font-spec-bytes font-spec)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3349 (len (length string)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3350 (i 0) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3351 code) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3352 (while (< i len) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3353 (setq code (if (= bytes 1) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3354 (aref string i) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3355 (+ (* (aref string i) 256) (aref string (1+ i))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3356 (or (memq code cached-codes) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3357 (progn |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3358 (setq newcodes (cons code newcodes)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3359 (setcdr cached-codes (cons code (cdr cached-codes))))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3360 (setq i (+ i bytes))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3361 (and newcodes |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3362 (ps-mule-generate-glyphs font-spec newcodes)))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3363 |
23551 | 3364 ;; List of charsets of multi-byte characters in a text being printed. |
3365 ;; If the text doesn't contain any multi-byte characters (i.e. only | |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3366 ;; ASCII), the value is nil. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3367 (defvar ps-mule-charset-list nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3368 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3369 (defvar ps-mule-prologue-generated nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3370 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3371 ;; This is a PostScript code inserted in the header of generated PostScript. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3372 (defconst ps-mule-prologue |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3373 "%%%% Start of Mule Section |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3374 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3375 %% Working dictionary for general use. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3376 /MuleDict 10 dict def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3377 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3378 %% Define already scaled font for non-ASCII character sets. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3379 /DefFontMule { % fontname size basefont |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3380 findfont exch scalefont definefont pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3381 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3382 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3383 %% Define already scaled font for ASCII character sets. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3384 /DefAsciiFontMule { % fontname size basefont |- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3385 MuleDict begin |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3386 findfont dup /Encoding get /ISOLatin1Encoding exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3387 exch scalefont reencodeFontISO |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3388 end |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3389 } def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3390 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3391 %% Set the specified non-ASCII font to use. It doesn't install |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3392 %% Ascent, etc. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3393 /FM { % fontname |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3394 findfont setfont |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3395 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3396 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3397 %% Show vacant box for characters which don't have appropriate font. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3398 /SB { % count column |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3399 SpaceWidth mul /w exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3400 1 exch 1 exch { %for |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3401 pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3402 gsave |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3403 0 setlinewidth |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3404 0 Descent rmoveto w 0 rlineto |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3405 0 LineHeight rlineto w neg 0 rlineto closepath stroke |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3406 grestore |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3407 w 0 rmoveto |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3408 } for |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3409 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3410 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3411 %% Flag to tell if we are now handling a composite character. This is |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3412 %% defined here because both composite character handler and bitmap font |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3413 %% handler require it. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3414 /Cmpchar false def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3415 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3416 %%%% End of Mule Section |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3417 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3418 " |
23551 | 3419 "PostScript code for printing multi-byte characters.") |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3420 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3421 (defun ps-mule-skip-same-charset (charset) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3422 "Skip characters of CHARSET following the current point." |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3423 (while (eq (charset-after) charset) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3424 (forward-char 1))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3425 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3426 (defun ps-mule-find-wrappoint (from to char-width) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3427 "Find the longest sequence which is printable in the current line. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3428 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3429 The search starts at FROM and goes until TO. It is assumed that all characters |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3430 between FROM and TO belong to a charset in `ps-mule-current-charset'. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3431 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3432 CHAR-WIDTH is the average width of ASCII characters in the current font. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3433 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3434 Returns the value: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3435 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3436 (ENDPOS . RUN-WIDTH) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3437 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3438 Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3439 the sequence." |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3440 (let (run-width) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3441 (if (eq ps-mule-current-charset 'composition) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3442 ;; We must draw one char by one. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3443 (let ((ch (char-after from))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3444 (setq run-width (* (char-width ch) char-width)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3445 (if (> run-width ps-width-remaining) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3446 (setq run-width ps-width-remaining) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3447 (setq from (ps-mule-next-point from)))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3448 ;; We assume that all characters in this range have the same width. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3449 (let ((width (charset-width ps-mule-current-charset))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3450 (setq run-width (* (- to from) char-width width)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3451 (if (> run-width ps-width-remaining) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3452 (setq from (min |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3453 (+ from (truncate (/ ps-width-remaining char-width))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3454 to) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3455 run-width ps-width-remaining) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3456 (setq from to)))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3457 (cons from run-width))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3458 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3459 (defun ps-mule-plot-string (from to &optional bg-color) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3460 "Generate PostScript code for ploting characters in the region FROM and TO. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3461 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3462 It is assumed that all characters in this region belong to a charset in |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3463 `ps-mule-current-charset'. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3464 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3465 Optional argument BG-COLOR specifies background color. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3466 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3467 Returns the value: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3468 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3469 (ENDPOS . RUN-WIDTH) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3470 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3471 Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3472 the sequence." |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3473 (let* ((wrappoint (ps-mule-find-wrappoint |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3474 from to (ps-avg-char-width 'ps-font-for-text))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3475 (to (car wrappoint)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3476 (font-type (car (nth ps-current-font |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3477 (ps-font-alist 'ps-font-for-text)))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3478 (font-spec (ps-mule-get-font-spec ps-mule-current-charset font-type)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3479 (string (buffer-substring-no-properties from to))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3480 (cond |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3481 ((= from to) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3482 ;; We can't print any more characters in the current line. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3483 nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3484 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3485 (font-spec |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3486 ;; We surely have a font for printing this character set. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3487 (ps-output-string (ps-mule-string-encoding font-spec string)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3488 (ps-output " S\n")) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3489 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3490 ((eq ps-mule-current-charset 'latin-iso8859-1) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3491 ;; Latin-1 can be printed by a normal ASCII font. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3492 (ps-output-string (ps-mule-string-ascii string)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3493 (ps-output " S\n")) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3494 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3495 ((eq ps-mule-current-charset 'composition) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3496 (let* ((ch (char-after from)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3497 (width (char-width ch)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3498 (ch-list (decompose-composite-char ch 'list t))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3499 (if (consp (nth 1 ch-list)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3500 (ps-mule-plot-rule-cmpchar ch-list width font-type) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3501 (ps-mule-plot-cmpchar ch-list width t font-type)))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3502 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3503 (t |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3504 ;; No way to print this charset. Just show a vacant box of an |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3505 ;; appropriate width. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3506 (ps-output (format "%d %d SB\n" |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3507 (length string) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3508 (if (eq ps-mule-current-charset 'composition) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3509 (char-width (char-after from)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3510 (charset-width ps-mule-current-charset)))))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3511 wrappoint)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3512 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3513 ;; Composite font support |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3514 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3515 (defvar ps-mule-cmpchar-prologue-generated nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3516 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3517 (defconst ps-mule-cmpchar-prologue |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3518 "%%%% Composite character handler |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3519 /CmpcharWidth 0 def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3520 /CmpcharRelativeCompose 0 def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3521 /CmpcharRelativeSkip 0.4 def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3522 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3523 %% Get a bounding box (relative to currentpoint) of STR. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3524 /GetPathBox { % str |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3525 gsave |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3526 currentfont /FontType get 3 eq { %ifelse |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3527 stringwidth pop pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3528 } { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3529 currentpoint /y exch def pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3530 false charpath flattenpath pathbbox |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3531 y sub /URY exch def pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3532 y sub /LLY exch def pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3533 } ifelse |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3534 grestore |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3535 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3536 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3537 %% Beginning of composite char. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3538 /BC { % str xoff width |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3539 /Cmpchar true def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3540 /CmpcharWidth exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3541 currentfont /RelativeCompose known { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3542 /CmpcharRelativeCompose currentfont /RelativeCompose get def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3543 } { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3544 /CmpcharRelativeCompose false def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3545 } ifelse |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3546 /bgsave bg def /bgcolorsave bgcolor def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3547 /Effectsave Effect def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3548 gsave % Reflect effect only at first |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3549 /Effect Effect 1 2 add 4 add 16 add and def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3550 /f0 findfont setfont ( ) 0 CmpcharWidth getinterval S |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3551 grestore |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3552 /Effect Effectsave 8 32 add and def % enable only shadow and outline |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3553 false BG |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3554 gsave SpaceWidth mul 0 rmoveto dup GetPathBox S grestore |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3555 /y currentpoint exch pop def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3556 /HIGH URY y add def /LOW LLY y add def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3557 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3558 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3559 %% End of composite char. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3560 /EC { % -- |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3561 /bg bgsave def /bgcolor bgcolorsave def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3562 /Effect Effectsave def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3563 /Cmpchar false def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3564 CmpcharWidth SpaceWidth mul 0 rmoveto |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3565 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3566 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3567 %% Rule base composition |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3568 /RBC { % str xoff gref nref |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3569 /nref exch def /gref exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3570 gsave |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3571 SpaceWidth mul 0 rmoveto |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3572 dup |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3573 GetPathBox |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3574 [ HIGH currentpoint exch pop LOW HIGH LOW add 2 div ] gref get |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3575 [ URY LLY sub LLY neg 0 URY LLY sub 2 div ] nref get |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3576 sub /btm exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3577 /top btm URY LLY sub add def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3578 top HIGH gt { /HIGH top def } if |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3579 btm LOW lt { /LOW btm def } if |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3580 currentpoint pop btm LLY sub moveto |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3581 S |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3582 grestore |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3583 } bind def |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3584 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3585 %% Relative composition |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3586 /RLC { % str |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3587 gsave |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3588 dup GetPathBox |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3589 CmpcharRelativeCompose type /integertype eq { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3590 LLY CmpcharRelativeCompose gt { % compose on top |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3591 currentpoint pop HIGH LLY sub CmpcharRelativeSkip add moveto |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3592 /HIGH HIGH URY LLY sub add CmpcharRelativeSkip add def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3593 } { URY 0 le { % compose under bottom |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3594 currentpoint pop LOW LLY add CmpcharRelativeSkip sub moveto |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3595 /LOW LOW URY LLY sub sub CmpcharRelativeSkip sub def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3596 } if } ifelse } if |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3597 S |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3598 grestore |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3599 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3600 %%%% End of composite character handler |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3601 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3602 " |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3603 "PostScript code for printing composite characters.") |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3604 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3605 (defun ps-mule-plot-rule-cmpchar (ch-rule-list total-width font-type) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3606 (let* ((leftmost 0.0) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3607 (rightmost (float (char-width (car ch-rule-list)))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3608 (the-list (cons '(3 . 3) ch-rule-list)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3609 (cmpchar-elements nil)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3610 (while the-list |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3611 (let* ((this (car the-list)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3612 (gref (car this)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3613 (nref (cdr this)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3614 ;; X-axis info (0:left, 1:center, 2:right) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3615 (gref-x (% gref 3)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3616 (nref-x (% nref 3)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3617 ;; Y-axis info (0:top, 1:base, 2:bottom, 3:center) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3618 (gref-y (if (= gref 4) 3 (/ gref 3))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3619 (nref-y (if (= nref 4) 3 (/ nref 3))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3620 (width (float (char-width (car (cdr the-list))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3621 left) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3622 (setq left (+ leftmost |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3623 (/ (* (- rightmost leftmost) gref-x) 2.0) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3624 (- (/ (* nref-x width) 2.0))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3625 cmpchar-elements (cons (list (car (cdr the-list)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3626 left gref-y nref-y) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3627 cmpchar-elements) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3628 leftmost (min left leftmost) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3629 rightmost (max (+ left width) rightmost) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3630 the-list (nthcdr 2 the-list)))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3631 (if (< leftmost 0) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3632 (let ((the-list cmpchar-elements)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3633 (while the-list |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3634 (setcar (cdr (car the-list)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3635 (- (nth 1 (car the-list)) leftmost)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3636 (setq the-list (cdr the-list))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3637 (ps-mule-plot-cmpchar (nreverse cmpchar-elements) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3638 total-width nil font-type))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3639 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3640 (defun ps-mule-plot-cmpchar (elements total-width relativep font-type) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3641 (let* ((elt (car elements)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3642 (ch (if relativep elt (car elt)))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3643 (ps-output-string (ps-mule-prepare-cmpchar-font ch font-type)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3644 (ps-output (format " %d %d BC " |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3645 (if relativep 0 (nth 1 elt)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3646 total-width)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3647 (while (setq elements (cdr elements)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3648 (setq elt (car elements) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3649 ch (if relativep elt (car elt))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3650 (ps-output-string (ps-mule-prepare-cmpchar-font ch font-type)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3651 (ps-output (if relativep |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3652 " RLC " |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3653 (format " %d %d %d RBC " |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3654 (nth 1 elt) (nth 2 elt) (nth 3 elt)))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3655 (ps-output "EC\n")) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3656 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3657 (defun ps-mule-prepare-cmpchar-font (char font-type) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3658 (let* ((ps-mule-current-charset (char-charset char)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3659 (font-spec (ps-mule-get-font-spec ps-mule-current-charset font-type))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3660 (cond (font-spec |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3661 (ps-mule-string-encoding font-spec (char-to-string char))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3662 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3663 ((eq ps-mule-current-charset 'latin-iso8859-1) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3664 (ps-mule-string-ascii (char-to-string char))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3665 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3666 (t |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3667 ;; No font for CHAR. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3668 (ps-set-font ps-current-font) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3669 " ")))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3670 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3671 (defun ps-mule-string-ascii (str) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3672 (ps-set-font ps-current-font) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3673 (string-as-unibyte (encode-coding-string str 'iso-latin-1))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3674 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3675 (defun ps-mule-string-encoding (font-spec str) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3676 (let ((encoding (ps-mule-font-spec-encoding font-spec))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3677 (cond ((coding-system-p encoding) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3678 (setq str (encode-coding-string str encoding))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3679 ((functionp encoding) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3680 (setq str (funcall encoding str))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3681 (encoding |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3682 (error "Invalid coding system or function: %s" encoding))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3683 (setq str (string-as-unibyte str)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3684 (if (ps-mule-font-spec-src font-spec) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3685 (ps-mule-prepare-font font-spec str ps-mule-current-charset) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3686 (ps-set-font ps-current-font)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3687 str)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3688 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3689 ;; Bitmap font support |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3690 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3691 (defvar ps-mule-bitmap-prologue-generated nil) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3692 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3693 (defconst ps-mule-bitmap-prologue |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3694 "%%%% Bitmap font handler |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3695 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3696 /str7 7 string def % working area |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3697 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3698 %% We grow the dictionary one bunch (1024 entries) by one. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3699 /BitmapDictArray 256 array def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3700 /BitmapDictLength 1024 def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3701 /BitmapDictIndex -1 def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3702 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3703 /NewBitmapDict { % -- |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3704 /BitmapDictIndex BitmapDictIndex 1 add def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3705 BitmapDictArray BitmapDictIndex BitmapDictLength dict put |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3706 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3707 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3708 %% Make at least one dictionary. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3709 NewBitmapDict |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3710 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3711 /AddBitmap { % gloval-charname bitmap-data |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3712 BitmapDictArray BitmapDictIndex get |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3713 dup length BitmapDictLength ge { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3714 pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3715 NewBitmapDict |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3716 BitmapDictArray BitmapDictIndex get |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3717 } if |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3718 3 1 roll put |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3719 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3720 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3721 /GetBitmap { % gloval-charname |- bitmap-data |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3722 0 1 BitmapDictIndex { BitmapDictArray exch get begin } for |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3723 load |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3724 0 1 BitmapDictIndex { pop end } for |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3725 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3726 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3727 %% Return a global character name which can be used as a key in the |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3728 %% bitmap dictionary. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3729 /GlobalCharName { % fontidx code1 code2 |- gloval-charname |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3730 exch 256 mul add exch 65536 mul add 16777216 add 16 str7 cvrs 0 66 put |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3731 str7 cvn |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3732 } bind def |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3733 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3734 %% Character code holder for a 2-byte character. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3735 /FirstCode -1 def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3736 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3737 %% Glyph rendering procedure |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3738 /BuildGlyphCommon { % fontdict charname |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3739 1 index /FontDimension get 1 eq { /FirstCode 0 store } if |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3740 NameIndexDict exch get % STACK: fontdict charcode |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3741 FirstCode 0 lt { %ifelse |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3742 %% This is the first byte of a 2-byte character. Just |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3743 %% remember it for the moment. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3744 /FirstCode exch store |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3745 pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3746 0 0 setcharwidth |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3747 } { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3748 1 index /FontSize get /size exch def |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3749 1 index /FontSpaceWidthRatio get /ratio exch def |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3750 1 index /FontIndex get exch FirstCode exch |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3751 GlobalCharName GetBitmap /bmp exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3752 %% bmp == [ DWIDTH BBX-WIDTH BBX-HEIGHT BBX-XOFF BBX-YOFF BITMAP ] |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3753 Cmpchar { %ifelse |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3754 /FontMatrix get [ exch { size div } forall ] /mtrx exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3755 bmp 3 get bmp 4 get mtrx transform |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3756 /LLY exch def pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3757 bmp 1 get bmp 3 get add bmp 2 get bmp 4 get add mtrx transform |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3758 /URY exch def pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3759 } { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3760 pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3761 } ifelse |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3762 /FirstCode -1 store |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3763 |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3764 bmp 0 get SpaceWidthRatio ratio div mul size div 0 % wx wy |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3765 setcharwidth % We can't use setcachedevice here. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3766 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3767 bmp 1 get 0 gt bmp 2 get 0 gt and { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3768 bmp 1 get bmp 2 get % width height |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3769 true % polarity |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3770 [ size 0 0 size neg bmp 3 get neg bmp 2 get bmp 4 get add ] % matrix |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3771 bmp 5 1 getinterval cvx % datasrc |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3772 imagemask |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3773 } if |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3774 } ifelse |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3775 } bind def |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3776 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3777 /BuildCharCommon { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3778 1 index /Encoding get exch get |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3779 1 index /BuildGlyph get exec |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3780 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3781 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3782 %% Bitmap font creater |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3783 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3784 %% Common Encoding shared by all bitmap fonts. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3785 /EncodingCommon 256 array def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3786 %% Mapping table from character name to character code. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3787 /NameIndexDict 256 dict def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3788 0 1 255 { %for |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3789 /idx exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3790 /idxname idx 256 add 16 (XXX) cvrs dup 0 67 put cvn def % `C' == 67 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3791 EncodingCommon idx idxname put |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3792 NameIndexDict idxname idx put |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3793 } for |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3794 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3795 /GlobalFontIndex 0 def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3796 |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3797 %% fontname dim col fontsize relative-compose baseline-offset fbbx |- -- |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3798 /BitmapFont { |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3799 15 dict begin |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3800 /FontBBox exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3801 /BaselineOffset exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3802 /RelativeCompose exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3803 /FontSize exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3804 /FontBBox [ FontBBox { FontSize div } forall ] def |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3805 FontBBox 2 get FontBBox 0 get sub exch div |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3806 /FontSpaceWidthRatio exch def |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3807 /FontDimension exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3808 /FontIndex GlobalFontIndex def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3809 /FontType 3 def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3810 /FontMatrix matrix def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3811 /Encoding EncodingCommon def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3812 /BuildGlyph { BuildGlyphCommon } def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3813 /BuildChar { BuildCharCommon } def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3814 currentdict end |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3815 definefont pop |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3816 /GlobalFontIndex GlobalFontIndex 1 add def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3817 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3818 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3819 %% Define a new bitmap font. |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3820 %% fontname dim col fontsize relative-compose baseline-offset fbbx |- -- |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3821 /NF { |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3822 /fbbx exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3823 %% Convert BDF's FontBoundingBox to PostScript's FontBBox |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3824 [ fbbx 2 get fbbx 3 get |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3825 fbbx 2 get fbbx 0 get add fbbx 3 get fbbx 1 get add ] |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3826 BitmapFont |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3827 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3828 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3829 %% Define a glyph for the specified font and character. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3830 /NG { % fontname charcode bitmap-data |- -- |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3831 /bmp exch def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3832 exch findfont dup /BaselineOffset get bmp 4 get add bmp exch 4 exch put |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3833 /FontIndex get exch |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3834 dup 256 idiv exch 256 mod GlobalCharName |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3835 bmp AddBitmap |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3836 } bind def |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3837 %%%% End of bitmap font handler |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3838 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3839 ") |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3840 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3841 ;; External library support. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3842 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3843 ;; The following three functions are to be called from external |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3844 ;; libraries which support bitmap fonts (e.g. `bdf') to get |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3845 ;; appropriate PostScript code. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3846 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3847 (defun ps-mule-generate-bitmap-prologue () |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3848 (unless ps-mule-bitmap-prologue-generated |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3849 (setq ps-mule-bitmap-prologue-generated t) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3850 (list ps-mule-bitmap-prologue))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3851 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3852 (defun ps-mule-generate-bitmap-font (&rest args) |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
3853 (list (apply 'format "/%s %d %d %f %S %d %S NF\n" args))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3854 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3855 (defun ps-mule-generate-bitmap-glyph (font-name code dwidth bbx bitmap) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3856 (format "/%s %d [ %d %d %d %d %d <%s> ] NG\n" |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3857 font-name code |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3858 dwidth (aref bbx 0) (aref bbx 1) (aref bbx 2) (aref bbx 3) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3859 bitmap)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3860 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3861 ;; Mule specific initializers. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3862 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3863 (defun ps-mule-initialize () |
23551 | 3864 "Produce Poscript code in the prologue part for multi-byte characters." |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3865 (setq ps-mule-font-info-database |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3866 (cond ((eq ps-multibyte-buffer 'non-latin-printer) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3867 ps-mule-font-info-database-ps) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3868 ((eq ps-multibyte-buffer 'bdf-font) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3869 ps-mule-font-info-database-bdf) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3870 ((eq ps-multibyte-buffer 'bdf-font-except-latin) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3871 ps-mule-font-info-database-ps-bdf) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3872 (t |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3873 ps-mule-font-info-database-latin)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3874 ps-mule-current-charset 'ascii |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3875 ps-mule-font-cache nil |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3876 ps-mule-prologue-generated nil |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3877 ps-mule-cmpchar-prologue-generated nil |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3878 ps-mule-bitmap-prologue-generated nil) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3879 (mapcar `(lambda (x) (setcar (cdr x) nil)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3880 ps-mule-external-libraries)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3881 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3882 (defun ps-mule-begin (from to) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3883 (and (boundp 'enable-multibyte-characters) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3884 enable-multibyte-characters |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3885 ;; Initialize `ps-mule-charset-list'. If some characters aren't |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3886 ;; printable, warn it. |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3887 (let ((charsets (delete 'ascii (find-charset-region from to)))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3888 (setq ps-mule-charset-list charsets) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3889 (save-excursion |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3890 (goto-char from) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3891 (and (search-forward "\200" to t) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3892 (setq ps-mule-charset-list |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3893 (cons 'composition ps-mule-charset-list)))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3894 (while charsets |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3895 (cond |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3896 ((or (eq (car charsets) 'composition) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3897 (ps-mule-printable-p (car charsets))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3898 (setq charsets (cdr charsets))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3899 ((y-or-n-p "Font for some characters not found, continue anyway? ") |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3900 (setq charsets nil)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3901 (t |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3902 (error "Printing cancelled")))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3903 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3904 (if ps-mule-charset-list |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3905 (let ((the-list ps-mule-charset-list) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3906 font-spec) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3907 (unless ps-mule-prologue-generated |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3908 (ps-output-prologue ps-mule-prologue) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3909 (setq ps-mule-prologue-generated t)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3910 ;; If external functions are necessary, generate prologues for them. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3911 (while the-list |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3912 (cond ((and (eq (car the-list) 'composition) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3913 (not ps-mule-cmpchar-prologue-generated)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3914 (ps-output-prologue ps-mule-cmpchar-prologue) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3915 (setq ps-mule-cmpchar-prologue-generated t)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3916 ((setq font-spec (ps-mule-get-font-spec (car the-list) 'normal)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3917 (ps-mule-init-external-library font-spec))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3918 (setq the-list (cdr the-list))))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3919 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3920 ;; If ASCII font is also specified in ps-mule-font-info-database, |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3921 ;; use it istead of what specified in ps-font-info-database. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3922 (let ((font-spec (ps-mule-get-font-spec 'ascii 'normal))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3923 (if font-spec |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3924 (progn |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3925 (unless ps-mule-prologue-generated |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3926 (ps-output-prologue ps-mule-prologue) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3927 (setq ps-mule-prologue-generated t)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3928 (ps-mule-init-external-library font-spec) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3929 (let ((font (ps-font-alist 'ps-font-for-text)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3930 (i 0)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3931 (while font |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3932 (let ((ps-current-font i)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3933 ;; Be sure to download a glyph for SPACE in advance. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3934 (ps-mule-prepare-font |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3935 (ps-mule-get-font-spec 'ascii (car font)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3936 " " 'ascii 'no-setfont)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3937 (setq font (cdr font) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3938 i (1+ i)))))))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3939 |
23551 | 3940 ;; For handling multi-byte characters -- End. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
3941 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3942 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
3943 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3944 (defun ps-line-lengths-internal () |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
3945 "Display the correspondence between a line length and a font size, |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3946 using the current ps-print setup. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3947 Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3948 (let ((buf (get-buffer-create "*Line-lengths*")) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3949 (ifs ps-font-size) ; initial font size |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
3950 (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3951 (print-width (progn (ps-get-page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3952 ps-print-width)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3953 (ps-setup (ps-setup)) ; setup for the current buffer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3954 (fs-min 5) ; minimum font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3955 cw-min ; minimum character width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3956 nb-cpl-max ; maximum nb of characters per line |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3957 (fs-max 14) ; maximum font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3958 cw-max ; maximum character width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3959 nb-cpl-min ; minimum nb of characters per line |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3960 fs ; current font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3961 cw ; current character width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3962 nb-cpl ; current nb of characters per line |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3963 ) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3964 (setq cw-min (/ (* icw fs-min) ifs) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3965 nb-cpl-max (floor (/ print-width cw-min)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3966 cw-max (/ (* icw fs-max) ifs) |
20331 | 3967 nb-cpl-min (floor (/ print-width cw-max)) |
3968 nb-cpl nb-cpl-min) | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3969 (set-buffer buf) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3970 (goto-char (point-max)) |
20331 | 3971 (or (bolp) (insert "\n")) |
3972 (insert ps-setup | |
3973 "nb char per line / font size\n") | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3974 (while (<= nb-cpl nb-cpl-max) |
20331 | 3975 (setq cw (/ print-width (float nb-cpl)) |
3976 fs (/ (* ifs cw) icw)) | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3977 (insert (format "%3s %s\n" nb-cpl fs)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3978 (setq nb-cpl (1+ nb-cpl))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3979 (insert "\n") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3980 (display-buffer buf 'not-this-window))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3981 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3982 (defun ps-nb-pages (nb-lines) |
21955
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
3983 "Display correspondence between font size and the number of pages. |
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
3984 The correspondence is based on having NB-LINES lines of text, |
c4de7c7bc14a
(ps-header-title-font-size): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21954
diff
changeset
|
3985 and on the current ps-print setup." |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3986 (let ((buf (get-buffer-create "*Nb-Pages*")) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3987 (ifs ps-font-size) ; initial font size |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
3988 (ilh (ps-line-height 'ps-font-for-text)) ; initial line height |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3989 (page-height (progn (ps-get-page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3990 ps-print-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3991 (ps-setup (ps-setup)) ; setup for the current buffer |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3992 (fs-min 4) ; minimum font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3993 lh-min ; minimum line height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3994 nb-lpp-max ; maximum nb of lines per page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3995 nb-page-min ; minimum nb of pages |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3996 (fs-max 14) ; maximum font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3997 lh-max ; maximum line height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3998 nb-lpp-min ; minimum nb of lines per page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
3999 nb-page-max ; maximum nb of pages |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4000 fs ; current font size |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4001 lh ; current line height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4002 nb-lpp ; current nb of lines per page |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4003 nb-page ; current nb of pages |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4004 ) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4005 (setq lh-min (/ (* ilh fs-min) ifs) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4006 nb-lpp-max (floor (/ page-height lh-min)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4007 nb-page-min (ceiling (/ (float nb-lines) nb-lpp-max)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4008 lh-max (/ (* ilh fs-max) ifs) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4009 nb-lpp-min (floor (/ page-height lh-max)) |
20331 | 4010 nb-page-max (ceiling (/ (float nb-lines) nb-lpp-min)) |
4011 nb-page nb-page-min) | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4012 (set-buffer buf) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4013 (goto-char (point-max)) |
20331 | 4014 (or (bolp) (insert "\n")) |
4015 (insert ps-setup | |
4016 (format "%d lines\n" nb-lines) | |
4017 "nb page / font size\n") | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4018 (while (<= nb-page nb-page-max) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4019 (setq nb-lpp (ceiling (/ nb-lines (float nb-page))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4020 lh (/ page-height nb-lpp) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4021 fs (/ (* ifs lh) ilh)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4022 (insert (format "%s %s\n" nb-page fs)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4023 (setq nb-page (1+ nb-page))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4024 (insert "\n") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4025 (display-buffer buf 'not-this-window))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4026 |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4027 ;; macros used in `ps-select-font' |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4028 (defmacro ps-lookup (key) `(cdr (assq ,key font-entry))) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4029 (defmacro ps-size-scale (key) `(/ (* (ps-lookup ,key) font-size) size)) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4030 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4031 (defun ps-select-font (font-family sym font-size title-font-size) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4032 (let ((font-entry (cdr (assq font-family ps-font-info-database)))) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4033 (or font-entry |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4034 (error "Don't have data to scale font %s. Known fonts families are %s" |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4035 font-family |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4036 (mapcar 'car ps-font-info-database))) |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4037 (let ((size (ps-lookup 'size))) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4038 (put sym 'fonts (ps-lookup 'fonts)) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4039 (put sym 'space-width (ps-size-scale 'space-width)) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4040 (put sym 'avg-char-width (ps-size-scale 'avg-char-width)) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4041 (put sym 'line-height (ps-size-scale 'line-height)) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4042 (put sym 'title-line-height |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4043 (/ (* (ps-lookup 'line-height) title-font-size) size))))) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4044 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4045 (defun ps-get-page-dimensions () |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4046 (let ((page-dimensions (cdr (assq ps-paper-type ps-page-dimensions-database))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4047 page-width page-height) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4048 (cond |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4049 ((null page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4050 (error "`ps-paper-type' must be one of:\n%s" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4051 (mapcar 'car ps-page-dimensions-database))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4052 ((< ps-number-of-columns 1) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4053 (error "The number of columns %d should be positive" |
20331 | 4054 ps-number-of-columns))) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4055 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4056 (ps-select-font ps-font-family 'ps-font-for-text |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4057 ps-font-size ps-font-size) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4058 (ps-select-font ps-header-font-family 'ps-font-for-header |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4059 ps-header-font-size ps-header-title-font-size) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4060 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4061 (setq page-width (ps-page-dimensions-get-width page-dimensions) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4062 page-height (ps-page-dimensions-get-height page-dimensions)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4063 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4064 ;; Landscape mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4065 (if ps-landscape-mode |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4066 ;; exchange width and height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4067 (setq page-width (prog1 page-height (setq page-height page-width)))) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4068 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4069 ;; It is used to get the lower right corner (only in landscape mode) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4070 (setq ps-landscape-page-height page-height) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4071 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4072 ;; | lm | text | ic | text | ic | text | rm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4073 ;; page-width == lm + n * pw + (n - 1) * ic + rm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4074 ;; => pw == (page-width - lm -rm - (n - 1) * ic) / n |
20331 | 4075 (setq ps-print-width (/ (- page-width |
4076 ps-left-margin ps-right-margin | |
4077 (* (1- ps-number-of-columns) ps-inter-column)) | |
4078 ps-number-of-columns)) | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4079 (if (<= ps-print-width 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4080 (error "Bad horizontal layout: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4081 page-width == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4082 ps-left-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4083 ps-right-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4084 ps-inter-column == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4085 ps-number-of-columns == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4086 | lm | text | ic | text | ic | text | rm | |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4087 page-width == lm + n * print-width + (n - 1) * ic + rm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4088 => print-width == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4089 page-width |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4090 ps-left-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4091 ps-right-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4092 ps-inter-column |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4093 ps-number-of-columns |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4094 ps-print-width)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4095 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4096 (setq ps-print-height |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4097 (- page-height ps-bottom-margin ps-top-margin)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4098 (if (<= ps-print-height 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4099 (error "Bad vertical layout: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4100 ps-top-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4101 ps-bottom-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4102 page-height == bm + print-height + tm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4103 => print-height == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4104 ps-top-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4105 ps-bottom-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4106 ps-print-height)) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4107 ;; If headers are turned on, deduct the height of the header from |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4108 ;; the print height. |
20331 | 4109 (if ps-print-header |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4110 (setq ps-header-pad (* ps-header-line-pad |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4111 (ps-title-line-height 'ps-font-for-header)) |
20331 | 4112 ps-print-height (- ps-print-height |
4113 ps-header-offset | |
4114 ps-header-pad | |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4115 (ps-title-line-height 'ps-font-for-header) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4116 (* (ps-line-height 'ps-font-for-header) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4117 (1- ps-header-lines)) |
20331 | 4118 ps-header-pad))) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4119 (if (<= ps-print-height 0) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4120 (error "Bad vertical layout: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4121 ps-top-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4122 ps-bottom-margin == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4123 ps-header-offset == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4124 ps-header-pad == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4125 header-height == %s |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4126 page-height == bm + print-height + tm - ho - hh |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4127 => print-height == %d !" |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4128 ps-top-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4129 ps-bottom-margin |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4130 ps-header-offset |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4131 ps-header-pad |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4132 (+ ps-header-pad |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4133 (ps-title-line-height 'ps-font-for-header) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4134 (* (ps-line-height 'ps-font-for-header) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4135 (1- ps-header-lines)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4136 ps-header-pad) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4137 ps-print-height)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4138 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4139 (defun ps-print-preprint (&optional filename) |
20331 | 4140 (and filename |
4141 (or (numberp filename) | |
4142 (listp filename)) | |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4143 (let* ((name (concat (file-name-nondirectory (or (buffer-file-name) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4144 (buffer-name))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4145 ".ps")) |
20331 | 4146 (prompt (format "Save PostScript to file: (default %s) " name)) |
4147 (res (read-file-name prompt default-directory name nil))) | |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4148 (while (cond ((not (file-writable-p res)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4149 (ding) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4150 (setq prompt "is unwritable")) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4151 ((file-exists-p res) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4152 (setq prompt "exists") |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4153 (not (y-or-n-p (format "File `%s' exists; overwrite? " |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4154 res)))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4155 (t nil)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4156 (setq res (read-file-name |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4157 (format "File %s; save PostScript to file: " prompt) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4158 (file-name-directory res) nil nil |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4159 (file-name-nondirectory res)))) |
20331 | 4160 (if (file-directory-p res) |
4161 (expand-file-name name (file-name-as-directory res)) | |
4162 res)))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4163 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4164 ;; The following functions implement a simple list-buffering scheme so |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4165 ;; that ps-print doesn't have to repeatedly switch between buffers |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4166 ;; while spooling. The functions `ps-output' and `ps-output-string' build |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4167 ;; up the lists; the function `ps-flush-output' takes the lists and |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4168 ;; insert its contents into the spool buffer (*PostScript*). |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4169 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4170 (defvar ps-string-escape-codes |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4171 (let ((table (make-vector 256 nil)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4172 (char ?\000)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4173 ;; control characters |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4174 (while (<= char ?\037) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4175 (aset table char (format "\\%03o" char)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4176 (setq char (1+ char))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4177 ;; printable characters |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4178 (while (< char ?\177) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4179 (aset table char (format "%c" char)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4180 (setq char (1+ char))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4181 ;; DEL and 8-bit characters |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4182 (while (<= char ?\377) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4183 (aset table char (format "\\%o" char)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4184 (setq char (1+ char))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4185 ;; Override ASCII formatting characters with named escape code: |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4186 (aset table ?\n "\\n") ; [NL] linefeed |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4187 (aset table ?\r "\\r") ; [CR] carriage return |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4188 (aset table ?\t "\\t") ; [HT] horizontal tab |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4189 (aset table ?\b "\\b") ; [BS] backspace |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4190 (aset table ?\f "\\f") ; [NP] form feed |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4191 ;; Escape PostScript escape and string delimiter characters: |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4192 (aset table ?\\ "\\\\") |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4193 (aset table ?\( "\\(") |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4194 (aset table ?\) "\\)") |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4195 table) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4196 "Vector used to map characters to PostScript string escape codes.") |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4197 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4198 (defun ps-output-string-prim (string) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4199 (insert "(") ;insert start-string delimiter |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4200 (save-excursion ;insert string |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4201 (insert (string-as-unibyte string))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4202 ;; Find and quote special characters as necessary for PS |
23307 | 4203 ;; This skips everything except control chars, non-ASCII chars, (, ) and \. |
21642
d33cd398d663
(ps-output-string-prim): Use skip-chars-forward.
Richard M. Stallman <rms@gnu.org>
parents:
21571
diff
changeset
|
4204 (while (progn (skip-chars-forward " -'*-[]-~") (not (eobp))) |
d33cd398d663
(ps-output-string-prim): Use skip-chars-forward.
Richard M. Stallman <rms@gnu.org>
parents:
21571
diff
changeset
|
4205 (let ((special (following-char))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4206 (delete-char 1) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4207 (insert (aref ps-string-escape-codes special)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4208 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4209 (insert ")")) ;insert end-string delimiter |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4210 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4211 (defun ps-init-output-queue () |
20331 | 4212 (setq ps-output-head '("") |
4213 ps-output-tail ps-output-head)) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4214 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4215 (defun ps-output (&rest args) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4216 (setcdr ps-output-tail args) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4217 (while (cdr ps-output-tail) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4218 (setq ps-output-tail (cdr ps-output-tail)))) |
7257 | 4219 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4220 (defun ps-output-string (string) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4221 (ps-output t string)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4222 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4223 (defun ps-output-list (the-list) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4224 (mapcar 'ps-output the-list)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4225 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4226 ;; Output strings in the list ARGS in the PostScript prologue part. |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4227 (defun ps-output-prologue (args) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4228 (ps-output 'prologue (if (stringp args) (list args) args))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4229 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4230 (defun ps-flush-output () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4231 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4232 (set-buffer ps-spool-buffer) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4233 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4234 (while ps-output-head |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4235 (let ((it (car ps-output-head))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4236 (cond |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4237 ((eq t it) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4238 (setq ps-output-head (cdr ps-output-head)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4239 (ps-output-string-prim (car ps-output-head))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4240 ((eq 'prologue it) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4241 (setq ps-output-head (cdr ps-output-head)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4242 (save-excursion |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4243 (search-backward "\nBeginDoc") |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4244 (forward-char 1) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4245 (apply 'insert (car ps-output-head)))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4246 (t |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4247 (insert it)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4248 (setq ps-output-head (cdr ps-output-head)))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4249 (ps-init-output-queue)) |
7257 | 4250 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4251 (defun ps-insert-file (fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4252 (ps-flush-output) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4253 ;; Check to see that the file exists and is readable; if not, throw |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4254 ;; an error. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4255 (or (file-readable-p fname) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4256 (error "Could not read file `%s'" fname)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4257 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4258 (set-buffer ps-spool-buffer) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4259 (goto-char (point-max)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4260 (insert-file fname))) |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
4261 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4262 ;; These functions insert the arrays that define the contents of the |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4263 ;; headers. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4264 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4265 (defun ps-generate-header-line (fonttag &optional content) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4266 (ps-output " [ " fonttag " ") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4267 (cond |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4268 ;; Literal strings should be output as is -- the string must |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4269 ;; contain its own PS string delimiters, '(' and ')', if necessary. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4270 ((stringp content) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4271 (ps-output content)) |
7257 | 4272 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4273 ;; Functions are called -- they should return strings; they will be |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4274 ;; inserted as strings and the PS string delimiters added. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4275 ((and (symbolp content) (fboundp content)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4276 (ps-output-string (funcall content))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4277 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4278 ;; Variables will have their contents inserted. They should |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4279 ;; contain strings, and will be inserted as strings. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4280 ((and (symbolp content) (boundp content)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4281 (ps-output-string (symbol-value content))) |
7257 | 4282 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4283 ;; Anything else will get turned into an empty string. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4284 (t |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4285 (ps-output-string ""))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4286 (ps-output " ]\n")) |
7257 | 4287 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4288 (defun ps-generate-header (name contents) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4289 (ps-output "/" name " [\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4290 (if (> ps-header-lines 0) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4291 (let ((count 1)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4292 (ps-generate-header-line "/h0" (car contents)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4293 (while (and (< count ps-header-lines) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4294 (setq contents (cdr contents))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4295 (ps-generate-header-line "/h1" (car contents)) |
20331 | 4296 (setq count (1+ count))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4297 (ps-output "] def\n")))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4298 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4299 (defun ps-output-boolean (name bool) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4300 (ps-output (format "/%s %s def\n" name (if bool "true" "false")))) |
7257 | 4301 |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
4302 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4303 (defun ps-background-pages (page-list func) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4304 (if page-list |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4305 (mapcar |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4306 '(lambda (pages) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4307 (let ((start (if (consp pages) (car pages) pages)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4308 (end (if (consp pages) (cdr pages) pages))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4309 (and (integerp start) (integerp end) (<= start end) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4310 (add-to-list 'ps-background-pages (vector start end func))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4311 page-list) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4312 (setq ps-background-all-pages (cons func ps-background-all-pages)))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4313 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4314 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4315 (defun ps-get-boundingbox () |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4316 (save-excursion |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4317 (set-buffer ps-spool-buffer) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4318 (save-excursion |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4319 (if (re-search-forward |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4320 "^%%BoundingBox:\\s-+\\([0-9.]+\\)\\s-+\\([0-9.]+\\)\\s-+\\([0-9.]+\\)\\s-+\\([0-9.]+\\)" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4321 nil t) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4322 (vector (string-to-number ; lower x |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4323 (buffer-substring (match-beginning 1) (match-end 1))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4324 (string-to-number ; lower y |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4325 (buffer-substring (match-beginning 2) (match-end 2))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4326 (string-to-number ; upper x |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4327 (buffer-substring (match-beginning 3) (match-end 3))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4328 (string-to-number ; upper y |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4329 (buffer-substring (match-beginning 4) (match-end 4)))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4330 (vector 0 0 0 0))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4331 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4332 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4333 ;; Emacs understands the %f format; we'll use it to limit color RGB values |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4334 ;; to three decimals to cut down some on the size of the PostScript output. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4335 ;; Lucid emacsen will have to make do with %s (princ) for floats. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4336 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4337 (defvar ps-float-format (if (eq ps-print-emacs-type 'emacs) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4338 "%0.3f " ; emacs |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4339 "%s ")) ; Lucid emacsen |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4340 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4341 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4342 (defun ps-float-format (value &optional default) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4343 (let ((literal (or value default))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4344 (if literal |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4345 (format (if (numberp literal) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4346 ps-float-format |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4347 "%s ") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4348 literal) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4349 " "))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4350 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4351 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4352 (defun ps-background-text () |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4353 (mapcar |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4354 '(lambda (text) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4355 (setq ps-background-text-count (1+ ps-background-text-count)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4356 (ps-output (format "/ShowBackText-%d {\n" ps-background-text-count)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4357 (ps-output-string (nth 0 text)) ; text |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4358 (ps-output |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4359 "\n" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4360 (ps-float-format (nth 4 text) 200.0) ; font size |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4361 (format "/%s " (or (nth 3 text) "Times-Roman")) ; font name |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4362 (ps-float-format (nth 6 text) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4363 "PrintHeight PrintPageWidth atan") ; rotation |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4364 (ps-float-format (nth 5 text) 0.85) ; gray |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4365 (ps-float-format (nth 1 text) "0") ; x position |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4366 (ps-float-format (nth 2 text) "BottomMargin") ; y position |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4367 "\nShowBackText} def\n") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4368 (ps-background-pages (nthcdr 7 text) ; page list |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4369 (format "ShowBackText-%d\n" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4370 ps-background-text-count))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4371 ps-print-background-text)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4372 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4373 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4374 (defun ps-background-image () |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4375 (mapcar |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4376 '(lambda (image) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4377 (let ((image-file (expand-file-name (nth 0 image)))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4378 (if (file-readable-p image-file) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4379 (progn |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4380 (setq ps-background-image-count (1+ ps-background-image-count)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4381 (ps-output |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4382 (format "/ShowBackImage-%d {\n--back-- " ps-background-image-count) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4383 (ps-float-format (nth 5 image) 0.0) ; rotation |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4384 (ps-float-format (nth 3 image) 1.0) ; x scale |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4385 (ps-float-format (nth 4 image) 1.0) ; y scale |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4386 (ps-float-format (nth 1 image) ; x position |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4387 "PrintPageWidth 2 div") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4388 (ps-float-format (nth 2 image) ; y position |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4389 "PrintHeight 2 div BottomMargin add") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4390 "\nBeginBackImage\n") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4391 (ps-insert-file image-file) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4392 ;; coordinate adjustment to centralize image |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4393 ;; around x and y position |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4394 (let ((box (ps-get-boundingbox))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4395 (save-excursion |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4396 (set-buffer ps-spool-buffer) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4397 (save-excursion |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4398 (if (re-search-backward "^--back--" nil t) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4399 (replace-match |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4400 (format "%s %s" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4401 (ps-float-format |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4402 (- (+ (/ (- (aref box 2) (aref box 0)) 2.0) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4403 (aref box 0)))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4404 (ps-float-format |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4405 (- (+ (/ (- (aref box 3) (aref box 1)) 2.0) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4406 (aref box 1))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4407 t))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4408 (ps-output "\nEndBackImage} def\n") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4409 (ps-background-pages (nthcdr 6 image) ; page list |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4410 (format "ShowBackImage-%d\n" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4411 ps-background-image-count)))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4412 ps-print-background-image)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4413 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4414 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4415 (defun ps-background (page-number) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4416 (let (has-local-background) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4417 (mapcar '(lambda (range) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4418 (and (<= (aref range 0) page-number) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4419 (<= page-number (aref range 1)) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4420 (if has-local-background |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4421 (ps-output (aref range 2)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4422 (setq has-local-background t) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4423 (ps-output "/printLocalBackground {\n" |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4424 (aref range 2))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4425 ps-background-pages) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4426 (and has-local-background (ps-output "} def\n")))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4427 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4428 |
21800
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4429 ;; Return a list of the distinct elements of LIST. |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4430 ;; Elements are compared with `equal'. |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4431 (defun ps-remove-duplicates (list) |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4432 (let (new (tail list)) |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4433 (while tail |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4434 (or (member (car tail) new) |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4435 (setq new (cons (car tail) new))) |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4436 (setq tail (cdr tail))) |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4437 (nreverse new))) |
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4438 |
23307 | 4439 |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4440 ;; Find the first occurrence of ITEM in LIST. |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4441 ;; Return the index of the matching item, or nil if not found. |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4442 ;; Elements are compared with `eq'. |
21999
35efe9eafc6c
(ps-alist-position): Renamed from ps-position.
Richard M. Stallman <rms@gnu.org>
parents:
21955
diff
changeset
|
4443 (defun ps-alist-position (item list) |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4444 (let ((tail list) (index 0) found) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4445 (while tail |
21999
35efe9eafc6c
(ps-alist-position): Renamed from ps-position.
Richard M. Stallman <rms@gnu.org>
parents:
21955
diff
changeset
|
4446 (if (setq found (eq (car (car tail)) item)) |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4447 (setq tail nil) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4448 (setq index (1+ index) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4449 tail (cdr tail)))) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4450 (and found index))) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4451 |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4452 |
7257 | 4453 (defun ps-begin-file () |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4454 (ps-get-page-dimensions) |
22397 | 4455 (setq ps-page-postscript 0 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4456 ps-background-text-count 0 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4457 ps-background-image-count 0 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4458 ps-background-pages nil |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4459 ps-background-all-pages nil) |
7257 | 4460 |
20331 | 4461 (ps-output ps-adobe-tag |
4462 "%%Title: " (buffer-name) ; Take job name from name of | |
4463 ; first buffer printed | |
4464 "\n%%Creator: " (user-full-name) | |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4465 " (using ps-print v" ps-print-version |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4466 ")\n%%CreationDate: " |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4467 (time-stamp-hh:mm:ss) " " (time-stamp-mon-dd-yyyy) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4468 "\n%%Orientation: " |
20331 | 4469 (if ps-landscape-mode "Landscape" "Portrait") |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4470 "\n%%DocumentNeededResources: font Times-Roman Times-Italic\n%%+ font " |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4471 (mapconcat 'identity |
21800
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4472 (ps-remove-duplicates |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4473 (append (ps-fonts 'ps-font-for-text) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4474 (list (ps-font 'ps-font-for-header 'normal) |
21800
d4b4f44ce8da
(ps-remove-duplicates): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
21642
diff
changeset
|
4475 (ps-font 'ps-font-for-header 'bold)))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4476 "\n%%+ font ") |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4477 "\n%%Pages: (atend)\n%%Requirements:" |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4478 (if ps-spool-duplex " duplex\n" "\n")) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4479 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4480 (let ((comments (if (functionp ps-print-prologue-header) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4481 (funcall ps-print-prologue-header) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4482 ps-print-prologue-header))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4483 (and (stringp comments) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4484 (ps-output comments))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4485 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4486 (ps-output "%%EndComments\n\n%%BeginPrologue\n\n") |
7257 | 4487 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4488 (ps-output-boolean "LandscapeMode" ps-landscape-mode) |
20331 | 4489 (ps-output (format "/NumberOfColumns %d def\n" ps-number-of-columns) |
4490 | |
4491 (format "/LandscapePageHeight %s def\n" ps-landscape-page-height) | |
4492 (format "/PrintPageWidth %s def\n" | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4493 (- (* (+ ps-print-width ps-inter-column) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4494 ps-number-of-columns) |
20331 | 4495 ps-inter-column)) |
4496 (format "/PrintWidth %s def\n" ps-print-width) | |
4497 (format "/PrintHeight %s def\n" ps-print-height) | |
4498 | |
4499 (format "/LeftMargin %s def\n" ps-left-margin) | |
4500 (format "/RightMargin %s def\n" ps-right-margin) ; not used | |
4501 (format "/InterColumn %s def\n" ps-inter-column) | |
4502 | |
4503 (format "/BottomMargin %s def\n" ps-bottom-margin) | |
4504 (format "/TopMargin %s def\n" ps-top-margin) ; not used | |
4505 (format "/HeaderOffset %s def\n" ps-header-offset) | |
4506 (format "/HeaderPad %s def\n" ps-header-pad)) | |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
4507 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4508 (ps-output-boolean "PrintHeader" ps-print-header) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4509 (ps-output-boolean "PrintOnlyOneHeader" ps-print-only-one-header) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4510 (ps-output-boolean "PrintHeaderFrame" ps-print-header-frame) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4511 (ps-output-boolean "ShowNofN" ps-show-n-of-n) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4512 (ps-output-boolean "Duplex" ps-spool-duplex) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4513 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4514 (let ((line-height (ps-line-height 'ps-font-for-text))) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4515 (ps-output (format "/LineHeight %s def\n" line-height) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4516 (format "/LinesPerColumn %d def\n" |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4517 (round (/ (+ ps-print-height |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4518 (* line-height 0.45)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4519 line-height))))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4520 |
19485
eab8baa19dfa
(ps-zebra-stripes): Renamed from ps-zebra-stripe.
Richard M. Stallman <rms@gnu.org>
parents:
19446
diff
changeset
|
4521 (ps-output-boolean "Zebra" ps-zebra-stripes) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4522 (ps-output-boolean "PrintLineNumber" ps-line-number) |
22397 | 4523 (ps-output (format "/ZebraHeight %d def\n" ps-zebra-stripe-height)) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4524 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4525 (ps-background-text) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4526 (ps-background-image) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4527 (setq ps-background-all-pages (nreverse ps-background-all-pages) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4528 ps-background-pages (nreverse ps-background-pages)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4529 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4530 (ps-output ps-print-prologue-1) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4531 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4532 (ps-output "/printGlobalBackground {\n") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4533 (ps-output-list ps-background-all-pages) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4534 (ps-output "} def\n/printLocalBackground {\n} def\n") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4535 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4536 ;; Header fonts |
23666
53776c6e94b8
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
Andrew Innes <andrewi@gnu.org>
parents:
23551
diff
changeset
|
4537 (ps-output (format "/h0 %s (%s) cvn DefFont\n" ; /h0 14 /Helvetica-Bold DefFont |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4538 ps-header-title-font-size (ps-font 'ps-font-for-header |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4539 'bold)) |
23666
53776c6e94b8
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
Andrew Innes <andrewi@gnu.org>
parents:
23551
diff
changeset
|
4540 (format "/h1 %s (%s) cvn DefFont\n" ; /h1 12 /Helvetica DefFont |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4541 ps-header-font-size (ps-font 'ps-font-for-header |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4542 'normal))) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4543 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4544 (ps-output ps-print-prologue-2) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4545 |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4546 ;; Text fonts |
21999
35efe9eafc6c
(ps-alist-position): Renamed from ps-position.
Richard M. Stallman <rms@gnu.org>
parents:
21955
diff
changeset
|
4547 (let ((font (ps-font-alist 'ps-font-for-text)) |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4548 (i 0)) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4549 (while font |
23666
53776c6e94b8
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
Andrew Innes <andrewi@gnu.org>
parents:
23551
diff
changeset
|
4550 (ps-output (format "/f%d %s (%s) cvn DefFont\n" |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4551 i |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4552 ps-font-size |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4553 (ps-font 'ps-font-for-text (car (car font))))) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4554 (setq font (cdr font) |
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4555 i (1+ i)))) |
20331 | 4556 |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
4557 (let ((font-entry (cdr (assq ps-font-family ps-font-info-database)))) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
4558 (ps-output (format "/SpaceWidthRatio %f def\n" |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
4559 (/ (ps-lookup 'space-width) (ps-lookup 'size))))) |
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
4560 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4561 (ps-mule-initialize) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4562 |
23691
cfeb9bcbd372
(ps-print-prologue-1): Only use old LandscapeMode handling if
Andrew Innes <andrewi@gnu.org>
parents:
23666
diff
changeset
|
4563 (ps-output "%%EndPrologue\n%%BeginSetup\nBeginDoc\n%%EndSetup\n\n")) |
7257 | 4564 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4565 (defun ps-header-dirpart () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4566 (let ((fname (buffer-file-name))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4567 (if fname |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4568 (if (string-equal (buffer-name) (file-name-nondirectory fname)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4569 (file-name-directory fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4570 fname) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4571 ""))) |
7257 | 4572 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4573 (defun ps-get-buffer-name () |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4574 (cond |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4575 ;; Indulge Jim this little easter egg: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4576 ((string= (buffer-name) "ps-print.el") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4577 "Hey, Cool! It's ps-print.el!!!") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4578 ;; Indulge Jack this other little easter egg: |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4579 ((string= (buffer-name) "sokoban.el") |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4580 "Super! C'est sokoban.el!") |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4581 (t (concat |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4582 (and ps-printing-region "Subset of: ") |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4583 (buffer-name) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4584 (and (buffer-modified-p) " (unsaved)"))))) |
7257 | 4585 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4586 (defun ps-begin-job () |
22397 | 4587 (save-excursion |
4588 (set-buffer ps-spool-buffer) | |
4589 (goto-char (point-max)) | |
4590 (and (re-search-backward "^%%Trailer$" nil t) | |
4591 (delete-region (match-beginning 0) (point-max)))) | |
4592 (setq ps-showline-count (if ps-printing-region (car ps-printing-region) 1) | |
4593 ps-page-count 0 | |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4594 ps-control-or-escape-regexp |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4595 (if ps-mule-charset-list |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4596 (cond ((eq ps-print-control-characters '8-bit) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4597 "[^\040-\176]") |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4598 ((eq ps-print-control-characters 'control-8-bit) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4599 (string-as-multibyte "[^\040-\176\240-\377]")) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4600 ((eq ps-print-control-characters 'control) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4601 (string-as-multibyte "[^\040-\176\200-\377]")) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4602 (t (string-as-multibyte "[^\000-\011\013\015-\377"))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4603 (cond ((eq ps-print-control-characters '8-bit) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4604 (string-as-unibyte "[\000-\037\177-\377]")) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4605 ((eq ps-print-control-characters 'control-8-bit) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4606 (string-as-unibyte "[\000-\037\177-\237]")) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4607 ((eq ps-print-control-characters 'control) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4608 "[\000-\037\177]") |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4609 (t "[\t\n\f]"))))) |
7257 | 4610 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4611 (defmacro ps-page-number () |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4612 `(1+ (/ (1- ps-page-count) ps-number-of-columns))) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4613 |
7257 | 4614 (defun ps-end-file () |
22093
5818374d88e7
(ps-file-end): Put Trailer and Pages before EndDoc.
Richard M. Stallman <rms@gnu.org>
parents:
21999
diff
changeset
|
4615 (ps-output "\n%%Trailer\n%%Pages: " |
22397 | 4616 (format "%d" ps-page-postscript) |
22093
5818374d88e7
(ps-file-end): Put Trailer and Pages before EndDoc.
Richard M. Stallman <rms@gnu.org>
parents:
21999
diff
changeset
|
4617 "\n\nEndDoc\n\n%%EOF\n")) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4618 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4619 |
7257 | 4620 (defun ps-next-page () |
4621 (ps-end-page) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4622 (ps-flush-output) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4623 (ps-begin-page)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4624 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4625 (defun ps-header-page () |
22397 | 4626 ;; set total line and page number when printing has finished |
4627 ;; (see `ps-generate') | |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4628 (if (prog1 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4629 (zerop (mod ps-page-count ps-number-of-columns)) |
21954
73f9f4219198
Some doc fixes, eliminate (require cl).
Richard M. Stallman <rms@gnu.org>
parents:
21801
diff
changeset
|
4630 (setq ps-page-count (1+ ps-page-count))) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4631 ;; Print only when a new real page begins. |
22397 | 4632 (progn |
4633 (setq ps-page-postscript (1+ ps-page-postscript)) | |
4634 (ps-output (format "\n%%%%Page: %d %d\n" | |
4635 ps-page-postscript ps-page-postscript)) | |
4636 (ps-output "/Lines 0 def\n/PageCount 0 def\nBeginDSCPage\n") | |
4637 (ps-background ps-page-postscript) | |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4638 (run-hooks 'ps-print-begin-page-hook)) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4639 ;; Print when any other page begins. |
22397 | 4640 (ps-output "/Lines 0 def\n/PageCount 0 def\nBeginDSCPage\n") |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4641 (run-hooks 'ps-print-begin-column-hook))) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4642 |
20331 | 4643 (defun ps-begin-page () |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4644 (ps-get-page-dimensions) |
20331 | 4645 (setq ps-width-remaining ps-print-width |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4646 ps-height-remaining ps-print-height |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4647 ps-mule-current-charset 'ascii) |
7257 | 4648 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4649 (ps-header-page) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4650 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4651 (ps-output (format "/LineNumber %d def\n" ps-showline-count) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4652 (format "/PageNumber %d def\n" (if ps-print-only-one-header |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4653 (ps-page-number) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4654 ps-page-count))) |
7257 | 4655 |
16870
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
4656 (when ps-print-header |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
4657 (ps-generate-header "HeaderLinesLeft" ps-left-header) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
4658 (ps-generate-header "HeaderLinesRight" ps-right-header) |
4a5fa29f79d6
(ps-print-version): Fix value.
Richard M. Stallman <rms@gnu.org>
parents:
16361
diff
changeset
|
4659 (ps-output (format "%d SetHeaderLines\n" ps-header-lines))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4660 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4661 (ps-output "BeginPage\n") |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4662 (ps-set-font ps-current-font) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4663 (ps-set-bg ps-current-bg) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4664 (ps-set-color ps-current-color)) |
7257 | 4665 |
4666 (defun ps-end-page () | |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4667 (ps-output "EndPage\nEndDSCPage\n")) |
7257 | 4668 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4669 (defun ps-dummy-page () |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4670 (ps-header-page) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4671 (ps-output "/PrintHeader false def |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4672 BeginPage |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4673 EndPage |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4674 EndDSCPage\n")) |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
4675 |
7257 | 4676 (defun ps-next-line () |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4677 (setq ps-showline-count (1+ ps-showline-count)) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4678 (let ((lh (ps-line-height 'ps-font-for-text))) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4679 (if (< ps-height-remaining lh) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4680 (ps-next-page) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4681 (setq ps-width-remaining ps-print-width |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4682 ps-height-remaining (- ps-height-remaining lh)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4683 (ps-output "HL\n")))) |
7257 | 4684 |
4685 (defun ps-continue-line () | |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4686 (let ((lh (ps-line-height 'ps-font-for-text))) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4687 (if (< ps-height-remaining lh) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4688 (ps-next-page) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4689 (setq ps-width-remaining ps-print-width |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4690 ps-height-remaining (- ps-height-remaining lh)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4691 (ps-output "SL\n")))) |
7257 | 4692 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4693 (defun ps-find-wrappoint (from to char-width) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4694 (let ((avail (truncate (/ ps-width-remaining char-width))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4695 (todo (- to from))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4696 (if (< todo avail) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4697 (cons to (* todo char-width)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4698 (cons (+ from avail) ps-width-remaining)))) |
7257 | 4699 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4700 (defun ps-basic-plot-string (from to &optional bg-color) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4701 (let* ((wrappoint (ps-find-wrappoint from to |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4702 (ps-avg-char-width 'ps-font-for-text))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4703 (to (car wrappoint)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4704 (string (buffer-substring-no-properties from to)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4705 (font-spec |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4706 (ps-mule-get-font-spec |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4707 'ascii |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4708 (car (nth ps-current-font (ps-font-alist 'ps-font-for-text)))))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4709 (and font-spec |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4710 (ps-mule-prepare-font font-spec string 'ascii)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4711 (ps-output-string string) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
4712 (ps-output " S\n") |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4713 wrappoint)) |
7257 | 4714 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4715 (defun ps-basic-plot-whitespace (from to &optional bg-color) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4716 (let* ((wrappoint (ps-find-wrappoint from to |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4717 (ps-space-width 'ps-font-for-text))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4718 (to (car wrappoint))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4719 (ps-output (format "%d W\n" (- to from))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4720 wrappoint)) |
7257 | 4721 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4722 (defun ps-plot (plotfunc from to &optional bg-color) |
7257 | 4723 (while (< from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4724 (let* ((wrappoint (funcall plotfunc from to bg-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4725 (plotted-to (car wrappoint)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4726 (plotted-width (cdr wrappoint))) |
20331 | 4727 (setq from plotted-to |
4728 ps-width-remaining (- ps-width-remaining plotted-width)) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4729 (if (< from to) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4730 (ps-continue-line)))) |
7257 | 4731 (if ps-razzle-dazzle |
4732 (let* ((q-todo (- (point-max) (point-min))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4733 (q-done (- (point) (point-min))) |
7257 | 4734 (chunkfrac (/ q-todo 8)) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4735 (chunksize (min chunkfrac 1000))) |
7257 | 4736 (if (> (- q-done ps-razchunk) chunksize) |
20331 | 4737 (progn |
7257 | 4738 (setq ps-razchunk q-done) |
20331 | 4739 (message "Formatting...%3d%%" |
4740 (if (< q-todo 100) | |
4741 (/ (* 100 q-done) q-todo) | |
4742 (/ q-done (/ q-todo 100))) | |
4743 )))))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4744 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4745 (defun ps-set-font (font) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4746 (setq ps-last-font (format "f%d" (setq ps-current-font font))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4747 (ps-output (format "/%s F\n" ps-last-font))) |
7257 | 4748 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4749 (defun ps-set-bg (color) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4750 (if (setq ps-current-bg color) |
20331 | 4751 (ps-output (format ps-color-format |
4752 (nth 0 color) (nth 1 color) (nth 2 color)) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4753 " true BG\n") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4754 (ps-output "false BG\n"))) |
7257 | 4755 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4756 (defun ps-set-color (color) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4757 (setq ps-current-color (or color ps-default-fg)) |
20331 | 4758 (ps-output (format ps-color-format |
4759 (nth 0 ps-current-color) | |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4760 (nth 1 ps-current-color) (nth 2 ps-current-color)) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4761 " FG\n")) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4762 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4763 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4764 (defvar ps-current-effect 0) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4765 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4766 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4767 (defun ps-plot-region (from to font &optional fg-color bg-color effects) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4768 (if (not (equal font ps-current-font)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4769 (ps-set-font font)) |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
4770 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4771 ;; Specify a foreground color only if one's specified and it's |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4772 ;; different than the current. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4773 (if (not (equal fg-color ps-current-color)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4774 (ps-set-color fg-color)) |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
4775 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4776 (if (not (equal bg-color ps-current-bg)) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4777 (ps-set-bg bg-color)) |
19879
87952270ceeb
(ps-emacs-face-kind-p): Function deleted.
Richard M. Stallman <rms@gnu.org>
parents:
19843
diff
changeset
|
4778 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4779 ;; Specify effects (underline, overline, box, etc) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4780 (cond |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4781 ((not (integerp effects)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4782 (ps-output "0 EF\n") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4783 (setq ps-current-effect 0)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4784 ((/= effects ps-current-effect) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4785 (ps-output (number-to-string effects) " EF\n") |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4786 (setq ps-current-effect effects))) |
7257 | 4787 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4788 (setq ps-mule-current-charset 'ascii) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4789 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4790 ;; Starting at the beginning of the specified region... |
7257 | 4791 (save-excursion |
4792 (goto-char from) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4793 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4794 ;; ...break the region up into chunks separated by tabs, linefeeds, |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4795 ;; pagefeeds, control characters, and plot each chunk. |
7257 | 4796 (while (< from to) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4797 (if (re-search-forward ps-control-or-escape-regexp to t) |
23551 | 4798 ;; region with some control characters or some multi-byte characters |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4799 (let* ((match-point (match-beginning 0)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4800 (match (char-after match-point))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4801 (when (< from match-point) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4802 (unless (eq ps-mule-current-charset 'ascii) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4803 (ps-set-font ps-current-font) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4804 (setq ps-mule-current-charset 'ascii)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4805 (ps-plot 'ps-basic-plot-string from match-point bg-color)) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4806 (cond |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4807 ((= match ?\t) ; tab |
23167
ada869918064
(ps-mule-font-info-database-bdf): The include ASCII
Kenichi Handa <handa@m17n.org>
parents:
23138
diff
changeset
|
4808 (let ((linestart (line-beginning-position))) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4809 (forward-char -1) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4810 (setq from (+ linestart (current-column))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4811 (when (re-search-forward "[ \t]+" to t) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4812 (unless (eq ps-mule-current-charset 'ascii) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4813 (ps-set-font ps-current-font) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4814 (setq ps-mule-current-charset 'ascii)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4815 (ps-plot 'ps-basic-plot-whitespace |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4816 from (+ linestart (current-column)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4817 bg-color)))) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4818 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4819 ((= match ?\n) ; newline |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4820 (ps-next-line)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4821 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4822 ((= match ?\f) ; form feed |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4823 ;; do not skip page if previous character is NEWLINE and |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4824 ;; it is a beginning of page. |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4825 (or (and (= (char-after (1- match-point)) ?\n) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4826 (= ps-height-remaining ps-print-height)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4827 (ps-next-page))) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4828 |
23551 | 4829 ((> match 255) ; a multi-byte character |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4830 (let ((charset (char-charset match))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4831 (or (eq charset 'composition) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4832 (ps-mule-skip-same-charset charset)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4833 (setq ps-mule-current-charset charset) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4834 (ps-plot 'ps-mule-plot-string match-point (point) bg-color))) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4835 ; characters from ^@ to ^_ and |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4836 (t ; characters from 127 to 255 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4837 (ps-control-character match))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4838 (setq from (point))) |
23551 | 4839 ;; region without control characters nor multi-byte characters |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4840 (when (not (eq ps-mule-current-charset 'ascii)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4841 (ps-set-font ps-current-font) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4842 (setq ps-mule-current-charset 'ascii)) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4843 (ps-plot 'ps-basic-plot-string from to bg-color) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4844 (setq from to))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4845 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4846 (defvar ps-string-control-codes |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4847 (let ((table (make-vector 256 nil)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4848 (char ?\000)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4849 ;; control character |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4850 (while (<= char ?\037) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4851 (aset table char (format "^%c" (+ char ?@))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4852 (setq char (1+ char))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4853 ;; printable character |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4854 (while (< char ?\177) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4855 (aset table char (format "%c" char)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4856 (setq char (1+ char))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4857 ;; DEL |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4858 (aset table char "^?") |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4859 ;; 8-bit character |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4860 (while (<= (setq char (1+ char)) ?\377) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4861 (aset table char (format "\\%o" char))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4862 table) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4863 "Vector used to map characters to a printable string.") |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4864 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4865 (defun ps-control-character (char) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4866 (let* ((str (aref ps-string-control-codes char)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4867 (from (1- (point))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4868 (len (length str)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4869 (to (+ from len)) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4870 (char-width (ps-avg-char-width 'ps-font-for-text)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4871 (wrappoint (ps-find-wrappoint from to char-width))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4872 (if (< (car wrappoint) to) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4873 (ps-continue-line)) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4874 (setq ps-width-remaining (- ps-width-remaining (* len char-width))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4875 (ps-output-string str) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4876 (ps-output " S\n"))) |
7257 | 4877 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4878 (defun ps-color-value (x-color-value) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4879 ;; Scale 16-bit X-COLOR-VALUE to PostScript color value in [0, 1] interval. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4880 (/ x-color-value ps-print-color-scale)) |
7257 | 4881 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4882 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4883 (cond ((eq ps-print-emacs-type 'emacs) ; emacs |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4884 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4885 (defun ps-color-values (x-color) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4886 (if (fboundp 'x-color-values) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4887 (x-color-values x-color) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4888 (error "No available function to determine X color values."))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4889 ) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4890 ; xemacs |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4891 ; lucid |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4892 (t ; epoch |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4893 (defun ps-color-values (x-color) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4894 (cond ((fboundp 'x-color-values) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4895 (x-color-values x-color)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4896 ((and (fboundp 'color-instance-rgb-components) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4897 (ps-color-device)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4898 (color-instance-rgb-components |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4899 (if (color-instance-p x-color) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4900 x-color |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4901 (make-color-instance |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4902 (if (color-specifier-p x-color) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4903 (color-name x-color) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4904 x-color))))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4905 (t (error "No available function to determine X color values.")))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4906 )) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4907 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4908 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4909 (defun ps-face-attributes (face) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4910 "Return face attribute vector. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4911 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4912 If FACE is not in `ps-print-face-extension-alist' or in |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4913 `ps-print-face-alist', insert it on `ps-print-face-alist' and |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4914 return the attribute vector. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4915 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4916 If FACE is not a valid face name, it is used default face." |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4917 (cdr (or (assq face ps-print-face-extension-alist) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4918 (assq face ps-print-face-alist) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4919 (let* ((the-face (if (facep face) face 'default)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4920 (new-face (ps-screen-to-bit-face the-face))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4921 (or (and (eq the-face 'default) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4922 (assq the-face ps-print-face-alist)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4923 (setq ps-print-face-alist (cons new-face ps-print-face-alist))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
4924 new-face)))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4925 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4926 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4927 (defun ps-face-attribute-list (face-or-list) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4928 (if (listp face-or-list) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4929 ;; list of faces |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4930 (let ((effects 0) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4931 foreground background face-attr) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4932 (while face-or-list |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
4933 (setq face-attr (ps-face-attributes (car face-or-list)) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4934 effects (logior effects (aref face-attr 0))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4935 (or foreground (setq foreground (aref face-attr 1))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4936 (or background (setq background (aref face-attr 2))) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4937 (setq face-or-list (cdr face-or-list))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4938 (vector effects foreground background)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4939 ;; simple face |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4940 (ps-face-attributes face-or-list))) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
4941 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4942 |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4943 (defconst ps-font-type (vector nil 'bold 'italic 'bold-italic)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4944 |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4945 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4946 (defun ps-plot-with-face (from to face) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4947 (cond |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4948 ((null face) ; print text with null face |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4949 (ps-plot-region from to 0)) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4950 ((eq face 'emacs--invisible--face)) ; skip invisible text!!! |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4951 (t ; otherwise, text has a valid face |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4952 (let* ((face-bit (ps-face-attribute-list face)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4953 (effect (aref face-bit 0)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4954 (foreground (aref face-bit 1)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4955 (background (aref face-bit 2)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4956 (fg-color (if (and ps-color-p foreground) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4957 (mapcar 'ps-color-value |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4958 (ps-color-values foreground)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4959 ps-default-color)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4960 (bg-color (and ps-color-p background |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4961 (mapcar 'ps-color-value |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4962 (ps-color-values background))))) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4963 (ps-plot-region |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4964 from to |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4965 (ps-font-number 'ps-font-for-text |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4966 (or (aref ps-font-type (logand effect 3)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4967 face)) |
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
4968 fg-color bg-color (lsh effect -2))))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
4969 (goto-char to)) |
7257 | 4970 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
4971 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4972 (cond ((eq ps-print-emacs-type 'emacs) ; emacs |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4973 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4974 (defun ps-face-bold-p (face) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4975 (or (face-bold-p face) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4976 (memq face ps-bold-faces))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4977 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4978 (defun ps-face-italic-p (face) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4979 (or (face-italic-p face) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4980 (memq face ps-italic-faces))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4981 ) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4982 ; xemacs |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4983 ; lucid |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4984 (t ; epoch |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4985 (defun ps-xemacs-face-kind-p (face kind kind-regex kind-list) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4986 (let* ((frame-font (or (face-font-instance face) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4987 (face-font-instance 'default))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4988 (kind-cons (and frame-font |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4989 (assq kind |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4990 (font-instance-properties frame-font)))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4991 (kind-spec (cdr-safe kind-cons)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4992 (case-fold-search t)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4993 (or (and kind-spec (string-match kind-regex kind-spec)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4994 ;; Kludge-compatible: |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4995 (memq face kind-list)))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4996 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
4997 (defun ps-face-bold-p (face) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4998 (ps-xemacs-face-kind-p face 'WEIGHT_NAME "bold\\|demibold" |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
4999 ps-bold-faces)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5000 |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5001 (defun ps-face-italic-p (face) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5002 (or (ps-xemacs-face-kind-p face 'ANGLE_NAME "i\\|o" ps-italic-faces) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5003 (ps-xemacs-face-kind-p face 'SLANT "i\\|o" ps-italic-faces))) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5004 )) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5005 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5006 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5007 (defun ps-face-underlined-p (face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5008 (or (face-underline-p face) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5009 (memq face ps-underlined-faces))) |
7257 | 5010 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5011 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5012 ;; Ensure that face-list is fbound. |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5013 (or (fboundp 'face-list) (defalias 'face-list 'list-faces)) |
7257 | 5014 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5015 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5016 (defun ps-build-reference-face-lists () |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5017 ;; Ensure that face database is updated with faces on |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5018 ;; `font-lock-face-attributes' (obsolete stuff) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5019 (ps-font-lock-face-attributes) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5020 ;; Now, rebuild reference face lists |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5021 (setq ps-print-face-alist nil) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5022 (if ps-auto-font-detect |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5023 (mapcar 'ps-map-face (face-list)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5024 (mapcar 'ps-set-face-bold ps-bold-faces) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5025 (mapcar 'ps-set-face-italic ps-italic-faces) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5026 (mapcar 'ps-set-face-underline ps-underlined-faces)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5027 (setq ps-build-face-reference nil)) |
7257 | 5028 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5029 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5030 (defun ps-set-face-bold (face) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5031 (ps-set-face-attribute face 1)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5032 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5033 (defun ps-set-face-italic (face) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5034 (ps-set-face-attribute face 2)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5035 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5036 (defun ps-set-face-underline (face) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5037 (ps-set-face-attribute face 4)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5038 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5039 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5040 (defun ps-set-face-attribute (face effect) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5041 (let ((face-bit (cdr (ps-map-face face)))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5042 (aset face-bit 0 (logior (aref face-bit 0) effect)))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5043 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5044 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5045 (defun ps-map-face (face) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5046 (let* ((face-map (ps-screen-to-bit-face face)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5047 (ps-face-bit (cdr (assq (car face-map) ps-print-face-alist)))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5048 (if ps-face-bit |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5049 ;; if face exists, merge both |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5050 (let ((face-bit (cdr face-map))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5051 (aset ps-face-bit 0 (logior (aref ps-face-bit 0) (aref face-bit 0))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5052 (or (aref ps-face-bit 1) (aset ps-face-bit 1 (aref face-bit 1))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5053 (or (aref ps-face-bit 2) (aset ps-face-bit 2 (aref face-bit 2)))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5054 ;; if face does not exist, insert it |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5055 (setq ps-print-face-alist (cons face-map ps-print-face-alist))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5056 face-map)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5057 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5058 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5059 (defun ps-screen-to-bit-face (face) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5060 (cons face |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5061 (vector (logior (if (ps-face-bold-p face) 1 0) ; bold |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5062 (if (ps-face-italic-p face) 2 0) ; italic |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5063 (if (ps-face-underlined-p face) 4 0)) ; underline |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5064 (face-foreground face) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5065 (face-background face)))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5066 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5067 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5068 (cond ((not (eq ps-print-emacs-type 'emacs)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5069 ; xemacs |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5070 ; lucid |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5071 ; epoch |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5072 (defun ps-mapper (extent list) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5073 (nconc list (list (list (extent-start-position extent) 'push extent) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5074 (list (extent-end-position extent) 'pull extent))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5075 nil) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5076 |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5077 (defun ps-extent-sorter (a b) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5078 (< (extent-priority a) (extent-priority b))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5079 )) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5080 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5081 |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5082 (defun ps-print-ensure-fontified (start end) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5083 (and (boundp 'lazy-lock-mode) (symbol-value 'lazy-lock-mode) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5084 (lazy-lock-fontify-region start end))) |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5085 |
7257 | 5086 (defun ps-generate-postscript-with-faces (from to) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5087 ;; Some initialization... |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5088 (setq ps-current-effect 0) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5089 |
10683 | 5090 ;; Build the reference lists of faces if necessary. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5091 (if (or ps-always-build-face-reference |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5092 ps-build-face-reference) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5093 (progn |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5094 (message "Collecting face information...") |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5095 (ps-build-reference-face-lists))) |
10683 | 5096 ;; Set the color scale. We do it here instead of in the defvar so |
5097 ;; that ps-print can be dumped into emacs. This expression can't be | |
5098 ;; evaluated at dump-time because X isn't initialized. | |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5099 (setq ps-color-p (and ps-print-color-p (ps-color-device)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5100 ps-print-color-scale (if ps-color-p |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5101 (float (car (ps-color-values "white"))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5102 1.0)) |
10683 | 5103 ;; Generate some PostScript. |
7257 | 5104 (save-restriction |
5105 (narrow-to-region from to) | |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5106 (ps-print-ensure-fontified from to) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5107 (let ((face 'default) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5108 (position to)) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5109 (cond |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5110 ((or (eq ps-print-emacs-type 'lucid) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5111 (eq ps-print-emacs-type 'xemacs)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5112 ;; Build the list of extents... |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5113 (let ((a (cons 'dummy nil)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5114 record type extent extent-list) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5115 (map-extents 'ps-mapper nil from to a) |
20331 | 5116 (setq a (sort (cdr a) 'car-less-than-car) |
5117 extent-list nil) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5118 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5119 ;; Loop through the extents... |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5120 (while a |
20331 | 5121 (setq record (car a) |
5122 | |
5123 position (car record) | |
5124 record (cdr record) | |
5125 | |
5126 type (car record) | |
5127 record (cdr record) | |
5128 | |
5129 extent (car record)) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5130 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5131 ;; Plot up to this record. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5132 ;; XEmacs 19.12: for some reason, we're getting into a |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5133 ;; situation in which some of the records have |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5134 ;; positions less than 'from'. Since we've narrowed |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5135 ;; the buffer, this'll generate errors. This is a |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5136 ;; hack, but don't call ps-plot-with-face unless from > |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5137 ;; point-min. |
20331 | 5138 (and (>= from (point-min)) (<= position (point-max)) |
5139 (ps-plot-with-face from position face)) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5140 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5141 (cond |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5142 ((eq type 'push) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5143 (and (extent-face extent) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5144 (setq extent-list (sort (cons extent extent-list) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5145 'ps-extent-sorter)))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5146 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5147 ((eq type 'pull) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5148 (setq extent-list (sort (delq extent extent-list) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5149 'ps-extent-sorter)))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5150 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5151 (setq face (if extent-list |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5152 (extent-face (car extent-list)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5153 'default) |
20331 | 5154 from position |
5155 a (cdr a))))) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5156 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5157 ((eq ps-print-emacs-type 'emacs) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5158 (let ((property-change from) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5159 (overlay-change from) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5160 (save-buffer-invisibility-spec buffer-invisibility-spec) |
23307 | 5161 (buffer-invisibility-spec nil)) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5162 (while (< from to) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5163 (and (< property-change to) ; Don't search for property change |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5164 ; unless previous search succeeded. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5165 (setq property-change (next-property-change from nil to))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5166 (and (< overlay-change to) ; Don't search for overlay change |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5167 ; unless previous search succeeded. |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5168 (setq overlay-change (min (next-overlay-change from) to))) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5169 (setq position (min property-change overlay-change)) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5170 ;; The code below is not quite correct, |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5171 ;; because a non-nil overlay invisible property |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5172 ;; which is inactive according to the current value |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5173 ;; of buffer-invisibility-spec nonetheless overrides |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5174 ;; a face text property. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5175 (setq face |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5176 (cond ((let ((prop (get-text-property from 'invisible))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5177 ;; Decide whether this invisible property |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5178 ;; really makes the text invisible. |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5179 (if (eq save-buffer-invisibility-spec t) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5180 (not (null prop)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5181 (or (memq prop save-buffer-invisibility-spec) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5182 (assq prop save-buffer-invisibility-spec)))) |
21086
12ecaaaea144
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20953
diff
changeset
|
5183 'emacs--invisible--face) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5184 ((get-text-property from 'face)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5185 (t 'default))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5186 (let ((overlays (overlays-at from)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5187 (face-priority -1)) ; text-property |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5188 (while (and overlays |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5189 (not (eq face 'emacs--invisible--face))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5190 (let* ((overlay (car overlays)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5191 (overlay-invisible (overlay-get overlay 'invisible)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5192 (overlay-priority (or (overlay-get overlay 'priority) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5193 0))) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5194 (and (> overlay-priority face-priority) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5195 (setq face |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5196 (cond ((if (eq save-buffer-invisibility-spec t) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5197 (not (null overlay-invisible)) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5198 (or (memq overlay-invisible |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5199 save-buffer-invisibility-spec) |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5200 (assq overlay-invisible |
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5201 save-buffer-invisibility-spec))) |
23307 | 5202 'emacs--invisible--face) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5203 ((overlay-get overlay 'face)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5204 (t face)) |
20331 | 5205 face-priority overlay-priority))) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5206 (setq overlays (cdr overlays)))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5207 ;; Plot up to this record. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5208 (ps-plot-with-face from position face) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5209 (setq from position))))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5210 (ps-plot-with-face from to face)))) |
7257 | 5211 |
5212 (defun ps-generate-postscript (from to) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5213 (ps-plot-region from to 0 nil)) |
7257 | 5214 |
5215 (defun ps-generate (buffer from to genfunc) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5216 (save-excursion |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5217 (let ((from (min to from)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5218 (to (max to from)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5219 ;; This avoids trouble if chars with read-only properties |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5220 ;; are copied into ps-spool-buffer. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5221 (inhibit-read-only t)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5222 (save-restriction |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5223 (narrow-to-region from to) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5224 (and ps-razzle-dazzle |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5225 (message "Formatting...%3d%%" (setq ps-razchunk 0))) |
20331 | 5226 (setq ps-source-buffer buffer |
5227 ps-spool-buffer (get-buffer-create ps-spool-buffer-name)) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5228 (ps-init-output-queue) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5229 (let (safe-marker completed-safely needs-begin-file) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5230 (unwind-protect |
10683 | 5231 (progn |
5232 (set-buffer ps-spool-buffer) | |
22397 | 5233 (set-buffer-multibyte nil) |
23138
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
5234 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5235 ;; Get a marker and make it point to the current end of the |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5236 ;; buffer, If an error occurs, we'll delete everything from |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5237 ;; the end of this marker onwards. |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5238 (setq safe-marker (make-marker)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5239 (set-marker safe-marker (point-max)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5240 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5241 (goto-char (point-min)) |
20331 | 5242 (or (looking-at (regexp-quote ps-adobe-tag)) |
5243 (setq needs-begin-file t)) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5244 (save-excursion |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5245 (set-buffer ps-source-buffer) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5246 (and needs-begin-file (ps-begin-file)) |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5247 (ps-mule-begin from to) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5248 (ps-begin-job) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5249 (ps-begin-page)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5250 (set-buffer ps-source-buffer) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5251 (funcall genfunc from to) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5252 (ps-end-page) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5253 |
20331 | 5254 (and ps-spool-duplex (= (mod ps-page-count 2) 1) |
5255 (ps-dummy-page)) | |
22397 | 5256 (ps-end-file) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5257 (ps-flush-output) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5258 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5259 ;; Back to the PS output buffer to set the page count |
22397 | 5260 (let ((total-lines (if ps-printing-region |
5261 (cdr ps-printing-region) | |
5262 (ps-count-lines (point-min) (point-max)))) | |
5263 (total-pages (if ps-print-only-one-header | |
5264 (ps-page-number) | |
5265 ps-page-count))) | |
5266 (set-buffer ps-spool-buffer) | |
5267 (goto-char (point-min)) | |
5268 (while (re-search-forward "^/Lines 0 def\n/PageCount 0 def$" | |
5269 nil t) | |
5270 (replace-match (format "/Lines %d def\n/PageCount %d def" | |
5271 total-lines total-pages) t))) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5272 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5273 ;; Setting this variable tells the unwind form that the |
20331 | 5274 ;; the PostScript was generated without error. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5275 (setq completed-safely t)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5276 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5277 ;; Unwind form: If some bad mojo occurred while generating |
20331 | 5278 ;; PostScript, delete all the PostScript that was generated. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5279 ;; This protects the previously spooled files from getting |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5280 ;; corrupted. |
20331 | 5281 (and (markerp safe-marker) (not completed-safely) |
5282 (progn | |
5283 (set-buffer ps-spool-buffer) | |
5284 (delete-region (marker-position safe-marker) (point-max)))))) | |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5285 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5286 (and ps-razzle-dazzle (message "Formatting...done")))))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5287 |
23091
25c95d9da0af
Multi-byte buffer handling.
Kenichi Handa <handa@m17n.org>
parents:
22751
diff
changeset
|
5288 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5289 ;; Permit dynamic evaluation at print time of `ps-lpr-switches'. |
7257 | 5290 (defun ps-do-despool (filename) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5291 (if (or (not (boundp 'ps-spool-buffer)) |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5292 (not (symbol-value 'ps-spool-buffer))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5293 (message "No spooled PostScript to print") |
7257 | 5294 (if filename |
5295 (save-excursion | |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5296 (and ps-razzle-dazzle (message "Saving...")) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5297 (set-buffer ps-spool-buffer) |
7257 | 5298 (setq filename (expand-file-name filename)) |
21571
add6627452a5
(ps-do-despool): Bind coding-system-for-write to
Eli Zaretskii <eliz@gnu.org>
parents:
21086
diff
changeset
|
5299 (let ((coding-system-for-write 'raw-text-unix)) |
add6627452a5
(ps-do-despool): Bind coding-system-for-write to
Eli Zaretskii <eliz@gnu.org>
parents:
21086
diff
changeset
|
5300 (write-region (point-min) (point-max) filename)) |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5301 (and ps-razzle-dazzle (message "Wrote %s" filename))) |
7257 | 5302 ;; Else, spool to the printer |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5303 (and ps-razzle-dazzle (message "Printing...")) |
7257 | 5304 (save-excursion |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5305 (set-buffer ps-spool-buffer) |
22751
75c35003c69f
(ps-do-despool): Bind ps-printer-name to printer-name if the former is
Andrew Innes <andrewi@gnu.org>
parents:
22680
diff
changeset
|
5306 (let* ((coding-system-for-write 'raw-text-unix) |
75c35003c69f
(ps-do-despool): Bind ps-printer-name to printer-name if the former is
Andrew Innes <andrewi@gnu.org>
parents:
22680
diff
changeset
|
5307 (ps-printer-name (or ps-printer-name printer-name)) |
75c35003c69f
(ps-do-despool): Bind ps-printer-name to printer-name if the former is
Andrew Innes <andrewi@gnu.org>
parents:
22680
diff
changeset
|
5308 (ps-lpr-switches |
23138
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
5309 (append (and (stringp ps-printer-name) |
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
5310 (list (concat "-P" ps-printer-name))) |
14e74d2a49cb
(ps-print-control-characters): Doc-string modified.
Kenichi Handa <handa@m17n.org>
parents:
23091
diff
changeset
|
5311 ps-lpr-switches))) |
22680
3cf03f32956c
(ps-printer-name): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
22596
diff
changeset
|
5312 (if (and (memq system-type '(ms-dos windows-nt)) |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5313 (stringp ps-printer-name)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5314 (write-region (point-min) (point-max) ps-printer-name t 0) |
14190
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
5315 (apply 'call-process-region |
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
5316 (point-min) (point-max) ps-lpr-command nil |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5317 (and (fboundp 'start-process) 0) |
14190
395b22713872
(ps-do-despool): On MS-DOS, allow both the usual and
Richard M. Stallman <rms@gnu.org>
parents:
14169
diff
changeset
|
5318 nil |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5319 (ps-flatten-list ; dynamic evaluation |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5320 (mapcar 'ps-eval-switch ps-lpr-switches)))))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5321 (and ps-razzle-dazzle (message "Printing...done"))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5322 (kill-buffer ps-spool-buffer))) |
7257 | 5323 |
20516
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5324 ;; Dynamic evaluation |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5325 (defun ps-eval-switch (arg) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5326 (cond ((stringp arg) arg) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5327 ((functionp arg) (apply arg nil)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5328 ((symbolp arg) (symbol-value arg)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5329 ((consp arg) (apply (car arg) (cdr arg))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5330 (t nil))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5331 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5332 ;; `ps-flatten-list' is defined here (copied from "message.el" and |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5333 ;; enhanced to handle dotted pairs as well) until we can get some |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5334 ;; sensible autoloads, or `flatten-list' gets put somewhere decent. |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5335 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5336 ;; (ps-flatten-list '((a . b) c (d . e) (f g h) i . j)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5337 ;; => (a b c d e f g h i j) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5338 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5339 (defun ps-flatten-list (&rest list) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5340 (ps-flatten-list-1 list)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5341 |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5342 (defun ps-flatten-list-1 (list) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5343 (cond ((null list) nil) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5344 ((consp list) (append (ps-flatten-list-1 (car list)) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5345 (ps-flatten-list-1 (cdr list)))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5346 (t (list list)))) |
d33438261904
Some comment, doc and bug fixes.
Richard M. Stallman <rms@gnu.org>
parents:
20332
diff
changeset
|
5347 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5348 (defun ps-kill-emacs-check () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5349 (let (ps-buffer) |
20331 | 5350 (and (setq ps-buffer (get-buffer ps-spool-buffer-name)) |
5351 (buffer-modified-p ps-buffer) | |
5352 (y-or-n-p "Unprinted PostScript waiting; print now? ") | |
5353 (ps-despool)) | |
5354 (and (setq ps-buffer (get-buffer ps-spool-buffer-name)) | |
5355 (buffer-modified-p ps-buffer) | |
5356 (not (yes-or-no-p "Unprinted PostScript waiting; exit anyway? ")) | |
5357 (error "Unprinted PostScript")))) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5358 |
23550
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5359 (cond ((fboundp 'add-hook) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5360 (funcall 'add-hook 'kill-emacs-hook 'ps-kill-emacs-check)) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5361 (kill-emacs-hook |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5362 (message "Won't override existing `kill-emacs-hook'")) |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5363 (t |
d8a958630c9d
User option for multibyte buffer handling and doc fix.
Karl Heuer <kwzh@gnu.org>
parents:
23484
diff
changeset
|
5364 (setq kill-emacs-hook 'ps-kill-emacs-check))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5365 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5366 ;;; Sample Setup Code: |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5367 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5368 ;; This stuff is for anybody that's brave enough to look this far, |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5369 ;; and able to figure out how to use it. It isn't really part of |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5370 ;; ps-print, but I'll leave it here in hopes it might be useful: |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5371 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5372 ;; WARNING!!! The following code is *sample* code only. Don't use it |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5373 ;; unless you understand what it does! |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5374 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5375 (defmacro ps-prsc () |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5376 `(if (eq ps-print-emacs-type 'emacs) [f22] 'f22)) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5377 (defmacro ps-c-prsc () |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5378 `(if (eq ps-print-emacs-type 'emacs) [C-f22] '(control f22))) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5379 (defmacro ps-s-prsc () |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5380 `(if (eq ps-print-emacs-type 'emacs) [S-f22] '(shift f22))) |
10683 | 5381 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5382 ;; A hook to bind to `rmail-mode-hook' to locally bind prsc and set the |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5383 ;; `ps-left-headers' specially for mail messages. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5384 (defun ps-rmail-mode-hook () |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5385 (local-set-key (ps-prsc) 'ps-rmail-print-message-from-summary) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5386 (setq ps-header-lines 3 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5387 ps-left-header |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5388 ;; The left headers will display the message's subject, its |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5389 ;; author, and the name of the folder it was in. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5390 '(ps-article-subject ps-article-author buffer-name))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5391 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5392 ;; See `ps-gnus-print-article-from-summary'. This function does the |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5393 ;; same thing for rmail. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5394 (defun ps-rmail-print-message-from-summary () |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5395 (interactive) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5396 (ps-print-message-from-summary 'rmail-summary-buffer "RMAIL")) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5397 |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5398 ;; Used in `ps-rmail-print-article-from-summary', |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5399 ;; `ps-gnus-print-article-from-summary' and `ps-vm-print-message-from-summary'. |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5400 (defun ps-print-message-from-summary (summary-buffer summary-default) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5401 (let ((ps-buf (or (and (boundp summary-buffer) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5402 (symbol-value summary-buffer)) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5403 summary-default))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5404 (and (get-buffer ps-buf) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5405 (save-excursion |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5406 (set-buffer ps-buf) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5407 (ps-spool-buffer-with-faces))))) |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5408 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5409 ;; Look in an article or mail message for the Subject: line. To be |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5410 ;; placed in `ps-left-headers'. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5411 (defun ps-article-subject () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5412 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5413 (goto-char (point-min)) |
15620
7844c0f756d0
(ps-article-subject): Don't die if no subject header.
Karl Heuer <kwzh@gnu.org>
parents:
15163
diff
changeset
|
5414 (if (re-search-forward "^Subject:[ \t]+\\(.*\\)$" nil t) |
17588
0054114145ca
change all buffer-substring to buffer-substring-no-properties.
Simon Marshall <simon@gnu.org>
parents:
17440
diff
changeset
|
5415 (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5416 "Subject ???"))) |
7257 | 5417 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5418 ;; Look in an article or mail message for the From: line. Sorta-kinda |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5419 ;; understands RFC-822 addresses and can pull the real name out where |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5420 ;; it's provided. To be placed in `ps-left-headers'. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5421 (defun ps-article-author () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5422 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5423 (goto-char (point-min)) |
15621
6be6d1990543
(ps-article-author, ps-info-file, ps-info-node): Don't die if header is missing.
Karl Heuer <kwzh@gnu.org>
parents:
15620
diff
changeset
|
5424 (if (re-search-forward "^From:[ \t]+\\(.*\\)$" nil t) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5425 (let ((fromstring (buffer-substring-no-properties (match-beginning 1) |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5426 (match-end 1)))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5427 (cond |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5428 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5429 ;; Try first to match addresses that look like |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5430 ;; thompson@wg2.waii.com (Jim Thompson) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5431 ((string-match ".*[ \t]+(\\(.*\\))" fromstring) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5432 (substring fromstring (match-beginning 1) (match-end 1))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5433 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5434 ;; Next try to match addresses that look like |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5435 ;; Jim Thompson <thompson@wg2.waii.com> |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5436 ((string-match "\\(.*\\)[ \t]+<.*>" fromstring) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5437 (substring fromstring (match-beginning 1) (match-end 1))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5438 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5439 ;; Couldn't find a real name -- show the address instead. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5440 (t fromstring))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5441 "From ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5442 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5443 ;; A hook to bind to `gnus-article-prepare-hook'. This will set the |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5444 ;; `ps-left-headers' specially for gnus articles. Unfortunately, |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5445 ;; `gnus-article-mode-hook' is called only once, the first time the *Article* |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5446 ;; buffer enters that mode, so it would only work for the first time |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5447 ;; we ran gnus. The second time, this hook wouldn't get set up. The |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5448 ;; only alternative is `gnus-article-prepare-hook'. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5449 (defun ps-gnus-article-prepare-hook () |
20331 | 5450 (setq ps-header-lines 3 |
5451 ps-left-header | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5452 ;; The left headers will display the article's subject, its |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5453 ;; author, and the newsgroup it was in. |
20331 | 5454 '(ps-article-subject ps-article-author gnus-newsgroup-name))) |
7257 | 5455 |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5456 ;; A hook to bind to `vm-mode-hook' to locally bind prsc and set the |
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5457 ;; `ps-left-headers' specially for mail messages. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5458 (defun ps-vm-mode-hook () |
10683 | 5459 (local-set-key (ps-prsc) 'ps-vm-print-message-from-summary) |
20331 | 5460 (setq ps-header-lines 3 |
5461 ps-left-header | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5462 ;; The left headers will display the message's subject, its |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5463 ;; author, and the name of the folder it was in. |
20331 | 5464 '(ps-article-subject ps-article-author buffer-name))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5465 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5466 ;; Every now and then I forget to switch from the *Summary* buffer to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5467 ;; the *Article* before hitting prsc, and a nicely formatted list of |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5468 ;; article subjects shows up at the printer. This function, bound to |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5469 ;; prsc for the gnus *Summary* buffer means I don't have to switch |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5470 ;; buffers first. |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5471 ;; sb: Updated for Gnus 5. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5472 (defun ps-gnus-print-article-from-summary () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5473 (interactive) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5474 (ps-print-message-from-summary 'gnus-article-buffer "*Article*")) |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5475 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5476 ;; See `ps-gnus-print-article-from-summary'. This function does the |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5477 ;; same thing for vm. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5478 (defun ps-vm-print-message-from-summary () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5479 (interactive) |
19773
24853e0e38d6
Some comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19485
diff
changeset
|
5480 (ps-print-message-from-summary 'vm-mail-buffer "")) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5481 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5482 ;; A hook to bind to bind to `gnus-summary-setup-buffer' to locally bind |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5483 ;; prsc. |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5484 (defun ps-gnus-summary-setup () |
10683 | 5485 (local-set-key (ps-prsc) 'ps-gnus-print-article-from-summary)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5486 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5487 ;; Look in an article or mail message for the Subject: line. To be |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5488 ;; placed in `ps-left-headers'. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5489 (defun ps-info-file () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5490 (save-excursion |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5491 (goto-char (point-min)) |
15621
6be6d1990543
(ps-article-author, ps-info-file, ps-info-node): Don't die if header is missing.
Karl Heuer <kwzh@gnu.org>
parents:
15620
diff
changeset
|
5492 (if (re-search-forward "File:[ \t]+\\([^, \t\n]*\\)" nil t) |
17588
0054114145ca
change all buffer-substring to buffer-substring-no-properties.
Simon Marshall <simon@gnu.org>
parents:
17440
diff
changeset
|
5493 (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5494 "File ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5495 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5496 ;; Look in an article or mail message for the Subject: line. To be |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5497 ;; placed in `ps-left-headers'. |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5498 (defun ps-info-node () |
7257 | 5499 (save-excursion |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5500 (goto-char (point-min)) |
15621
6be6d1990543
(ps-article-author, ps-info-file, ps-info-node): Don't die if header is missing.
Karl Heuer <kwzh@gnu.org>
parents:
15620
diff
changeset
|
5501 (if (re-search-forward "Node:[ \t]+\\([^,\t\n]*\\)" nil t) |
17588
0054114145ca
change all buffer-substring to buffer-substring-no-properties.
Simon Marshall <simon@gnu.org>
parents:
17440
diff
changeset
|
5502 (buffer-substring-no-properties (match-beginning 1) (match-end 1)) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5503 "Node ???"))) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5504 |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5505 (defun ps-info-mode-hook () |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5506 (setq ps-left-header |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5507 ;; The left headers will display the node name and file name. |
20331 | 5508 '(ps-info-node ps-info-file))) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5509 |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5510 ;; WARNING! The following function is a *sample* only, and is *not* |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5511 ;; meant to be used as a whole unless you understand what the effects |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5512 ;; will be! (In fact, this is a copy of Jim's setup for ps-print -- |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5513 ;; I'd be very surprised if it was useful to *anybody*, without |
11799
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5514 ;; modification.) |
4a04c7799790
Miscellaneous fixes for better compatibility with
Karl Heuer <kwzh@gnu.org>
parents:
10738
diff
changeset
|
5515 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5516 (defun ps-jts-ps-setup () |
10683 | 5517 (global-set-key (ps-prsc) 'ps-spool-buffer-with-faces) ;f22 is prsc |
5518 (global-set-key (ps-s-prsc) 'ps-spool-region-with-faces) | |
5519 (global-set-key (ps-c-prsc) 'ps-despool) | |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5520 (add-hook 'gnus-article-prepare-hook 'ps-gnus-article-prepare-hook) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5521 (add-hook 'gnus-summary-mode-hook 'ps-gnus-summary-setup) |
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5522 (add-hook 'vm-mode-hook 'ps-vm-mode-hook) |
10683 | 5523 (add-hook 'vm-mode-hooks 'ps-vm-mode-hook) |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5524 (add-hook 'Info-mode-hook 'ps-info-mode-hook) |
20331 | 5525 (setq ps-spool-duplex t |
5526 ps-print-color-p nil | |
5527 ps-lpr-command "lpr" | |
5528 ps-lpr-switches '("-Jjct,duplex_long")) | |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5529 'ps-jts-ps-setup) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5530 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5531 ;; WARNING! The following function is a *sample* only, and is *not* |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5532 ;; meant to be used as a whole unless it corresponds to your needs. |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5533 ;; (In fact, this is a copy of Jack's setup for ps-print -- |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5534 ;; I would not be that surprised if it was useful to *anybody*, |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5535 ;; without modification.) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5536 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5537 (defun ps-jack-setup () |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5538 (setq ps-print-color-p nil |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5539 ps-lpr-command "lpr" |
20331 | 5540 ps-lpr-switches nil |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5541 |
19445
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5542 ps-paper-type 'a4 |
94a54fbffb3e
A lot of comment and doc fixes.
Richard M. Stallman <rms@gnu.org>
parents:
19011
diff
changeset
|
5543 ps-landscape-mode t |
16361
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5544 ps-number-of-columns 2 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5545 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5546 ps-left-margin (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5547 ps-right-margin (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5548 ps-inter-column (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5549 ps-bottom-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5550 ps-top-margin (/ (* 72 1.5) 2.54) ; 1.5 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5551 ps-header-offset (/ (* 72 1.0) 2.54) ; 1.0 cm |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5552 ps-header-line-pad .15 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5553 ps-print-header t |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5554 ps-print-header-frame t |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5555 ps-header-lines 2 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5556 ps-show-n-of-n t |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5557 ps-spool-duplex nil |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5558 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5559 ps-font-family 'Courier |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5560 ps-font-size 5.5 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5561 ps-header-font-family 'Helvetica |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5562 ps-header-font-size 6 |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5563 ps-header-title-font-size 8) |
032601b9959b
(ps-print-prologue-1): Fix bug in postscript comment lines.
Richard M. Stallman <rms@gnu.org>
parents:
16186
diff
changeset
|
5564 'ps-jack-setup) |
7257 | 5565 |
5566 (provide 'ps-print) | |
10738
e7d5b119b583
(ps-print-version): Add caveat about version number.
Richard M. Stallman <rms@gnu.org>
parents:
10683
diff
changeset
|
5567 |
10492
a0f38717d82d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
7257
diff
changeset
|
5568 ;;; ps-print.el ends here |