Subject: bug#20140: 24.4; M17n shaper output rejected

From: Richard Wordingham <[email-masked]>
Date: Sat, 5 Feb 2022 22:52:51 +0000

On Fri, 04 Feb 2022 09:37:03 +0200
Eli Zaretskii <[email-masked]> wrote:

> > From: Lars Ingebrigtsen <[email-masked]>
> > Date: Thu, 03 Feb 2022 22:21:28 +0100
> > Cc: [email-masked]
> > 
> > Richard Wordingham <[email-masked]> writes:
> >   
> > > I am running Emacs 24.4 in a Ubuntu 12.04 Precise Pangolin
> > > installation, for which the version of libm17n-0 is 1.6.3-1.  I am
> > > attempting to induce Emacs to render the Tai Tham script.  There
> > > appears to be a bug/feature in Emacs which makes this
> > > unnecessarily difficult.  
> > 
> > (I'm going through old bug reports that unfortunately weren't
> > resolved at the time.)
> > 
> > I vaguely remember there having been some fixes in this area since
> > this bug report was opened -- does this work better for you in more
> > recent versions of Emacs?  

I'm currently using the vanilla emacs on Ubuntu Focal, which is
described as 'GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+
Version 3.24.14) of 2020-03-26, modified by Debian'.  The key good news
is that the commands forward-char-intrusive and backward-char-intrusive
are now standard, so I can position the cursor by dead-reckoning.  You
can reasonably mark the issue as solved.

> The most important change is that we now use HarfBuzz by default.

Isn't that only true for Emacs 27.1 and above?

> Richard didn't contribute the Tai Tham composition rules to us
> (AFAIR), so I cannot test what happens now in Emacs with HarfBuzz.
> Maybe we should revisit this issue, but first I hope Richard could
> tell whether the issue still exists, and if so, what composition rules
> he uses or suggests to use for Tai Tham.

Sad to see that Khaled Hosny's suggestion not to use composition rules
seems not to have been taken.

You're welcome to include my composition rules.  They're complicated by
the facts that the 'regular expressions' are not interpreted as regular
expressions and they are not interpreted as closed under canonical
equivalence.  I therefore calculate the regular expression.  My
composition rules are attached as tai-tham.el, which was last modified
on 20 March 2015.  (It would need reformatting to paste into this
email.)

There are some deficiencies; I've a feeling there may be a problem with
adding ZWNJ and CGJ as marks; ZWJ should also be added for
completeness.  I need ZWNJ to write 4-column ᨴᩣᩴᨶ᩠ᩅ‌ᩣ᩠ᨿ as opposed to
3-column ᨴᩣᩴᨶ᩠ᩅᩣ᩠ᨿ, and even with my font, HarfBuzz will need CGJ for
the suppression of jack-booted dotted circles. Additionally, for
didactic text, what can I do for U+25CC for explicit display of marks
and their equivalents on a dotted circle, and for that matter, for
display on NBSP?

Richard.

Richard.