emacs-devel
[Top][All Lists]
Advanced

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

Re: Ligatures


From: Eli Zaretskii
Subject: Re: Ligatures
Date: Tue, 19 May 2020 18:36:42 +0300

> From: Pip Cet <address@hidden>
> Date: Tue, 19 May 2020 15:11:27 +0000
> Cc: address@hidden, address@hidden
> 
> On Tue, May 19, 2020 at 2:52 PM Eli Zaretskii <address@hidden> wrote:
> > Btw, there's one subtle issue that will need to be resolved if we are
> > to have this feature of "sub-glyph" cursor movement inside composed
> > characters.  The way we currently display the default block cursor is
> > by simply redrawing the glyph at point in reverse video.  So we don't
> > have a way of displaying a cursor that "covers" only part of a glyph.
> 
> I thought that was what glyph_row->clip was for.

We could use that, but that's not the main problem.  After all,
clipping while drawing is simple and doesn't need any special help.

The problem is that we need to change how the cursor is drawn, from
the control flow POV.  We'd need to audit the code and see that the
information required for drawing the cursor is available when we are
drawing the text.  And then there's the popular use case where nothing
changes except the cursor position, in which case no text is redrawn
at all.

> > To make this happen, we'd probably need to draw the cursor as part of
> > drawing the glyph foreground and/or background, which is against the
> 
> I believe that's a change we should make anyway: late cursor drawing
> makes sense on TTYs with physical cursors, but on GUI backends, we
> should simply use a special face for drawing the struct glyph a cursor
> is on, IMHO.

It cannot be a single face, because the "thing under cursor" can be
anything, and can have different colors.  We will need to merge faces,
which is slower than the current simple but effective method, which
completely sidesteps the issue.

in any case, using a face doesn't solve the main problem, as we'd
still need to draw the glyph with partial colors.



reply via email to

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