diff options
author | Kenichi Handa <handa@m17n.org> | 2008-08-29 07:59:39 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2008-08-29 07:59:39 +0000 |
commit | 39a7775db4c03021630940758e8ece6d85d92c94 (patch) | |
tree | 061f994edd9b644e88c69da2aabd440bccdef8b9 /lisp/language/lao-util.el | |
parent | 620f3d8c7d9240f3d273a723e101e012ce450277 (diff) | |
download | emacs-39a7775db4c03021630940758e8ece6d85d92c94.tar.gz |
(lao-composition-function): Argument changed.
Diffstat (limited to 'lisp/language/lao-util.el')
-rw-r--r-- | lisp/language/lao-util.el | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el index 18fa4c51870..adbe30f0622 100644 --- a/lisp/language/lao-util.el +++ b/lisp/language/lao-util.el @@ -492,18 +492,16 @@ syllable. In that case, FROM and TO are indexes to STR." ;;;###autoload (defun lao-composition-function (from to font-object string) - (or (and font-object - (font-shape-text from to font-object string)) - (with-category-table lao-category-table - (if string - (if (eq (string-match lao-composition-pattern string from) to) - (prog1 (match-end 0) - (compose-string string from (match-end 0)))) - (save-excursion - (goto-char from) - (if (looking-at lao-composition-pattern) - (prog1 (match-end 0) - (compose-region from (match-end 0))))))))) + (if (= (lgstirng-char-len gstring) 1) + (compose-gstring-for-graphic gstring) + (or (font-shape-text from to font-object string)) + (let ((glyph-len (lgstring-glyph-len gstring)) + (i 0) + glyph) + (while (and (< i glyph-len) + (setq glyph (lgstring-glyph gstring i))) + (setq i (1+ i))) + (compose-glyph-string-relative gstring 0 i 0.1)))) ;;;###autoload (defun lao-compose-region (from to) |