changeset 91198:34fe548702cc

(malayalam-composition-function): Use font-shape-text if auto-compose-current-font is non-nil.
author Kenichi Handa <handa@m17n.org>
date Thu, 06 Dec 2007 07:33:02 +0000
parents a7ee91d853bc
children 06f583f75d55
files lisp/language/mlm-util.el
diffstat 1 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/language/mlm-util.el	Thu Dec 06 07:30:52 2007 +0000
+++ b/lisp/language/mlm-util.el	Thu Dec 06 07:33:02 2007 +0000
@@ -106,12 +106,19 @@
 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 auto-compose-current-font
+	  (if (eq (string-match "[$,1@ (B-$,1A?(B]+" pos) pos)
+	      (or (font-shape-text 0 (match-end 0) auto-compose-current-font
+				   string)
+		  pos)))
     (goto-char pos)
-    (if (looking-at malayalam-composable-pattern)
-	(prog1 (match-end 0)
-	  (malayalam-compose-syllable-region pos (match-end 0))))))
+    (if auto-compose-current-font
+	(if (looking-at  "[$,1@ (B-$,1A?(B]+")
+	    (or (font-shape-text pos (match-end 0) auto-compose-current-font)
+		pos)
+	  (if (looking-at malayalam-composable-pattern)
+	      (prog1 (match-end 0)
+		(malayalam-compose-syllable-region pos (match-end 0))))))))
 
 ;; Notes on conversion steps.