emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Supporting stylistic sets


From: Eli Zaretskii
Subject: Re: Supporting stylistic sets
Date: Mon, 26 Sep 2022 21:28:46 +0300

> From: Nicolas Ouellet-payeur <nicolaso@google.com>
> Date: Mon, 26 Sep 2022 13:46:40 -0400
> Cc: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>, 
>       emacs-devel@gnu.org
> 
> > That would disable ligation in complex script shaping, where it is a
> > must.
> 
> That's why the default mode-line would have a text property on the parts
> that are likely to ligate.
> 
> e.g. if my mode-line reads like:
> 
> -:--- foo.c   All   L1    (C Abbrev)
> 
> Then we'd apply this text property on the "-:---" part.

First, this is the first time that you mention a text property in this
discussion.  We don't have such a text property in Emacs, so it would
have to be added, character-composition code will need to be amended
to be aware of the property.

And second, it is not good enough to have the property on the "-:---"
part, because that's where the input-method mnemonics are displayed,
and those frequently do need ligations, if they use characters from
scripts which require that.

> > This slowness is the main disadvantage of our current method of
> > handling character compositions.  (It also has numerous advantages.)
> > If we want to progressively increase the use of text-shaping engines
> > when rendering text, we will need to redesign this part
> 
> What do you mean by "this part" specifically? The part where we call
> into Lisp for any character in `composition-function-table'? Or the fact
> that we do a regex match each time?

Mainly the former.

> > The status quo is NOT that we don't support ligatures.  The support is
> > available
> 
> Of course. By OOTB (out-of-the-box) I meant reading the GSUB table so we
> can apply ligatures *without* requiring manual configuration. i.e.
> making the shaping engine do the heavy lifting.

The shaping engine will do the heavy lifting anyway, but we must give
users control on what is and what isn't ligated, so just asking the
shaping engine to ligate everything the font supports is also out of
the question.

> Are we OK with the status quo then, where ligatures have to be manually
> configured? In that case, I could send a patch to remove that item from
> etc/TODO.

The item in TODO explains in detail what it means by "OOTB".  What is
described there is missing from the current Emacs, and I hope it will
be added.  But the way to add it must allow user control on what
ligatures will be produced and in what places.  It also should allow
this control via a UI that is much easier to use than the current raw
support which requires manually writing entries for
composition-function-table.  It's all in the TODO item's text, and I
don't understand how that could lead you to the conclusion that we are
"OK with the status quo".  All I said that it's incorrect to say that
we don't have any support for ligatures.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]