]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve support for the Brahmi script
authorEli Zaretskii <eliz@gnu.org>
Sat, 16 Apr 2022 10:18:47 +0000 (13:18 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 16 Apr 2022 10:18:47 +0000 (13:18 +0300)
* 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.

etc/NEWS
lisp/international/fontset.el
lisp/language/indian.el

index 14d970fe11a669f20ffc9151c1a8fac5431b0a96..6913f159c0862cce6080b2c2371edcb211d6eff3 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -596,6 +596,10 @@ to edit such sequences by allowing point to "enter" the sequence.
 *** New language environment "Northern Thai".
 This uses the Tai Tham script, whose support has been enhanced.
 
+*** New language environment "Brahmi".
+This language environment supports Brahmi, which is a historical
+script that was used in ancient South Asia.
+
 \f
 * Changes in Specialized Modes and Packages in Emacs 29.1
 
index 1950a409354c05e1ee5cea3d2ff94f614d29c774..883f08905e9786ba3ff739e8f7c8882a931abb27 100644 (file)
        (chorasmian #x10FB0)
        (elymaic #x10FE0)
        (old-uyghur #x10F70)
+        (brahmi #x11013 #x11045 #x11052 #x11065)
        (mahajani #x11150)
        (khojki #x11200)
        (khudawadi #x112B0)
                     chorasmian
                    elymaic
                     old-uyghur
+                    brahmi
                    makasar
                     dives-akuru
                    cuneiform
index e0adb0de6c3f80edcdff9b52edd2d376a3cc8a3b..310905534e63a5eaa9a06e5f7cfdb236ac483662 100644 (file)
@@ -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