unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "समीर सिंह Sameer Singh" <lumarzeli30@gmail.com>
Cc: 55782@debbugs.gnu.org
Subject: bug#55782: [PATCH] Add support for the Grantha script
Date: Fri, 03 Jun 2022 16:31:09 +0300	[thread overview]
Message-ID: <83czfpdgbm.fsf@gnu.org> (raw)
In-Reply-To: <CAOR1sLxjf6t_CV06z8J0Gq75PqfW1GFz-_4=uueTDqohAy6Lqg@mail.gmail.com> (lumarzeli30@gmail.com)

> 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.





  reply	other threads:[~2022-06-03 13:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|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 [this message]
2022-06-03 14:10   ` समीर सिंह Sameer Singh
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=83czfpdgbm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=55782@debbugs.gnu.org \
    --cc=lumarzeli30@gmail.com \
    /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).