GNU bug report logs - #55782
[PATCH] Add support for the Grantha script

Previous Next

Package: emacs;

Reported by: समीर सिंह Sameer Singh <lumarzeli30 <at> gmail.com>

Date: Fri, 3 Jun 2022 12:52:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: समीर सिंह Sameer Singh
 <lumarzeli30 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 55782 <at> debbugs.gnu.org
Subject: bug#55782: [PATCH] Add support for the Grantha script
Date: Fri, 3 Jun 2022 19:40:30 +0530
[Message part 1 (text/plain, inline)]
>
> 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 <at> gnu.org> wrote:

> > From: समीर सिंह Sameer Singh
> >  <lumarzeli30 <at> 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.
>
[Message part 2 (text/html, inline)]
[0001-Add-support-for-the-Grantha-script.patch (text/x-patch, attachment)]

This bug report was last modified 3 years and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.