comparison lisp/language/tibet-util.el @ 92179:865352429518

(tibetan-composition-function): Adjusted for the new calling way (argument changed). Try font-shape-text if possible.
author Kenichi Handa <handa@m17n.org>
date Mon, 25 Feb 2008 01:38:06 +0000
parents 606f2d163a64
children 1e3a407766b9
comparison
equal deleted inserted replaced
92178:008ecb0c705a 92179:865352429518
314 new (concat new (if slot (cdr slot) (char-to-string char))) 314 new (concat new (if slot (cdr slot) (char-to-string char)))
315 idx (1+ idx))) 315 idx (1+ idx)))
316 new)) 316 new))
317 317
318 ;;;###autoload 318 ;;;###autoload
319 (defun tibetan-composition-function (pos &optional string) 319 (defun tibetan-composition-function (from to font-object string)
320 (if string 320 (or (and font-object
321 (if auto-compose-current-font 321 (font-shape-text from to font-object string))
322 (if (eq (string-match "[$(7!0(B-$,1GQ(B]+" pos) pos) 322 (if string
323 (or (font-shape-text 0 (match-end 0) auto-compose-current-font 323 (tibetan-compose-string string)
324 string) 324 (tibetan-compose-region from to))))
325 pos)))
326 (goto-char pos)
327 (if auto-compose-current-font
328 (if (looking-at "[$(7!0(B-$,1GQ(B]+")
329 (or (font-shape-text pos (match-end 0) auto-compose-current-font)
330 pos)
331 (if (looking-at tibetan-composable-pattern)
332 (prog1 (match-end 0)
333 (tibetan-compose-region pos (match-end 0))))))))
334 325
335 ;;; 326 ;;;
336 ;;; This variable is used to avoid repeated decomposition. 327 ;;; This variable is used to avoid repeated decomposition.
337 ;;; 328 ;;;
338 (setq-default tibetan-decomposed nil) 329 (setq-default tibetan-decomposed nil)