changeset 91154:e9a946a24fb0

(tamil-composition-function): Use font-shape-text if auto-compose-current-font is non-nil.
author Kenichi Handa <handa@m17n.org>
date Sat, 01 Dec 2007 04:20:54 +0000
parents e89e6dacdffa
children 95c0d1ad721f
files lisp/language/tml-util.el
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/language/tml-util.el	Sat Dec 01 04:20:22 2007 +0000
+++ b/lisp/language/tml-util.el	Sat Dec 01 04:20:54 2007 +0000
@@ -360,12 +360,17 @@
 If STRING is not nil, it is a string, and POS is an index to the string.
 In this case, compose characters after POS of the string."
   (if string
-      ;; Not yet implemented.
-      nil
+      (if (eq (string-match tamil-composable-pattern pos) pos)
+	  (if auto-compose-current-font
+	      (or (font-shape-text 0 (match-end 0) auto-compose-current-font
+				   string)
+		  pos)))
     (goto-char pos)
     (if (looking-at tamil-composable-pattern)
-	(prog1 (match-end 0)
-	  (tamil-compose-syllable-region pos (match-end 0))))))
+	(if auto-compose-current-font
+	    (or (font-shape-text pos (match-end 0) auto-compose-current-font))
+	  (prog1 (match-end 0)
+	    (tamil-compose-syllable-region pos (match-end 0)))))))
 
 (provide 'tml-util)