[Top][All Lists]

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

Re: Ligature support

From: Lars Ingebrigtsen
Subject: Re: Ligature support
Date: Fri, 05 Nov 2021 14:42:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> We have font-shape-gstring.  If the font being used doesn't have a
> ligature for the character sequence we pass to it, that function
> returns nil, and we then display those characters "normally".  Isn't
> that enough?

That's what I thought the design here was originally -- but that's not
what's happening in general in Emacs.  If I instrument
font-shape-gstring and start "emacs -Q", that function is never called.
It's not until I insert something that we've set up something in...
composition-function-table?...  that the function is called and harfbuzz
is consulted.  (You can confirm by setting a breakpoint on

I thought we'd just send all the text through hb_shape_full, and it
would handle all this stuff.  But we don't -- we only send a very small
subset of the strings through that function, as far as I can tell.

>> So...  we need...  to parse them more to get all the ligature data out
>> of them and then...  put it in a ... char table range?  How all this
>> connects is very vague to me.  😀
> As I say above, I'm not sure I understand the goal of this, given what
> we have already.

The goal is to send all text that represents ligatures (in the current
font) through font-shape-gstring.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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