unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Richard Wordingham <richard.wordingham@ntlworld.com>
Cc: 20140@debbugs.gnu.org, larsi@gnus.org
Subject: bug#20140: 24.4; M17n shaper output rejected
Date: Mon, 14 Feb 2022 15:26:07 +0200	[thread overview]
Message-ID: <83leydpok0.fsf@gnu.org> (raw)
In-Reply-To: <20220213211152.03e2990a@JRWUBU2> (message from Richard Wordingham on Sun, 13 Feb 2022 21:11:52 +0000)

> Date: Sun, 13 Feb 2022 21:11:52 +0000
> From: Richard Wordingham <richard.wordingham@ntlworld.com>
> Cc: larsi@gnus.org, 20140@debbugs.gnu.org
> 
> > Btw, the _only_ reason Handa-san and now myself were able to implement
> > something like the forward/backward-char-intrusive commands is that we
> > DO control which parts of text are composed and which aren't.  If we
> > were to follow HarfBuzz developers' advice, and were to hand all the
> > text to HarfBuzz for shaping, we would need the HarfBuzz cooperation
> > to implement such features in the editor.
> 
> You mean the more sophisticated mechanisms which position the cursor
> intelligently.  Those two commands you named work by completely
> ignoring the composition mechanism.

Yes.  And the reason we can ignore compositions in certain portions
of the text is that we have control on what is passed to HarfBuzz.

> Correct me if I am wrong, but for Arabic, is not Emacs restricted to
> typewriter-like fonts?

No, that's not true.  I'm not aware of any such limitation; AFAIK
Arabic shaping works correctly in Emacs, certainly with HarfBuzz and
Emacs 27 or later.

Or maybe I misunderstand what you mean by "typewriter-like" fonts?
Can you give an example of a non-typewriter-like font for Arabic that
I can find on MS-Windows and try?

> There would be a similar problem with the use of Tai Khuen or other
> tunnelling fonts for Northern Thai if you used the current mechanism
> for advancing character by character.  Tunnelling fonts write parts of
> one cluster under the next.  The Tai Khuen fonts I've seen do this by
> relying on characteristics of Tai Khuen spelling.  The rules don't hold
> for Northern Thai, and consequently the subscript portions of
> successive orthographic syllables can overwrite one another.  A
> sophisticated font could check for clashes, but that needs the
> orthographic syllables to be passed to the shaper together.

I'm not sure I understand.  Does HarfBuzz know about these advancement
features?  We rely on HarfBuzz to give us back as many grapheme
clusters as it sees fit for a given chunk of text, and we expect each
grapheme cluster to include glyphs with relative offsets as needed by
the script and the font.

IOW, this job is delegated to the shaping engine, such as HarfBuzz;
Emacs just takes the glyphs and offsets HarfBuzz gives us and blindly
obeys them.





  reply	other threads:[~2022-02-14 13:26 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 22:20 bug#20140: 24.4; M17n shaper output rejected Richard Wordingham
2015-03-19  3:43 ` Eli Zaretskii
2015-03-21  8:33 ` K. Handa
2015-03-21 17:20   ` Wolfgang Jenkner
2015-03-21 17:58   ` Richard Wordingham
2015-03-21 18:26     ` Eli Zaretskii
2015-03-25 14:25     ` K. Handa
2015-03-25 21:45       ` Richard Wordingham
2015-04-05 19:48       ` Richard Wordingham
2022-02-03 21:21 ` Lars Ingebrigtsen
2022-02-04  7:37   ` Eli Zaretskii
2022-02-05 22:52     ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-06  8:11       ` Eli Zaretskii
2022-02-06 22:09         ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-07 14:04           ` Eli Zaretskii
2022-02-07 23:38             ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-08 22:13         ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-12 18:54           ` Eli Zaretskii
2022-02-13 16:04       ` Eli Zaretskii
2022-02-13 20:53         ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-14 13:19           ` Eli Zaretskii
2022-02-14 22:14             ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-15  1:27               ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-16 15:13                 ` Eli Zaretskii
2022-02-16 15:12               ` Eli Zaretskii
2022-02-16 15:11           ` Eli Zaretskii
2022-02-13 19:49       ` Eli Zaretskii
2022-02-13 21:11         ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-14 13:26           ` Eli Zaretskii [this message]
2022-02-14 23:26             ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-15 14:40               ` Eli Zaretskii
2022-02-15 21:06                 ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-16 13:15                   ` Eli Zaretskii
2022-02-16 19:01                     ` Richard Wordingham via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-16 19:20                       ` 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=83leydpok0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=20140@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=richard.wordingham@ntlworld.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).