-
Notifications
You must be signed in to change notification settings - Fork 10
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
Draw undercurls in addition to underdots #42
Comments
Reviewing other GTK4 apps (GNOME's Text-Editor and Builder), when underlining spelling mistakes, the GTK4 decoration is a dotted line. It seems de default has changed from curly line to a dotted one. Some remarks, the dotted underline on either of the GTK4 applications mentioned here are significantly thinner than the dotted underline in Neovim-gtk, for the same font size (tested with Iosevka Curly Slab 8.4pts). @jacobmischka, perhaps a good compromise would be to have a flag or setting to re-enable the undercurl instead of a dotted underline, but it looks to me like the new behavior is the GTK4 default. |
Yeah - I didn't take the time to dig through GTK4's rendering code to actually figure out what exactly they're doing with the font metrics to determine the undercurl size. I'm totally happy to accept patches to fix this
I think we still want to support both actually, it's less about GTK4's decision and the fact that nvim does actually have two formatting options for both |
Ok cool, so I took a look at this again today and it seems like I actually got almost everything right after the initial 4.6+ fix. Seems like the only two things I was missing:
This gives us something that imho, looks far nicer and more legible: Ironically, because I still didn't dig any further in GTK4's method for drawing underdots I think I actually came up with something that looks a bit nicer then GTK4's defaults (or at least, it certainly looks better then the underdots I see in gtk 4.6's inspector. Maybe 4.8+ look better though?). So I think I'm going to go with this, and look into whether the gtk folks would be interested in me porting this to GTK4 so everyone can have nice underdots. |
This addresses some of the issues that were mentioned in #42 regarding the underdot effect looking too large. It turns out that we can fix this pretty nicely by using the underline_thickness metric as the circle diameter, and round the y coordinate down.
This addresses some of the issues that were mentioned in #42 regarding the underdot effect looking too large. It turns out that we can fix this pretty nicely by using the underline_thickness metric as the circle diameter, and round the y coordinate down.
For reasons as laid out in #14, I understand why underdots are being rendered currently, but as mentioned in that issue it would be nice to be able to render undercurls again instead.
It would be nice to be able to subscribe to a tracking issue for that, so I wanted to open this.
Thanks!
The text was updated successfully, but these errors were encountered: