aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2008-09-10 05:49:38 +0000
committerKenichi Handa2008-09-10 05:49:38 +0000
commitc0a839aeac3ea341d1c1fbae1a87cc6d9a193cd6 (patch)
tree03a59bd674f6bd6b755cfa3e5e512c20ed2ed628
parentfa2dda1469eb5d12fc991a636af097eb48bbe99e (diff)
downloademacs-c0a839aeac3ea341d1c1fbae1a87cc6d9a193cd6.tar.gz
emacs-c0a839aeac3ea341d1c1fbae1a87cc6d9a193cd6.zip
(compose-gstring-for-graphic): Fix previous change.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/composite.el108
2 files changed, 63 insertions, 50 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 027adaf56b7..90aa1e14a45 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12008-09-10 Kenichi Handa <handa@m17n.org>
2
3 * composite.el (compose-gstring-for-graphic): Fix previous change.
4
12008-09-10 Glenn Morris <rgm@gnu.org> 52008-09-10 Glenn Morris <rgm@gnu.org>
2 6
3 * info.el (Info-try-follow-nearest-node): Fix doc typo. 7 * info.el (Info-try-follow-nearest-node): Fix doc typo.
@@ -242,6 +246,7 @@
242 246
243 * composite.el (find-composition): Mention about the automatic 247 * composite.el (find-composition): Mention about the automatic
244 composition in the docstring. 248 composition in the docstring.
249 (compose-gstring-for-graphic): Fix handling "above" marks.
245 250
246 * descr-text.el (describe-char): Fix handling of automatic composition. 251 * descr-text.el (describe-char): Fix handling of automatic composition.
247 252
diff --git a/lisp/composite.el b/lisp/composite.el
index fdf8dcd223c..6d1a2f0bba5 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -579,56 +579,64 @@ All non-spacing characters has this function in
579 (de (lglyph-descent glyph)) 579 (de (lglyph-descent glyph))
580 (ce (/ (+ lb rb) 2)) 580 (ce (/ (+ lb rb) 2))
581 xoff yoff) 581 xoff yoff)
582 (if (and 582 (when (and class (>= class 200) (<= class 240))
583 class (>= class 200) (<= class 240) 583 (setq xoff 0 yoff 0)
584 (cond 584 (cond
585 ((= class 200) 585 ((= class 200)
586 (setq xoff (- lbearing ce) 586 (setq xoff (- lbearing ce)
587 yoff (if (> as 0) 0 (+ descent as)))) 587 yoff (if (> as 0) 0 (+ descent as))))
588 ((= class 202) 588 ((= class 202)
589 (if (> as 0) (setq as 0)) 589 (if (> as 0) (setq as 0))
590 (setq xoff (- center ce) 590 (setq xoff (- center ce)
591 yoff (if (> as 0) 0 (+ descent as)))) 591 yoff (if (> as 0) 0 (+ descent as))))
592 ((= class 204) 592 ((= class 204)
593 (if (> as 0) (setq as 0)) 593 (if (> as 0) (setq as 0))
594 (setq xoff (- rbearing ce) 594 (setq xoff (- rbearing ce)
595 yoff (if (> as 0) 0 (+ descent as)))) 595 yoff (if (> as 0) 0 (+ descent as))))
596 ((= class 208) 596 ((= class 208)
597 (setq xoff (- lbearing rb))) 597 (setq xoff (- lbearing rb)))
598 ((= class 210) 598 ((= class 210)
599 (setq xoff (- rbearing lb))) 599 (setq xoff (- rbearing lb)))
600 ((= class 212) 600 ((= class 212)
601 (setq xoff (- lbearing ce) 601 (setq xoff (- lbearing ce)
602 yoff (if (>= de 0) 0 (- ascent (- de))))) 602 yoff (if (>= de 0) 0 (- (- ascent) de))))
603 ((= class 214) 603 ((= class 214)
604 (setq xoff (- center ce) 604 (setq xoff (- center ce)
605 yoff (if (>= de 0) 0 (- ascent (- de))))) 605 yoff (if (>= de 0) 0 (- (- ascent) de))))
606 ((= class 216) 606 ((= class 216)
607 (setq xoff (- rbearing ce) 607 (setq xoff (- rbearing ce)
608 yoff (if (>= de 0) 0 (- ascent (- de))))) 608 yoff (if (>= de 0) 0 (- (- ascent) de))))
609 ((= class 218) 609 ((= class 218)
610 (setq xoff (- lbearing ce) 610 (setq xoff (- lbearing ce)
611 yoff (if (> as 0) 0 (+ descent as gap)))) 611 yoff (if (> as 0) 0 (+ descent as gap))))
612 ((= class 220) 612 ((= class 220)
613 (setq xoff (- center ce) 613 (setq xoff (- center ce)
614 yoff (if (> as 0) 0 (+ descent as gap)))) 614 yoff (if (> as 0) 0 (+ descent as gap))))
615 ((= class 222) 615 ((= class 222)
616 (setq xoff (- rbearing ce) 616 (setq xoff (- rbearing ce)
617 yoff (if (> as 0) 0 (+ descent as gap)))) 617 yoff (if (> as 0) 0 (+ descent as gap))))
618 ((= class 224) 618 ((= class 224)
619 (setq xoff (- lbearing rb))) 619 (setq xoff (- lbearing rb)))
620 ((= class 226) 620 ((= class 226)
621 (setq xoff (- rbearing lb))) 621 (setq xoff (- rbearing lb)))
622 ((= class 228) 622 ((= class 228)
623 (setq xoff (- lbearing ce) 623 (setq xoff (- lbearing ce)
624 yoff (if (>= de 0) 0 (- ascent (- de) gap)))) 624 yoff (if (>= de 0) 0 (- (- ascent) de gap))))
625 ((= class 230) 625 ((= class 230)
626 (setq xoff (- center ce) 626 (setq xoff (- center ce)
627 yoff (if (>= de 0) 0 (- ascent (- de) gap)))) 627 yoff (if (>= de 0) 0 (- (- ascent) de gap))))
628 ((= class 232) 628 ((= class 232)
629 (setq xoff (- rbearing ce) 629 (setq xoff (- rbearing ce)
630 yoff (if (>= de 0) 0 (- ascent (- de) gap)))))) 630 yoff (if (>= de 0) 0 (- (+ ascent de) gap)))))
631 (lglyph-set-adjustment glyph (- xoff width) yoff)))))) 631 (lglyph-set-adjustment glyph (- xoff width) yoff)
632 (setq lb (+ lb xoff)
633 rb (+ lb xoff)
634 as (- as yoff)
635 de (+ de yoff)))
636 (if (< ascent as)
637 (setq ascent as))
638 (if (< descent de)
639 (setq descent de))))))
632 (let ((i 0)) 640 (let ((i 0))
633 (while (and (< i nglyphs) (setq glyph (lgstring-glyph gstring i))) 641 (while (and (< i nglyphs) (setq glyph (lgstring-glyph gstring i)))
634 (lglyph-set-from-to glyph 0 (1- nchars)) 642 (lglyph-set-from-to glyph 0 (1- nchars))