[HarfBuzz] Ligatures
Khaled Hosny
dr.khaled.hosny at gmail.com
Sat May 23 18:09:50 UTC 2020
> On May 23, 2020, at 10:25 AM, Eli Zaretskii <eliz at gnu.org> wrote:
>
>> From: Khaled Hosny <dr.khaled.hosny at gmail.com>
>> Date: Sat, 23 May 2020 09:51:21 +0200
>> Cc: harfbuzz at lists.freedesktop.org
>>
>>> 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.
>>
>> What are you going to do about kerning, or mark positioning? Partially kerning arbitrary glyphs (because the sub string match some regular expression) is worse than not kerning at all.
>
> I don't think I understand the question. How is kerning related to
> the issue at hand?
Kerning is part of text layout. You are only considering ligatures, but they are small part of text layout and your proposal does not seem to consider anything other than ligatures which is arbitrary division and makes no much sense to me. Some fonts provide ligatures to fix f-collioson, others fix it with contextual alternates, and others fix it with kerning. Your proposed solution does not address this. Also when you pass certain text to the layout engine, you get everything the font provides not just ligatures, so you would end up kerning certain letter combination (that you send to the layout engine) and not others, which is inconsistent and ugly.
Overall, if you can’t send the whole text (words are the absolute minimum, but this has its issues as well), don’t just send arbitrary parts of it as the result will be some inconsistent mess.
Regards,
Khaled
More information about the HarfBuzz
mailing list