Subject: [PATCH] Add support for the Rejang script
From: समीर सिंह Sameer Singh<[email-masked]>
To: [email-masked]
Date: Mon, 30 May 2022 07:52:59 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

This time the Rejang script is added to Emacs.

Please review the patch.
Thank You.
From 12a368cc9d2e9f129631d265db62a0cd1f340500 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0=20=E0=A4=B8=E0=A4=BF?=
 =?UTF-8?q?=E0=A4=82=E0=A4=B9=20Sameer=20Singh?= <[email-masked]>
Date: Mon, 30 May 2022 07:48:45 +0530
Subject: [PATCH] Add support for the Rejang script

* lisp/language/indonesian.el ("Rejang"): New language environment.
Add composition rules for Rejang.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Rejang.
* lisp/leim/quail/indonesian.el ("rejang"): New input method.

* etc/HELLO: Add a Rejang greeting.
* etc/NEWS: Announce the new language environment.
---
 etc/HELLO                     |  1 +
 etc/NEWS                      |  1 +
 lisp/international/fontset.el |  2 ++
 lisp/language/indonesian.el   | 22 ++++++++++++++++++
 lisp/leim/quail/indonesian.el | 43 +++++++++++++++++++++++++++++++++++
 5 files changed, 69 insertions(+)

diff --git a/etc/HELLO b/etc/HELLO
index 7f49c613f6..39cf6c7504 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -83,6 +83,7 @@ Northern Thai (ᨣᩣᩴᨾᩮᩬᩥᨦ / ᨽᩣᩈᩣᩃ᩶ᩣ᩠ᨶᨶᩣ)	ᩈ
 Norwegian (norsk)	Hei / God dag
 Odia (ଓଡ଼ିଆ)	ନମସ୍କାର
 Polish  (język polski)	Dzień dobry! / Cześć!
+Rejang (ꥆꤰ꥓ꤼꤽ ꤽꥍꤺꥏ)	ꤸꥉꥐꤺꥉꥂꥎ
 Russian (русский)	Здра́вствуйте!
 Sharada (𑆯𑆳𑆫𑆢𑆳)	𑆤𑆩𑆱𑇀𑆑𑆳𑆫
 Siddham (𑖭𑖰𑖟𑖿𑖠𑖽)	𑖡𑖦𑖫𑖿𑖝𑖸
diff --git a/etc/NEWS b/etc/NEWS
index 5987acdac9..1d37bb84c6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -837,6 +837,7 @@ corresponding language environments are:
 **** Javanese script and language environment
 **** Sundanese script and language environment
 **** Batak script and language environment
+**** Rejang script and language environment
 
 ---
 *** The "Oriya" language environment was renamed to "Odia".
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index bf4b9b578e..0c008f90b7 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -205,6 +205,7 @@ font-encoding-charset-alist
 	(han #x5B57)
 	(yi #xA288)
         (syloti-nagri #xA807 #xA823 #xA82C)
+        (rejang #xA930 #xA947 #xA95F)
 	(javanese #xA98F #xA9B4 #xA9CA)
 	(cham #xAA00)
 	(tai-viet #xAA80)
@@ -768,6 +769,7 @@ setup-default-fontset
 		    braille
 		    yi
                     syloti-nagri
+                    rejang
                     javanese
 		    tai-viet
 		    aegean-number
diff --git a/lisp/language/indonesian.el b/lisp/language/indonesian.el
index c65c1cd5d0..efc7b73904 100644
--- a/lisp/language/indonesian.el
+++ b/lisp/language/indonesian.el
@@ -64,6 +64,15 @@
 Languages that use the Batak script, such as Karo, Toba, Pakpak, Mandailing
 and Simalungun, are supported in this language environment.")))
 
+(set-language-info-alist
+ "Rejang" '((charset unicode)
+            (coding-system utf-8)
+            (coding-priority utf-8)
+            (input-method . "rejang")
+            (sample-text . "Rejang (ꥆꤰ꥓ꤼꤽ ꤽꥍꤺꥏ)    ꤸꥉꥐꤺꥉꥂꥎ")
+            (documentation . "\
+Rejang language and its script are supported in this language environment.")))
+
 ;; Balinese composition rules
 (let ((consonant            "[\x1B13-\x1B33\x1B45-\x1B4B]")
       (independent-vowel    "[\x1B05-\x1B12]")
@@ -143,5 +152,18 @@
                                        "?" dependant-consonant "?")
                                1 'font-shape-gstring))))
 
+;; Rejang composition rules
+(let ((akshara              "[\xA930-\xA946]")
+      (vowel                "[\xA947-\xA94E]")
+      (dependant-consonant  "[\xA94F\xA952]")
+      (virama               "\xA953"))
+  (set-char-table-range composition-function-table
+                        '(#xA947 . #xA953)
+                        (list (vector
+                               ;; Akshara based syllables
+                               (concat akshara virama "?" vowel "*"
+                                       dependant-consonant "?")
+                               1 'font-shape-gstring))))
+
 (provide 'indonesian)
 ;;; indonesian.el ends here
diff --git a/lisp/leim/quail/indonesian.el b/lisp/leim/quail/indonesian.el
index fd232c4f71..206bcfc5fe 100644
--- a/lisp/leim/quail/indonesian.el
+++ b/lisp/leim/quail/indonesian.el
@@ -443,5 +443,48 @@
  ("M"  ?ᯕ)
  ("`m" ?ᯣ))
 
+(quail-define-package
+   "rejang" "Rejang" "ꤽꥍ" nil "Rejang phonetic input method."
+   nil t t t t nil nil nil nil nil t)
+
+(quail-define-rules
+ ("q" ?꥟)
+ ("w" ?ꥀ)
+ ("e" ?ꥉ)
+ ("E" ?ꥊ)
+ ("r" ?ꤽ)
+ ("R" ?ꥑ)
+ ("t" ?ꤳ)
+ ("y" ?ꤿ)
+ ("u" ?ꥈ)
+ ("U" ?ꥍ)
+ ("i" ?ꥇ)
+ ("o" ?ꥋ)
+ ("O" ?ꥌ)
+ ("p" ?ꤶ)
+ ("a" ?ꥆ)
+ ("A" ?ꥎ)
+ ("s" ?ꤼ)
+ ("d" ?ꤴ)
+ ("D" ?ꥄ)
+ ("f" ?꥓)
+ ("F" ?ꥃ)
+ ("g" ?ꤱ)
+ ("h" ?ꥁ)
+ ("H" ?ꥒ)
+ ("j" ?ꤺ)
+ ("k" ?ꤰ)
+ ("l" ?ꤾ)
+ ("z" ?ꤲ)
+ ("Z" ?ꥏ)
+ ("x" ?ꤻ)
+ ("X" ?ꥅ)
+ ("c" ?ꤹ)
+ ("b" ?ꤷ)
+ ("n" ?ꤵ)
+ ("N" ?ꥐ)
+ ("m" ?ꤸ)
+ ("M" ?ꥂ))
+
 (provide 'indonesian)
 ;;; indonesian.el ends here
-- 
2.36.1