From: "समीर सिंह Sameer Singh" <lumarzeli30@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 55782@debbugs.gnu.org
Subject: bug#55782: [PATCH] Add support for the Grantha script
Date: Fri, 3 Jun 2022 19:40:30 +0530 [thread overview]
Message-ID: <CAOR1sLypAYhremaEc2YrcObhjA4gCbKh6=16HP4QPAKZ8cZPRQ@mail.gmail.com> (raw)
In-Reply-To: <83czfpdgbm.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 4606 bytes --]
>
> This part is IMO a mistake: since there are no known fonts that
> support both the Tamil block and the Tamil Supplement block, adding
> the characters from the Supplement block to
> script-representative-chars might cause Emacs to reject a good Tamil
> font because it doesn't support the character from the Supplement
> block. We could use a vector instead of a list, but even that could
> cause undesired consequences, whereby Emacs selects a font for Tamil
> characters when it only supports Tamil Supplement, or vice versa.
>
> I think adding Noto Sans Tamil Supplement to the default fontset is
> for now the most we can do about the Tamil Supplement block.
Also, "which use" is slightly misleading, I think: at least Sanskrit
> also uses other scripts, doesn't it? If so, I'd suggest saying "when
> they use the Grantha script" instead.
>
Corrected
Some sequences that match the regexp will not be composed, according
> to this rule. For example, the sequence
>
> consonant vowel
>
> won't be composed, because its second character is not in the range
> '(#x1133B . #x1134D). Is that okay? Or are you relying on the
> default composition of combining characters?
>
Yes, three vowel signs are not in the range, because they compose correctly
by default.
I have attached the new patch, please review this
Thank you
On Fri, Jun 3, 2022 at 7:00 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: समीर सिंह Sameer Singh
> > <lumarzeli30@gmail.com>
> > Date: Fri, 3 Jun 2022 18:21:08 +0530
> >
> > Add tamil supplement codepoints to (tamil).
> [...]
> > - (tamil #xB95)
> > + (tamil #xB95 #x11FC0 #x11FC6)
>
> This part is IMO a mistake: since there are no known fonts that
> support both the Tamil block and the Tamil Supplement block, adding
> the characters from the Supplement block to
> script-representative-chars might cause Emacs to reject a good Tamil
> font because it doesn't support the character from the Supplement
> block. We could use a vector instead of a list, but even that could
> cause undesired consequences, whereby Emacs selects a font for Tamil
> characters when it only supports Tamil Supplement, or vice versa.
>
> I think adding Noto Sans Tamil Supplement to the default fontset is
> for now the most we can do about the Tamil Supplement block.
>
> > +(set-language-info-alist
> > + "Grantha" '((charset unicode)
> > + (coding-system utf-8)
> > + (coding-priority utf-8)
> > + (input-method . "grantha")
> > + (sample-text . "Grantha (𑌗𑍍𑌰𑌨𑍍𑌥) 𑌨𑌮𑌸𑍍𑌤𑍇")
> > + (documentation . "\
> > +Languages such as Sanskrit and Manipravalam which uses the
> ^^^^
> "use", in plural.
>
> Also, "which use" is slightly misleading, I think: at least Sanskrit
> also uses other scripts, doesn't it? If so, I'd suggest saying "when
> they use the Grantha script" instead.
>
> > +;; Grantha composition rules
> > +(let ((consonant "[\x11315-\x11339]")
> > + (nukta "\x1133C")
> > + (independent-vowel "[\x11305-\x11314\x11360\x11361]")
> > + (vowel "[\x1133E-\x1134C\x11357\x11362\x11363]")
> > + (nasal "[\x11300-\x11302]")
> > + (bindu "\x1133B")
> > + (visarga "\x11303")
> > + (virama "\x1134D")
> > + (avagraha "\x1133D")
> > + (modifier-above "[\x11366-\x11374]"))
> > + (set-char-table-range composition-function-table
> > + '(#x1133B . #x1134D)
> > + (list (vector
> > + ;; Consonant based syllables
> > + (concat consonant nukta "?" "\\(?:"
> virama consonant nukta
> > + "?\\)*\\(?:" virama "\\|" vowel
> "*" nukta "?" nasal
> > + "?" bindu "?" visarga "?"
> modifier-above "?"
> > + avagraha "?\\)")
> > + 1 'font-shape-gstring)
>
> Some sequences that match the regexp will not be composed, according
> to this rule. For example, the sequence
>
> consonant vowel
>
> won't be composed, because its second character is not in the range
> '(#x1133B . #x1134D). Is that okay? Or are you relying on the
> default composition of combining characters?
>
> Thanks.
>
[-- Attachment #1.2: Type: text/html, Size: 6395 bytes --]
[-- Attachment #2: 0001-Add-support-for-the-Grantha-script.patch --]
[-- Type: text/x-patch, Size: 7276 bytes --]
From 9af7beecaebf7a7a1817c37f7233f368c20e3bbc 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, 1 Jun 2022 22:29:24 +0530
Subject: [PATCH] Add support for the Grantha script
* lisp/language/indian.el ("Grantha"): New language environment.
Add composition rules for Grantha. Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Grantha.
* lisp/leim/quail/indian.el ("grantha"): New input method.
* etc/HELLO: Add two Grantha greetings.
* etc/NEWS: Announce the new language environment.
---
etc/HELLO | 1 +
etc/NEWS | 1 +
lisp/international/fontset.el | 3 +-
lisp/language/indian.el | 38 +++++++++++
lisp/leim/quail/indian.el | 115 ++++++++++++++++++++++++++++++++++
5 files changed, 157 insertions(+), 1 deletion(-)
diff --git a/etc/HELLO b/etc/HELLO
index 4148183949..6694501a7d 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -56,6 +56,7 @@ Finnish (suomi) Hei / Hyvää päivää
French (français) Bonjour / Salut
Georgian (ქართული) გამარჯობა
German (Deutsch) Guten Tag / Grüß Gott
+Grantha (𑌗𑍍𑌰𑌨𑍍𑌥) 𑌨𑌮𑌸𑍍𑌤𑍇 / 𑌨𑌮𑌸𑍍𑌕𑌾𑌰𑌃
Greek (ελληνικά) Γειά σας
Greek, ancient (ἑλληνική) Οὖλέ τε καὶ μέγα χαῖρε
Gujarati (ગુજરાતી) નમસ્તે
diff --git a/etc/NEWS b/etc/NEWS
index 54bc6d80e1..cc378d929c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -850,6 +850,7 @@ corresponding language environments are:
**** Makasar script and language environment
**** Lontara script and language environment
**** Hanifi Rohingya script and language environment
+**** Grantha 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 2c54c86ab7..74be7edc64 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -250,7 +250,7 @@ font-encoding-charset-alist
(sharada #x11191 #x111B3 #x111CD)
(khojki #x11200)
(khudawadi #x112B0)
- (grantha #x11305)
+ (grantha #x11315 #x1133E #x11374)
(newa #x11400)
(tirhuta #x11481 #x1148F #x114D0)
(siddham #x1158E #x115AF #x115D4)
@@ -801,6 +801,7 @@ setup-default-fontset
brahmi
kaithi
sharada
+ grantha
tirhuta
siddham
modi
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 4dfad75275..9329b43fea 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -233,6 +233,17 @@ 'devanagari
language environment."))
'("Indian"))
+(set-language-info-alist
+ "Grantha" '((charset unicode)
+ (coding-system utf-8)
+ (coding-priority utf-8)
+ (input-method . "grantha")
+ (sample-text . "Grantha (𑌗𑍍𑌰𑌨𑍍𑌥) 𑌨𑌮𑌸𑍍𑌤𑍇 / 𑌨𑌮𑌸𑍍𑌕𑌾𑌰𑌃")
+ (documentation . "\
+Languages such as Sanskrit and Manipravalam, when they use the
+Grantha script, are supported in this language environment."))
+ '("Indian"))
+
;; Replace mnemonic characters in REGEXP according to TABLE. TABLE is
;; an alist of (MNEMONIC-STRING . REPLACEMENT-STRING).
@@ -696,5 +707,32 @@ malayalam-composable-pattern
"?" vowel "?" other-signs "?")
1 'font-shape-gstring))))
+;; Grantha composition rules
+(let ((consonant "[\x11315-\x11339]")
+ (nukta "\x1133C")
+ (independent-vowel "[\x11305-\x11314\x11360\x11361]")
+ (vowel "[\x1133E-\x1134C\x11357\x11362\x11363]")
+ (nasal "[\x11300-\x11302]")
+ (bindu "\x1133B")
+ (visarga "\x11303")
+ (virama "\x1134D")
+ (avagraha "\x1133D")
+ (modifier-above "[\x11366-\x11374]"))
+ (set-char-table-range composition-function-table
+ '(#x1133B . #x1134D)
+ (list (vector
+ ;; Consonant based syllables
+ (concat consonant nukta "?" "\\(?:" virama consonant nukta
+ "?\\)*\\(?:" virama "\\|" vowel "*" nukta "?" nasal
+ "?" bindu "?" visarga "?" modifier-above "?"
+ avagraha "?\\)")
+ 1 'font-shape-gstring)
+ (vector
+ ;; Vowels based syllables
+ (concat independent-vowel nukta "?" virama "?" vowel "?"
+ nasal "?" bindu "?" visarga "?" modifier-above
+ "?" avagraha "?")
+ 1 'font-shape-gstring))))
+
(provide 'indian)
;;; indian.el ends here
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el
index 031c30aabb..6a3582e83d 100644
--- a/lisp/leim/quail/indian.el
+++ b/lisp/leim/quail/indian.el
@@ -1656,4 +1656,119 @@ "||"
("`?" ?᥅)
)
+(quail-define-package
+ "grantha" "Grantha" "𑌗𑍍𑌰" t "Grantha 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" ?௯)
+ ("`9" ?9)
+ ("0" ?௦)
+ ("`0" ?0)
+ ("q" ?𑌟)
+ ("Q" ?𑌠)
+ ("`q" ?𑍐)
+ ("`Q" ?𑍝)
+ ("w" ?𑌡)
+ ("W" ?𑌢)
+ ("`w" ?𑍞)
+ ("`W" ?𑍟)
+ ("e" ?𑍇)
+ ("E" ?𑍈)
+ ("`e" ?𑌏)
+ ("`E" ?𑌐)
+ ("r" ?𑌰)
+ ("R" ?𑍃)
+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at|nested] mbox.gz Atom feed top
2022-06-03 12:51 bug#55782: [PATCH] Add support for the Grantha script समीर सिंह Sameer Singh
2022-06-03 13:31 ` Eli Zaretskii
2022-06-03 14:10 ` समीर सिंह Sameer Singh [this message]
2022-06-04 8:32 ` Eli Zaretskii
2022-06-04 11:56 ` समीर सिंह Sameer Singh
2022-06-04 13:45 ` Eli Zaretskii
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='CAOR1sLypAYhremaEc2YrcObhjA4gCbKh6=16HP4QPAKZ8cZPRQ@mail.gmail.com' \
--to=lumarzeli30@gmail.com \
--cc=55782@debbugs.gnu.org \
--cc=eliz@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).