From 16ccca6dc38aefb8c000560f8cf4cdc5f46b0727 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 16 Apr 2022 13:18:47 +0300 Subject: Improve support for the Brahmi script * lisp/language/indian.el ("Brahmi"): New language environment. Add composition rules for Brahmi. * lisp/international/fontset.el (script-representative-chars) (setup-default-fontset): Support Brahmi. (Bug#54914) * etc/NEWS: Announce the new language environment. --- lisp/language/indian.el | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'lisp/language') diff --git a/lisp/language/indian.el b/lisp/language/indian.el index e0adb0de6c3..310905534e6 100644 --- a/lisp/language/indian.el +++ b/lisp/language/indian.el @@ -126,6 +126,16 @@ environment.")) South Indian language Malayalam is supported in this language environment.")) '("Indian")) +(set-language-info-alist + "Brahmi" '((charset unicode) + (coding-system utf-8) + (coding-priority utf-8) + ; (input-method . "brahmi") ; FIXME + (documentation . "\ +The ancient Brahmi script is supported in this language environment.")) + '("Indian")) ; Should we have an "Old" category? + + ;; Replace mnemonic characters in REGEXP according to TABLE. TABLE is ;; an alist of (MNEMONIC-STRING . REPLACEMENT-STRING). @@ -384,6 +394,30 @@ South Indian language Malayalam is supported in this language environment.")) (list (vector (cdr slot) 0 #'font-shape-gstring)))))) char-script-table)) +;; Brahmi composition rules +(let ((consonant "[\U00011013-\U00011034]") + (non-consonant "[^\U00011013-\U00011034]") + (numeral "[\U00011052-\U00011065]") + (multiplier "[\U00011064\U00011065]") + (virama "\U00011046") + (number-joiner "\U0001107F")) + (set-char-table-range composition-function-table + '(#x11046 . #x11046) + (list (vector + ;; Consonant conjuncts + (concat consonant virama consonant) + 1 'font-shape-gstring) + (vector + ;; Vowelless consonants + (concat consonant virama non-consonant) + 1 'font-shape-gstring))) + (set-char-table-range composition-function-table + '(#x1107F . #x1107F) + (list (vector + ;; Additive-multiplicative numerals + (concat multiplier number-joiner numeral) + 1 'font-shape-gstring)))) + (provide 'indian) ;;; indian.el ends here -- cgit v1.2.1