GTK4(font): fix letterspacing, signcol seams - #21013
Conversation
Overlap adjacent row nodes by one pixel. GSK renderer rounding seems to add 1px. Possibly relevant: https://blogs.gnome.org/gtk/2026/05/28/snapping/
|
@64-bitman please check if you see anything off in your view. I think my assessment of the custom narrow letterspacing/lineheight was correct - it should not affect your font much if correct.. If you preferred old look go change settings. |
| GSK_SCALING_FILTER_NEAREST); | ||
| &GRAPHENE_RECT_INIT(FILL_X(0), FILL_Y(row), | ||
| (da->n_cols + bleed) * gui.char_width, gui.char_height + bleed), | ||
| GSK_SCALING_FILTER_TRILINEAR); |
There was a problem hiding this comment.
Why is it changed to trilinear? I used nearest to prevent blurring/antialiasing.
There was a problem hiding this comment.
Oh sorry, my mistake - I thought I had removed that.
|
I did not notice anything significant visually, so if it fixed your issue, then this looks good |
|
@64-bitman I tested with some edgy
.. but otherwise the dimensions look identical. I attribute that to accumulating linear dpi scaling differences possibly also why my second observation
Overall I think it looks proper now. |
If you are talking about resizing the window being able to snap to discrete rows, that is not possible in GTK4 (nor Wayland if I believe as of now). |
|
@64-bitman okay with you? I don't quite understand the code, so if it fixes the blurry rendering then it is fine with me. But one thing I don't follow: according to the comment bleed means to extend by one cell to the right, but you are now adding |
It looks like it addresses this issue
I think the issue is dependent on the monitor resolution I'm guessing. @dezza is it necessary to fix your issue? Thanks |
|
@chrisbra Signcol: My fix shifts it a single logical unit (its not px, it maps to the devices scaling). #21043 added as reminder for GTK4.24 (addresses the signcol temporary fix) |

Problem:
:help 'linespace'is what vim calls it).Solution:
c158acf round char w nearest px
c158acf Overlap adjacent row nodes by one pixel.
GSK renderer rounding seems to add 1px (not sure).
Possibly related: https://blogs.gnome.org/gtk/2026/05/28/snapping/
author responded in irc with:
(trying gtk_snapshot_set_snap after gtk 4.24)
Fixes: #21002