emacs-devel
[Top][All Lists]
Advanced

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

Re: Ligatures (was: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywh


From: Clément Pit-Claudel
Subject: Re: Ligatures (was: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY))
Date: Thu, 21 May 2020 16:51:47 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 21/05/2020 15.08, Eli Zaretskii wrote:
> That would prevent Emacs from controlling what is and what isn't
> composed, leaving the shaper in charge.  We currently allow Lisp to
> control that via composition-function-table, which provides a regexp
> that text around a character must match in order for the matching
> substring to be passed to the shaper.  We never call the shaper unless
> composition-function-table tells us to do so.

Does this mean that for each font we need to re-encode the font's logic for 
deciding whether to use a ligature?

Some concrete examples: in Iosevka (*, (**, (***, (**** etc are all displayed 
with the * character vertically centered relative to the (, but a lone * is not 
centered. In Fira Code, punctuation is context-aware, so the "+" in "A + B" is 
not the same as the "+" in "a + b".  In both of these faces, arrows can be of 
any length, and in Fira Code you can even mix and match them (see 
https://raw.githubusercontent.com/tonsky/FiraCode/master/extras/arrows.png). 

The documentation of Fira Code does recommend composition-function-table here: 
https://github.com/tonsky/FiraCode/wiki/Emacs-instructions, but it seems like a 
lot of extra work for each font, isn't it?



reply via email to

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