emacs-devel
[Top][All Lists]
Advanced

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

Re: Ligatures


From: Stefan Monnier
Subject: Re: Ligatures
Date: Mon, 18 May 2020 16:33:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> So, maybe we don't need very much info: all we need is a boolean which
>> tells us whether the glyph should be treated atomically or not.
>> When not treating it atomically, we would (somewhat arbitrarily) divide
>> the glyph horizontally into N equal sized "subglyphs" and draw the
>> cursor on the corresponding subglyph.
>
> I'm somewhat out of my depth here, but I have the hunch that some
> "ligatures" aren't "just stacked horizontally".

That's why we need a boolean to tell us whether this ligature is
"stacked horizontally" (which I called "not atomic").

This boolean could actually be a global constant (so it give the wrong
behavior half the time, but that would be good enough for those people
who use the kind of latin-ligatures talked about here and almost no
other ligatures, and would be no-worse than what we have now for people
who do use languages where many ligatures aren't "stacked horizontally".

But rather than a global constant, we could probably try and do better
either by asking the font-backend (in case it can provide that kind of
info) of by using a heuristic based on the script of the characters that
are being combined.

Obviously, I'm discussing a *heuristic*, not a 100% perfect solution.


        Stefan




reply via email to

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