[HarfBuzz] Ligatures

Eli Zaretskii eliz at gnu.org
Sat May 23 07:44:58 UTC 2020


> From: Khaled Hosny <dr.khaled.hosny at gmail.com>
> Date: Sat, 23 May 2020 08:36:10 +0200
> Cc: harfbuzz at lists.freedesktop.org
> 
> >                                                        The only way of
> > doing this right, I'm told, is to either (a) query the font to get the
> > list of all the ligatures it supports, or (b) assume any combination
> > of characters can produce a ligature, and therefore we need to pass
> > all the characters intended for display through hb_shape.  The latter
> > in particular is in stark contrast to how the current Emacs display
> > code is designed and implemented.
> 
> (a) is not realistically possible as doing it properly has pretty much the same cost as shaping the text. So your only reliable option is (b).

Thanks.  Since (b) is not really feasible without redesigning the
entire Emacs display engine (for which I see no volunteers lining up
any time soon), I guess we will have to use some more-or-less
reasonable and somewhat unreliable heuristics by supporting only some
ligatures that are known in advance.


More information about the HarfBuzz mailing list