-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendering issues with webgl and ligatures #3303
Comments
The grey |
Fira Code |
It looks like the character from inside the cursor is staying on. |
I think that's actually ideal imo, but I don't use ligatures so not 100% sure. The dom renderer is a little bad atm since the cursor highlights all chars in the ligature. |
what I meant was that the artifact for character inside the cursor is left even after typing and the cursor moving 1 place ahead For the dom I guess it's happening since the joined characters are in the same |
Yep, compound unicode chars (grapheme clusters) basically have the same issue, imho this was the reason for inventing IMEs in the first place - the user needs a way to interact with its "construction phase" (cursor access to its atomic entities). AFAIK word processors treat clusters this way - once they are constructed the normal cursor would not allow to jump into the atomics anymore (treated as a single char, cursor jumps right over it, BS would delete it as a whole), but have the ability to re-enter the construction phase by some additional action to modify the atomics again. While we can learn from word processors, how a proper cursor based interaction with clusters may look like, it is not quite easy to apply for a grid-aligned terminal. We basically would need a way to re-enter the IME construction once again, no clue if thats possible somehow. Ligatures as used from coding fonts are somewhat special here as they output different glyphs for consecutive chars, that still show normal monospaced cursor progression. Imho here we should break the ligature, maybe simply skip the joiner if the cursor is above? |
Looks like the rendering issues go further |
fwiw @Tyriar @LabhanshAgrawal if you manually clear the texture atlas this goes away. perhaps theres some key that's missing in cache key? |
@jerch yep! |
Details
Steps to reproduce
Happened to me using the demo with zsh with powerlevel10k
Comparing canvas vs webgl with ligatures
Canvas
Webgl
Below, I'm using suggestions and syntax highlighting plugins for zsh
It's suggesting === (untyped part of the suggestion should be in gray)
On typing =
Both
On typing ==
Canvas
Webgl
On typing ===
Canvas
Webgl
Looks like remnants of earlier paint are there in webgl
The text was updated successfully, but these errors were encountered: