aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ps-print.el21
1 files changed, 20 insertions, 1 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 726b0e4402c..b47ea3d4f89 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -6150,6 +6150,19 @@ XSTART YSTART are the relative position for the first page in a sheet.")
6150 6150
6151(defvar ps-current-effect 0) 6151(defvar ps-current-effect 0)
6152 6152
6153(defvar ps-print-translation-table
6154 (let ((tbl (make-char-table 'translation-table nil)))
6155 (if (and (boundp 'ucs-mule-8859-to-mule-unicode)
6156 (char-table-p ucs-mule-8859-to-mule-unicode))
6157 (map-char-table
6158 #'(lambda (k v)
6159 (if (and v (eq (char-charset v) 'latin-iso8859-1) (/= k v))
6160 (aset tbl k v)))
6161 ucs-mule-8859-to-mule-unicode))
6162 tbl)
6163 "Translation table for PostScript printing.
6164The default value is a table that translates non-Latin-1 Latin characters
6165to the equivalent Latin-1 characters.")
6153 6166
6154(defun ps-plot-region (from to font &optional fg-color bg-color effects) 6167(defun ps-plot-region (from to font &optional fg-color bg-color effects)
6155 (or (equal font ps-current-font) 6168 (or (equal font ps-current-font)
@@ -6240,11 +6253,17 @@ XSTART YSTART are the relative position for the first page in a sheet.")
6240 (ps-plot 'ps-mule-plot-composition match-point (point) bg-color)) 6253 (ps-plot 'ps-mule-plot-composition match-point (point) bg-color))
6241 6254
6242 ((> match 255) ; a multi-byte character 6255 ((> match 255) ; a multi-byte character
6256 (setq match (or (aref ps-print-translation-table match) match))
6243 (let* ((charset (char-charset match)) 6257 (let* ((charset (char-charset match))
6244 (composition (ps-e-find-composition match-point to)) 6258 (composition (ps-e-find-composition match-point to))
6245 (stop (if (nth 2 composition) (car composition) to))) 6259 (stop (if (nth 2 composition) (car composition) to)))
6246 (or (eq charset 'composition) 6260 (or (eq charset 'composition)
6247 (while (and (< (point) stop) (eq (charset-after) charset)) 6261 (while (and (< (point) stop)
6262 (let ((ch (following-char)))
6263 (setq ch
6264 (or (aref ps-print-translation-table ch)
6265 ch))
6266 (eq (char-charset ch) charset)))
6248 (forward-char 1))) 6267 (forward-char 1)))
6249 (ps-plot 'ps-mule-plot-string match-point (point) bg-color))) 6268 (ps-plot 'ps-mule-plot-string match-point (point) bg-color)))
6250 ; characters from ^@ to ^_ and 6269 ; characters from ^@ to ^_ and