comparison lisp/ps-print.el @ 26883:c1e6932eea92

(ps-plot-region): Handle new composition.
author Kenichi Handa <handa@m17n.org>
date Wed, 15 Dec 1999 00:38:58 +0000
parents 79f9edcc8bde
children 0a2452a20c74
comparison
equal deleted inserted replaced
26882:5b331ff3b477 26883:c1e6932eea92
4707 ;; pagefeeds, control characters, and plot each chunk. 4707 ;; pagefeeds, control characters, and plot each chunk.
4708 (while (< from to) 4708 (while (< from to)
4709 (if (re-search-forward ps-control-or-escape-regexp to t) 4709 (if (re-search-forward ps-control-or-escape-regexp to t)
4710 ;; region with some control characters or some multi-byte characters 4710 ;; region with some control characters or some multi-byte characters
4711 (let* ((match-point (match-beginning 0)) 4711 (let* ((match-point (match-beginning 0))
4712 (match (char-after match-point))) 4712 (match (char-after match-point))
4713 (composition (find-composition from (1+ match-point))))
4714 (if composition
4715 (if (and (nth 2 composition)
4716 (<= (car composition) match-point))
4717 (progn
4718 (setq match-point (car composition)
4719 match 0)
4720 (goto-char (nth 1 composition)))
4721 (setq composition nil)))
4713 (when (< from match-point) 4722 (when (< from match-point)
4714 (ps-mule-set-ascii-font) 4723 (ps-mule-set-ascii-font)
4715 (ps-plot 'ps-basic-plot-string from match-point bg-color)) 4724 (ps-plot 'ps-basic-plot-string from match-point bg-color))
4716 (cond 4725 (cond
4717 ((= match ?\t) ; tab 4726 ((= match ?\t) ; tab
4732 ;; it is a beginning of page. 4741 ;; it is a beginning of page.
4733 (or (and (= (char-after (1- match-point)) ?\n) 4742 (or (and (= (char-after (1- match-point)) ?\n)
4734 (= ps-height-remaining ps-print-height)) 4743 (= ps-height-remaining ps-print-height))
4735 (ps-next-page))) 4744 (ps-next-page)))
4736 4745
4746 (composition ; a composite sequence
4747 (ps-plot 'ps-mule-plot-composition match-point (point) bg-color))
4748
4749 ; characters from ^@ to ^_ and
4737 ((> match 255) ; a multi-byte character 4750 ((> match 255) ; a multi-byte character
4738 (let ((charset (char-charset match))) 4751 (let* ((charset (char-charset match))
4752 (composition (find-composition match-point to))
4753 (stop (if (nth 2 composition) (car composition) to)))
4739 (or (eq charset 'composition) 4754 (or (eq charset 'composition)
4740 (while (eq (charset-after) charset) 4755 (while (and (< (point) stop) (eq (charset-after) charset))
4741 (forward-char 1))) 4756 (forward-char 1)))
4742 (ps-plot 'ps-mule-plot-string match-point (point) bg-color))) 4757 (ps-plot 'ps-mule-plot-string match-point (point) bg-color)))
4743 ; characters from ^@ to ^_ and 4758
4744 (t ; characters from 127 to 255 4759 (t ; characters from 127 to 255
4745 (ps-control-character match))) 4760 (ps-control-character match)))
4746 (setq from (point))) 4761 (setq from (point)))
4747 ;; region without control characters nor multi-byte characters 4762 ;; region without control characters nor multi-byte characters
4748 (ps-mule-set-ascii-font) 4763 (ps-mule-set-ascii-font)