unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "समीर सिंह Sameer Singh" <lumarzeli30@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 55370@debbugs.gnu.org
Subject: bug#55370: [PATCH] Add support for the Syloti Nagri script
Date: Thu, 12 May 2022 20:36:49 +0530	[thread overview]
Message-ID: <CAOR1sLx6snSs6a4D0KNpR7ov-Q4rR8HXSS-8MVLFvxsZFSCN+A@mail.gmail.com> (raw)
In-Reply-To: <83bkw2q28v.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 5545 bytes --]

>
> Example of text that doesn't render correctly?
>

For example in tirhuta, when I do this:

;; Tirhuta composition rules
(let ((consonant            "[\x1148F-\x114AF]")
      (nukta                "\x114C3")
      (independent-vowel    "[\x11481-\x1148E]")
      (vowel                "[\x114B0-\x114BE]")
      (nasal                "[\x114BF\x114C0]")
      (virama               "\x114C2"))
  (set-char-table-range composition-function-table
                        '(#x114B0 . #x114BE)
                        (list (vector
                               ;; Consonant based syllables
                               (concat consonant nukta "?\\(?:" virama
consonant nukta "?\\)*\\(?:"
                                       virama "\\|" vowel "*" nukta "?"
nasal "?\\)")
                               1 'font-shape-gstring))))

Notice here, the nasal sign is not included in the range.
And then I type: 𑒅𑓀 𑒆𑒿
It is rendered correctly

But when I do:

;; Tirhuta composition rules
(let ((consonant            "[\x1148F-\x114AF]")
      (nukta                "\x114C3")
      (independent-vowel    "[\x11481-\x1148E]")
      (vowel                "[\x114B0-\x114BE]")
      (nasal                "[\x114BF\x114C0]")
      (virama               "\x114C2"))
  (set-char-table-range composition-function-table
                        '(#x114B0 . #x114C0)
                        (list (vector
                               ;; Consonant based syllables
                               (concat consonant nukta "?\\(?:" virama
consonant nukta "?\\)*\\(?:"
                                       virama "\\|" vowel "*" nukta "?"
nasal "?\\)")
                               1 'font-shape-gstring))))
The range now has the nasal signs.
And then type the above characters: 𑒅𑓀 𑒆𑒿
They are not rendered correctly

But when I include their composition rules:

;; Tirhuta composition rules
(let ((consonant            "[\x1148F-\x114AF]")
      (nukta                "\x114C3")
      (independent-vowel    "[\x11481-\x1148E]")
      (vowel                "[\x114B0-\x114BE]")
      (nasal                "[\x114BF\x114C0]")
      (virama               "\x114C2"))
  (set-char-table-range composition-function-table
                        '(#x114B0 . #x114C0)
                        (list (vector
                               ;; Consonant based syllables
                               (concat consonant nukta "?\\(?:" virama
consonant nukta "?\\)*\\(?:"
                                       virama "\\|" vowel "*" nukta "?"
nasal "?\\)")
                               1 'font-shape-gstring)
                              (vector
                               ;; Nasal vowels
                               (concat independent-vowel nasal "?")
                               1 'font-shape-gstring))))

They are now once more rendered correctly.

So my suggestion is to debug this and figure out why it hangs.  Maybe
> begin by posting the composition rules that you tried originally, and
> let's take it from there.
>

I think I found the problem, this was due to the independent vowel and
nasal rule, I will fix it later.

I don't think I understand this part, either.  Please elaborate.
>

You had said that since the range only contains vowel signs, (consonant +
nasal) rule does not apply, only (consonant + vowel + nasal) will.
I then said that (consonant + nasal) renders fine without a rule, but
(consonant + vowel + nasal) does not, therefore I had to add a rule for
that.

On Thu, May 12, 2022 at 7:31 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
> > Date: Thu, 12 May 2022 19:12:09 +0530
> > Cc: 55370@debbugs.gnu.org
> >
> > I have noticed that when there is no nasal sign in the range of the
> set-char-table-range function, it is rendered
> > correctly when alone with a consonant or an independent vowel.
> > But when it is added to the range, it is not displayed correctly, until
> and unless a composition rule is added
> > for it.
>
> Example of text that doesn't render correctly?
>
> > Sometimes for scripts like Syloti Nagri, Sharada and Kaithi these signs
> are not in a contiguous range with
> > virama and vowel signs (they are far away)
> > So when I add them to the range, Emacs starts to hang. (Maybe because
> the range is too big, or there are
> > unnecessary symbols like consonants there)
> > This is why I had decided to not include them, because they were still
> rendering fine.
> >
> > So should I leave them as it is, or make another set-char-table-range
> that includes only them?
>
> I cannot say, because I don't think I understand the issue.  In
> particular, Emacs should never hang due to this stuff.
>
> So my suggestion is to debug this and figure out why it hangs.  Maybe
> begin by posting the composition rules that you tried originally, and
> let's take it from there.
>
> >  Similarly here: this rule will never match if 'vowel' isn't present,
> >  because the second character of the matching sequence _must_ be a
> >  vowel, since that is what triggers the composition rule in the first
> >  place.  Am I missing something?
> >
> > Here too since consonant vowel nasal was not rendering I added the rule,
> maybe I should remove the "?"
> > after vowel.
> > (consonant nasal was rendering fine)
>
> I don't think I understand this part, either.  Please elaborate.
>

[-- Attachment #2: Type: text/html, Size: 7864 bytes --]

  reply	other threads:[~2022-05-12 15:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 15:01 bug#55370: [PATCH] Add support for the Syloti Nagri script समीर सिंह Sameer Singh
2022-05-12  7:10 ` Eli Zaretskii
2022-05-12 13:42   ` समीर सिंह Sameer Singh
2022-05-12 14:01     ` Eli Zaretskii
2022-05-12 15:06       ` समीर सिंह Sameer Singh [this message]
2022-05-12 16:29         ` Eli Zaretskii
2022-05-12 16:50           ` समीर सिंह Sameer Singh
2022-05-12 17:04             ` Eli Zaretskii
2022-05-12 17:10               ` समीर सिंह Sameer Singh
2022-05-12 17:25                 ` Eli Zaretskii
2022-05-12 17:28                   ` समीर सिंह Sameer Singh
2022-05-14 23:47                     ` समीर सिंह Sameer Singh
2022-05-15  6:16                       ` Eli Zaretskii
2022-05-15 13:40                         ` समीर सिंह Sameer Singh
2022-05-15 14:23                           ` Eli Zaretskii
2022-05-15 14:41                             ` समीर सिंह Sameer Singh
2022-05-15 15:19                               ` Eli Zaretskii
2022-05-15 15:25                                 ` समीर सिंह Sameer Singh
2022-05-15 15:40                                   ` 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=CAOR1sLx6snSs6a4D0KNpR7ov-Q4rR8HXSS-8MVLFvxsZFSCN+A@mail.gmail.com \
    --to=lumarzeli30@gmail.com \
    --cc=55370@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).