From: "समीर सिंह Sameer Singh" <lumarzeli30@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Add the Kaithi script to Emacs
Date: Sat, 7 May 2022 17:16:58 +0530 [thread overview]
Message-ID: <CAOR1sLx0EghtRqmr8zossJqkxBJb8MQGZfeCiYyFuDSsuqm0Zg@mail.gmail.com> (raw)
In-Reply-To: <83pmkpzxsx.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 3778 bytes --]
Thanks a lot for the feedback!
I have made the necessary changes, please review them.
On Sat, May 7, 2022 at 11:31 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: समीर सिंह Sameer Singh
> > <lumarzeli30@gmail.com>
> > Date: Sat, 7 May 2022 02:32:06 +0530
> >
> > I have added the Kaithi script this time.
> > Please check for any mistakes
>
> Thanks.
>
> > diff --git a/etc/HELLO b/etc/HELLO
> > index dbbcc0493b..351e2dc4cd 100644
> > --- a/etc/HELLO
> > +++ b/etc/HELLO
> > @@ -59,6 +59,8 @@ Hindi (हिंदी) नमस्ते / नमस्कार ।
> > Inuktitut (ᐃᓄᒃᑎᑐᑦ) ᐊᐃ
> > Italian (italiano) Ciao / Buon giorno
> > Javanese (ꦧꦱꦗꦮꦶ) console.log("ꦲꦭꦺꦴ");
> > +
> > +Kaithi (𑂍𑂶𑂟𑂲) 𑂩𑂰𑂧𑂩𑂰𑂧
>
> The text in parenthesis should be the name of the script spelled in
> the script itself, followed by a single TAB, and then one or more
> greetings in language(s) that use(s) the script. Does the above
> follow this pattern? I see that you used spaces instead of TAB, which
> is incorrect.
>
> > +*** New language environment "Kaithi".
> > +This language environment supports Kaithi or Kayasthi, which was
> > +an important writing system of the past mainly used for administrative
> > +purposes. A new input method, 'kaithi', is provided to type text in
>
> Please leave 2 spaces between sentences in documentation, per US
> English rules we use.
>
> > diff --git a/lisp/international/fontset.el
> b/lisp/international/fontset.el
> > index 883f08905e..5bfa085b1b 100644
> > --- a/lisp/international/fontset.el
> > +++ b/lisp/international/fontset.el
> > @@ -232,6 +232,7 @@ font-encoding-charset-alist
> > (elymaic #x10FE0)
> > (old-uyghur #x10F70)
> > (brahmi #x11013 #x11045 #x11052 #x11065)
> > + (kaithi #x1108D)
>
> Is a single character enough to accept a font as having good coverage
> of Kaithi? If not, you can request more than one, like I did for
> Brahmi.
>
> > @@ -599,6 +600,7 @@ setup-default-fontset
> > (sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil
> (akhn))))
> > (malayalam ,(font-spec :registry "iso10646-1" :otf '(mlm2 nil
> (akhn)))
> > ,(font-spec :registry "iso10646-1" :otf '(mlym nil
> (akhn))))
> > + (kaithi ,(font-spec :registry "iso10646-1" :otf '(kthi nil
> (rphf))))
>
> Is the rphf feature indeed needed for Kaithi? If not, just add kaithi
> to the list of "simple scripts" that starts around line 736 in
> fontset.el, and the code there will do the rest.
>
> > + (documentation . "\
> > +Such languages which used Kaithi script such as Awadhi, Bhojpuri,
> Magahi and
> > +Maithili are supported in this language environment."))
>
> "Such languages ... such as" is awkward English; please rephrase this
> doc string.
>
> > + (set-char-table-range composition-function-table
> > + '(#x110B0 . #x110BA)
> > + (list (vector
> > + (concat consonant nukta "?\\(?:" virama
> consonant nukta "?\\)*\\(?:" virama "\\|" vowel "*" nukta "?"
> anusvara-candrabindu "?\\)")
>
> Please break and reindent this long line to make it more readable.
>
> > +("`c" #x200C) ; ZWNJ
> > +("`C" #x200D) ; ZWJ
>
> Are these zero-width characters used for writing in Kaithi? If so,
> should the composition rules be augmented with some rules that
> mentions them? At least ZWJ, if it has any role, should probably be
> mentioned; ZWNJ most probably does its job by just being there and
> preventing the other composition rules from taking effect.
>
> Thanks.
>
[-- Attachment #1.2: Type: text/html, Size: 4738 bytes --]
[-- Attachment #2: 0001-Add-the-Kaithi-script-to-Emacs.patch --]
[-- Type: text/x-patch, Size: 7204 bytes --]
From a2d472cd8c30dd3eca54f514e3e89d239abb881a 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?= <lumarzeli30@gmail.com>
Date: Wed, 4 May 2022 18:10:06 +0530
Subject: [PATCH 1/2] Add the Kaithi script to Emacs
* lisp/language/indian.el ("Kaithi"): New language environment.
Add composition rules for Kaithi.
Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Kaithi.
* lisp/leim/quail/indian.el ("kaithi"): New input method.
* etc/HELLO: Add a Kaithi greeting.
* etc/NEWS: Announce the new language environment and its input method.
---
etc/HELLO | 2 +
etc/NEWS | 6 ++
lisp/international/fontset.el | 2 +
lisp/language/indian.el | 36 ++++++++++++
lisp/leim/quail/indian.el | 101 ++++++++++++++++++++++++++++++++++
5 files changed, 147 insertions(+)
diff --git a/etc/HELLO b/etc/HELLO
index dbbcc0493b..351e2dc4cd 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -59,6 +59,8 @@ Hindi (हिंदी) नमस्ते / नमस्कार ।
Inuktitut (ᐃᓄᒃᑎᑐᑦ) ᐊᐃ
Italian (italiano) Ciao / Buon giorno
Javanese (ꦧꦱꦗꦮꦶ) console.log("ꦲꦭꦺꦴ");
+
+Kaithi (𑂍𑂶𑂟𑂲) 𑂩𑂰𑂧𑂩𑂰𑂧
Kannada (ಕನ್ನಡ) ನಮಸ್ಕಾರ
Khmer (ភាសាខ្មែរ) ជំរាបសួរ
Lakota (Lakȟotiyapi) Taŋyáŋ yahí!
diff --git a/etc/NEWS b/etc/NEWS
index 15c7ce8a90..36a8329658 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -704,6 +704,12 @@ This language environment supports Brahmi, which is a historical
script that was used in ancient South Asia. A new input method,
'brahmi', is provided to type text in this script.
+*** New language environment "Kaithi".
+This language environment supports Kaithi or Kayasthi, which was
+an important writing system of the past mainly used for administrative
+purposes. A new input method, 'kaithi', is provided to type text in
+this script.
+
\f
* Changes in Specialized Modes and Packages in Emacs 29.1
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 883f08905e..5bfa085b1b 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -232,6 +232,7 @@ font-encoding-charset-alist
(elymaic #x10FE0)
(old-uyghur #x10F70)
(brahmi #x11013 #x11045 #x11052 #x11065)
+ (kaithi #x1108D)
(mahajani #x11150)
(khojki #x11200)
(khudawadi #x112B0)
@@ -599,6 +600,7 @@ setup-default-fontset
(sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn))))
(malayalam ,(font-spec :registry "iso10646-1" :otf '(mlm2 nil (akhn)))
,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn))))
+ (kaithi ,(font-spec :registry "iso10646-1" :otf '(kthi nil (rphf))))
(burmese ,(font-spec :registry "iso10646-1" :otf '(mym2 nil nil))
,(font-spec :registry "iso10646-1" :otf '(mymr nil nil))
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index c3d59b6f77..82a392e856 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -136,6 +136,17 @@ 'devanagari
The ancient Brahmi script is supported in this language environment."))
'("Indian")) ; Should we have an "Old" category?
+(set-language-info-alist
+ "Kaithi" '((charset unicode)
+ (coding-system utf-8)
+ (coding-priority utf-8)
+ (input-method . "kaithi")
+ (sample-text . "Kaithi (𑂍𑂶𑂟𑂲) 𑂩𑂰𑂧𑂩𑂰𑂧")
+ (documentation . "\
+Such languages which used Kaithi script such as Awadhi, Bhojpuri, Magahi and
+Maithili are supported in this language environment."))
+ '("Indian"))
+
;; Replace mnemonic characters in REGEXP according to TABLE. TABLE is
;; an alist of (MNEMONIC-STRING . REPLACEMENT-STRING).
@@ -421,6 +432,31 @@ malayalam-composable-pattern
(concat multiplier number-joiner numeral)
1 'font-shape-gstring))))
+;; Kaithi composition rules
+(let ((consonant "[\x1108D-\x110AF]")
+ (nukta "\x110BA")
+ (vowel "[\x1108D-\x110C2]")
+ (anusvara-candrabindu "[\x11080\x11081]")
+ (virama "\x110B9")
+ (number-sign "\x110BD")
+ (number-sign-above "\x110CD")
+ (numerals "[\x966-\x96F]+"))
+ (set-char-table-range composition-function-table
+ '(#x110B0 . #x110BA)
+ (list (vector
+ (concat consonant nukta "?\\(?:" virama consonant nukta "?\\)*\\(?:" virama "\\|" vowel "*" nukta "?" anusvara-candrabindu "?\\)")
+ 1 'font-shape-gstring)))
+ (set-char-table-range composition-function-table
+ '(#x110BD . #x110BD)
+ (list (vector
+ (concat number-sign numerals)
+ 0 'font-shape-gstring)))
+ (set-char-table-range composition-function-table
+ '(#x110CD . #x110CD)
+ (list (vector
+ (concat number-sign-above numerals)
+ 0 'font-shape-gstring))))
+
(provide 'indian)
;;; indian.el ends here
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el
index f2d5f9bad4..a52d44bc08 100644
--- a/lisp/leim/quail/indian.el
+++ b/lisp/leim/quail/indian.el
@@ -835,5 +835,106 @@ "||"
("`/" ?𑁿)
)
+(quail-define-package
+ "kaithi" "Kaithi" "𑂍𑂶" t "Kaithi phonetic input method.
+
+ `\\=`' is used to switch levels instead of Alt-Gr.
+" nil t t t t nil nil nil nil nil t)
+
+(quail-define-rules
+("``" ?₹)
+("1" ?१)
+("`1" ?1)
+("2" ?२)
+("`2" ?2)
+("3" ?३)
+("`3" ?3)
+("4" ?४)
+("`4" ?4)
+("5" ?५)
+("`5" ?5)
+("6" ?६)
+("`6" ?6)
+("7" ?७)
+("`7" ?7)
+("8" ?८)
+("`8" ?8)
+("9" ?९)
+("0" ?०)
+("`0" ?0)
+("`\)" ?𑂻)
+("`\\" ?𑃀)
+("`|" ?𑃁)
+("`" ?𑂗)
+("q" ?𑂗)
+("Q" ?𑂘)
+("w" ?𑂙)
+("W" ?𑂛)
+("`w" ?𑂚)
+("`W" ?𑂜)
+("e" ?𑂵)
+("E" ?𑂶)
+("`e" ?𑂉)
+("`E" ?𑂊)
+("r" ?𑂩)
+("R" ?𑃂)
+("t" ?𑂞)
+("T" ?𑂟)
+("y" ?𑂨)
+("Y" ?⸱)
+("u" ?𑂳)
+("U" ?𑂴)
+("`u" ?𑂇)
+("`U" ?𑂈)
+("i" ?𑂱)
+("I" ?𑂲)
+("`i" ?𑂅)
+("`I" ?𑂆)
+("o" ?𑂷)
+("O" ?𑂸)
+("`o" ?𑂋)
+("`O" ?𑂌)
+("p" ?𑂣)
+("P" ?𑂤)
+("a" ?𑂰)
+("A" ?𑂄)
+("`a" ?𑂃)
+("s" ?𑂮)
+("S" ?𑂬)
+("d" ?𑂠)
+("D" ?𑂡)
+("`d" ?𑂼)
+("`D" #x110BD) ; Kaithi Number Sign
+("f" ?𑂹)
+("F" #x110CD) ; Kaithi Number Sign Above
+("`f" ?𑂾)
+("`F" ?𑂿)
+("g" ?𑂏)
+("G" ?𑂐)
+("h" ?𑂯)
+("H" ?𑂂)
+("j" ?𑂔)
+("J" ?𑂕)
+("k" ?𑂍)
+("K" ?𑂎)
+("l" ?𑂪)
+("z" ?𑂖)
+("Z" ?𑂑)
+("x" ?𑂭)
+("X" ?𑂺)
+("c" ?𑂒)
+("C" ?𑂓)
+("`c" #x200C) ; ZWNJ
+("`C" #x200D) ; ZWJ
+("v" ?𑂫)
+("b" ?𑂥)
+("B" ?𑂦)
+("n" ?𑂢)
+("N" ?𑂝)
+("m" ?𑂧)
+("M" ?𑂁)
+("`m" ?𑂀)
+)
+
;;; indian.el ends here
--
2.36.0
[-- Attachment #3: 0002-Improve-Kaithi-support-in-Emacs.patch --]
[-- Type: text/x-patch, Size: 4774 bytes --]
From fdc687cae42e0eac948bd0968dc083c32326b420 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?= <lumarzeli30@gmail.com>
Date: Sat, 7 May 2022 16:58:35 +0530
Subject: [PATCH 2/2] Improve Kaithi support in Emacs
* lisp/language/indian.el
Rephrase the Kaithi documentation to make it less awkward.
Add zwj support to Kaithi.
* lisp/international/fontset.el
(script-representative-chars) Add more chars to Kaithi.
(setup-default-fontset) Add Kaithi to the simple scripts.
* etc/HELLO
Replace spaces with tab in the Kaithi greeting.
* etc/NEWS
Add two spaces instead of one between sentences in the Kaithi announcement.
---
etc/HELLO | 2 +-
etc/NEWS | 2 +-
lisp/international/fontset.el | 4 ++--
lisp/language/indian.el | 18 ++++++++++--------
4 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/etc/HELLO b/etc/HELLO
index 351e2dc4cd..ac0cb823ea 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -60,7 +60,7 @@ Inuktitut (ᐃᓄᒃᑎᑐᑦ) ᐊᐃ
Italian (italiano) Ciao / Buon giorno
Javanese (ꦧꦱꦗꦮꦶ) console.log("ꦲꦭꦺꦴ");
-Kaithi (𑂍𑂶𑂟𑂲) 𑂩𑂰𑂧𑂩𑂰𑂧
+Kaithi (𑂍𑂶𑂟𑂲) 𑂩𑂰𑂧𑂩𑂰𑂧
Kannada (ಕನ್ನಡ) ನಮಸ್ಕಾರ
Khmer (ភាសាខ្មែរ) ជំរាបសួរ
Lakota (Lakȟotiyapi) Taŋyáŋ yahí!
diff --git a/etc/NEWS b/etc/NEWS
index 36a8329658..d8dc5c2f41 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -707,7 +707,7 @@ script that was used in ancient South Asia. A new input method,
*** New language environment "Kaithi".
This language environment supports Kaithi or Kayasthi, which was
an important writing system of the past mainly used for administrative
-purposes. A new input method, 'kaithi', is provided to type text in
+purposes. A new input method, 'kaithi', is provided to type text in
this script.
\f
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 5bfa085b1b..66f5068cf7 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -232,7 +232,7 @@ font-encoding-charset-alist
(elymaic #x10FE0)
(old-uyghur #x10F70)
(brahmi #x11013 #x11045 #x11052 #x11065)
- (kaithi #x1108D)
+ (kaithi #x1108D #x110B0 #x110BD)
(mahajani #x11150)
(khojki #x11200)
(khudawadi #x112B0)
@@ -600,7 +600,6 @@ setup-default-fontset
(sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn))))
(malayalam ,(font-spec :registry "iso10646-1" :otf '(mlm2 nil (akhn)))
,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn))))
- (kaithi ,(font-spec :registry "iso10646-1" :otf '(kthi nil (rphf))))
(burmese ,(font-spec :registry "iso10646-1" :otf '(mym2 nil nil))
,(font-spec :registry "iso10646-1" :otf '(mymr nil nil))
@@ -774,6 +773,7 @@ setup-default-fontset
elymaic
old-uyghur
brahmi
+ kaithi
makasar
dives-akuru
cuneiform
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 82a392e856..830f3bf8f9 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -433,18 +433,20 @@ malayalam-composable-pattern
1 'font-shape-gstring))))
;; Kaithi composition rules
-(let ((consonant "[\x1108D-\x110AF]")
- (nukta "\x110BA")
- (vowel "[\x1108D-\x110C2]")
+(let ((consonant "[\x1108D-\x110AF]")
+ (nukta "\x110BA")
+ (vowel "[\x1108D-\x110C2]")
(anusvara-candrabindu "[\x11080\x11081]")
- (virama "\x110B9")
- (number-sign "\x110BD")
- (number-sign-above "\x110CD")
- (numerals "[\x966-\x96F]+"))
+ (virama "\x110B9")
+ (number-sign "\x110BD")
+ (number-sign-above "\x110CD")
+ (numerals "[\x966-\x96F]+")
+ (zwj "\x200D"))
(set-char-table-range composition-function-table
'(#x110B0 . #x110BA)
(list (vector
- (concat consonant nukta "?\\(?:" virama consonant nukta "?\\)*\\(?:" virama "\\|" vowel "*" nukta "?" anusvara-candrabindu "?\\)")
+ (concat consonant nukta "?\\(?:" virama zwj "?" consonant nukta "?\\)*\\(?:"
+ virama zwj "?\\|" vowel "*" nukta "?" anusvara-candrabindu "?\\)")
1 'font-shape-gstring)))
(set-char-table-range composition-function-table
'(#x110BD . #x110BD)
--
2.36.0
next prev parent reply other threads:[~2022-05-07 11:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 21:02 [PATCH] Add the Kaithi script to Emacs समीर सिंह Sameer Singh
2022-05-07 6:01 ` Eli Zaretskii
2022-05-07 11:46 ` समीर सिंह Sameer Singh [this message]
2022-05-07 12:07 ` Eli Zaretskii
2022-05-07 12:30 ` समीर सिंह Sameer Singh
2022-05-07 13:23 ` Eli Zaretskii
2022-05-07 13:27 ` समीर सिंह Sameer Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOR1sLx0EghtRqmr8zossJqkxBJb8MQGZfeCiYyFuDSsuqm0Zg@mail.gmail.com \
--to=lumarzeli30@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).