Commit eab4bb89 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(ps-mule-plot-string): Translate characters by

ps-print-translation-table.
(ps-mule-begin-job): Call find-charset-region/string with
ps-print-translation-table.
parent 3409eda2
2005-03-29 Kenichi Handa <handa@m17n.org>
* ps-mule.el (ps-mule-plot-string): Translate characters by
ps-print-translation-table.
(ps-mule-begin-job): Call find-charset-region/string with
ps-print-translation-table.
* ps-print.el (ps-print-translation-table): New variable.
(ps-plot-region): Translate characters by
ps-print-translation-table.
2005-03-29 Juri Linkov <juri@jurta.org> 2005-03-29 Juri Linkov <juri@jurta.org>
   
* simple.el (next-error-highlight-timer): New variable. * simple.el (next-error-highlight-timer): New variable.
......
...@@ -824,7 +824,9 @@ Returns the value: ...@@ -824,7 +824,9 @@ Returns the value:
Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of
the sequence." the sequence."
(setq ps-mule-current-charset (charset-after from)) (let ((ch (char-after from)))
(setq ps-mule-current-charset
(char-charset (or (aref ps-print-translation-table ch) ch))))
(let* ((wrappoint (ps-mule-find-wrappoint (let* ((wrappoint (ps-mule-find-wrappoint
from to (ps-avg-char-width 'ps-font-for-text))) from to (ps-avg-char-width 'ps-font-for-text)))
(to (car wrappoint)) (to (car wrappoint))
...@@ -832,6 +834,10 @@ the sequence." ...@@ -832,6 +834,10 @@ the sequence."
(ps-font-alist 'ps-font-for-text)))) (ps-font-alist 'ps-font-for-text))))
(font-spec (ps-mule-get-font-spec ps-mule-current-charset font-type)) (font-spec (ps-mule-get-font-spec ps-mule-current-charset font-type))
(string (buffer-substring-no-properties from to))) (string (buffer-substring-no-properties from to)))
(dotimes (i (length string))
(let ((ch (aref ps-print-translation-table (aref string i))))
(if ch
(aset string i ch))))
(cond (cond
((= from to) ((= from to)
;; We can't print any more characters in the current line. ;; We can't print any more characters in the current line.
...@@ -1469,13 +1475,15 @@ This checks if all multi-byte characters in the region are printable or not." ...@@ -1469,13 +1475,15 @@ This checks if all multi-byte characters in the region are printable or not."
(setq ps-mule-charset-list (setq ps-mule-charset-list
(delq 'ascii (delq 'eight-bit-control (delq 'ascii (delq 'eight-bit-control
(delq 'eight-bit-graphic (delq 'eight-bit-graphic
(find-charset-region from to)))) (find-charset-region
from to ps-print-translation-table))))
ps-mule-header-charsets ps-mule-header-charsets
(delq 'ascii (delq 'eight-bit-control (delq 'ascii (delq 'eight-bit-control
(delq 'eight-bit-graphic (delq 'eight-bit-graphic
(find-charset-string (find-charset-string
(mapconcat (mapconcat
'identity header-footer-list "")))))) 'identity header-footer-list "")
ps-print-translation-table)))))
(dolist (cs ps-mule-charset-list) (dolist (cs ps-mule-charset-list)
(or (ps-mule-printable-p cs) (or (ps-mule-printable-p cs)
(push cs unprintable-charsets))) (push cs unprintable-charsets)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment