(let ((last (last components))
(stack-upper '(tc . bc))
(stack-under '(bc . tc))
- rule)
+ rule comp-vowel tmp)
;; Special treatment for 'a chung.
;; If 'a follows a consonant, turn it into the subjoined form.
- (if (and (= char ?\e$(7"A\e(B)
- (aref (char-category-set (car last)) ?0))
- (setq char ?\e$(7"R\e(B)) ;; modified for new font by Tomabechi 1999/12/10
-
+ ;; * Disabled by Tomabechi 2000/06/09 *
+ ;; Because in Unicode, \e$(7"A\e(B may follow directly a consonant without
+ ;; any intervening vowel, as in \e4\e$(7"9\e0"9\e1\e4""\e0"""Q\e1\e4"A\e0"A\e1!;\e(B=\e4\e$(7"9\e0"9\e1\e(B \e4\e$(7""\e0""\e1\e(B \e4\e$(7"A\e0"A\e1\e(B not \e4\e$(7"9\e0"9\e1\e(B \e4\e$(7""\e0""\e1\e(B \e$(7"Q\e(B \e4\e$(7"A\e0"A\e1\e(B
+ ;;(if (and (= char ?\e$(7"A\e(B)
+ ;; (aref (char-category-set (car last)) ?0))
+ ;; (setq char ?\e$(7"R\e(B)) ;; modified for new font by Tomabechi 1999/12/10
+
+ ;; Composite vowel signs are decomposed before being added
+ ;; Added by Tomabechi 2000/06/08
+ (if (memq char '(?\e$(7"T\e(B ?\e$(7"V\e(B ?\e$(7"W\e(B ?\e$(7"X\e(B ?\e$(7"Y\e(B ?\e$(7"Z\e(B ?\e$(7"b\e(B))
+ (setq comp-vowel
+ (cddr (assoc (char-to-string char)
+ tibetan-composite-vowel-alist))
+ char
+ (cadr (assoc (char-to-string char)
+ tibetan-composite-vowel-alist))))
(cond
;; Compose upper vowel sign vertically over.
((aref (char-category-set char) ?2)
(if (eq char ?\e$(7"Q\e(B) ;; `\e$(7"Q\e(B' should not visible when composed.
(setq rule nil)
(setq rule stack-under)))
-
;; Transform ra-mgo (superscribed r) if followed by a subjoined
;; consonant other than w, ', y, r.
((and (= (car last) ?\e$(7"C\e(B)
(not (memq char '(?\e$(7#>\e(B ?\e$(7"R\e(B ?\e$(7#B\e(B ?\e$(7#C\e(B))))
(setcar last ?\e$(7!"\e(B) ;; modified for newfont by Tomabechi 1999/12/10
(setq rule stack-under))
-
;; Transform initial base consonant if followed by a subjoined
;; consonant but 'a.
(t
(setq rule stack-under))))
(if rule
- (setcdr last (list rule char)))))
+ (setcdr last (list rule char)))
+ ;; Added by Tomabechi 2000/06/08
+ (if comp-vowel
+ (nconc last comp-vowel))
+ ))
;;;###autoload
(defun tibetan-compose-string (str)
(let ((idx 0))
;; `\e$(7"A\e(B' is included in the pattern for subjoined consonants
;; because we treat it specially in tibetan-add-components.
+ ;; (This feature is removed by Tomabechi 2000/06/08)
(while (setq idx (string-match tibetan-composable-pattern str idx))
(let ((from idx)
(to (match-end 0))
(goto-char (point-min))
;; `\e$(7"A\e(B' is included in the pattern for subjoined consonants
;; because we treat it specially in tibetan-add-components.
+ ;; (This feature is removed by Tomabechi 2000/06/08)
(while (re-search-forward tibetan-composable-pattern nil t)
(let ((from (match-beginning 0))
(to (match-end 0))