# HG changeset patch # User Kenichi Handa # Date 1244594059 0 # Node ID 8fb6a5d3b48dc1dbe11ca43c2a90e40bd1f0dcef # Parent 66652dbd881cab646f96a0c94ca0498edfcd8dba (compose-gstring-for-terminal): For zero-width characters of Unicode category `Cf', simply replace it with SPC. diff -r 66652dbd881c -r 8fb6a5d3b48d lisp/composite.el --- a/lisp/composite.el Tue Jun 09 18:47:46 2009 +0000 +++ b/lisp/composite.el Wed Jun 10 00:34:19 2009 +0000 @@ -681,7 +681,14 @@ (lglyph-set-from-to glyph i i) (setq i (1+ i)))) (if (= (lglyph-width glyph) 0) - (progn + (if (eq (get-char-code-property (lglyph-char glyph) + 'general-category) + 'Cf) + (progn + ;; Compose by replacing with a space. + (lglyph-set-char glyph 32) + (lglyph-set-width glyph 1) + (setq i (1+ i))) ;; Compose by prepending a space. (setq gstring (lgstring-insert-glyph gstring i (lglyph-copy glyph))