emacs-devel
[Top][All Lists]
Advanced

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

Re: Ligatures


From: Pip Cet
Subject: Re: Ligatures
Date: Tue, 19 May 2020 15:52:45 +0000

On Tue, May 19, 2020 at 3:30 PM Clément Pit-Claudel
<address@hidden> wrote:
> > So Harfbuzz provides a non-core API which, after a separate call for
> > each cluster, allows us to split up a glyph into non-overlapping
> > bounding boxes of the same height (the information returned is
> > one-dimensional, and intended for carets, not for Emacs-style box
> > cursors).
>
> Are you worried about the height of the box? For the width part, isn't it 
> just the difference between two consecutive carets?

That's what I'd work with, yeah.

Perhaps I can make things a little clearer by attaching a screenshot
of how things currently look with the "Linux Libertine Display O"
font, which has especially prominent ligatures and overhangs (I guess
it's somehow inspired by the operating system kernel it's named for?).

I think there's plenty to be improved about that: use a ligature,
sure, but also maybe get away from the "invert a box" style of drawing
the cursor, or handle overhangs specially, or...something.

But that would require an idea of which pixels belong to which
(sub)glyphs (in the ligature). And caret positioning doesn't give us
enough information to do that.

Thank you again for pointing out that API! Whether it's a core feature
of a shaper or a backend-dependent extra feature is a secondary
concern, the important part is that it's there and we can do the right
thing.

Attachment: ffi.jpg
Description: JPEG image


reply via email to

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