Closed smit2909 closed 3 years ago
What font are you using
Here a bunch that very consistently show such behaviour
This behaviour occurs regardless of the multigrid flag
Hi, I observe the same bug here. I use JetbrainsMono.
NVIM v0.5.0-dev+1450-g5aaa1a1c0
Build type: Release
LuaJIT 2.1.0-beta3
I use no desktop environment, just a window manager dwm. My compositor is picom.
i can repro something like this on windows now. The trick was dpi scaling had to be enabled, so it looks like this has to do with the renderer's interaction with scaling.
Yes, it seems related to scaling. I tried to reproduce bug with scaling set to 1, and was not able to. At 1 it works fine.
When using wayland it renders at 1 regardless of system-wide scaling.
I'll try to dig this issue.
What scaling setting are you talking about ? Because I far as I know the only scaling setting I set myself are some env variables for GTK and QT
QT_AUTO_SCREEN_SCALE_FACTOR 1
GDK_SCALE 2
GDK_DPI_SCALE 0.5
and dpi for X11
Xft.dpi: 120
I'm talking about this scaling: https://docs.rs/winit/0.22.2/winit/window/struct.Window.html#method.scale_factor
If you're using x11, it's calculated from DPI.
As workaround you can set WINIT_X11_SCALE_FACTOR=1
and just set bigger font size.
@doums try running latest version with neovide --log
, and then show me grep scale neovide_rCURRENT.log
. And what exact font and font size are you using?
Issue is affecting some font sizes more than others, and i want to find some good combinations to reproduce it.
@Kethku I'm pretty sure it's some sort of rounding issue. window.scale_factor()
sometimes passed as f64 and sometimes as f32. And multiplied by font size in some parts. And with scaling like 1 or 2 it works perfectly fine.
Maybe you have some ideas/hints?
@Kethku i'm worried abount those lines:
In src/renderer/mod.rs:draw_frame
there is root_canvas.scale((scaling, scaling));
And in src/renderer/rendered_window.rs:handle_window_draw_command
there is canvas.scale((scaling, scaling));
If i comment out one of them, it scales in half, if i comment both - it scales in half more. Is it supposed to work this way?
When i get these artifacts, cursor is rendered at slightly different (and i think, correct?) position.
And when i change mode to visual and make a selection, line gets rerendered at same position as cursor, without artifacts.
I introduced a fix for this here: https://github.com/Kethku/neovide/pull/791 which removes the scroll performance optimization which seems to cause the issue. Could you try it and or review the change? I know you've been looking into this @last-partizan
https://github.com/Kethku/neovide/pull/793
Here is another fix. @doums @smit2909 please, try it.
bug seems to be fixed in #793 good job !
But I can't build main, it's failing with
error: checksum for `skia-safe v0.40.2` changed between lock files
@doums Merged fix
main is still broken
793
Here is another fix. @doums @smit2909 please, try it.
Awsome! Working like a charm @last-partizan . No more broken fonts. I am on 755-scale-factor branch though. I didnt build after the merge into main.
@doums are you sure?
https://github.com/Kethku/neovide/commit/5c5cf9088da9ce205f2225ca969fcf2f251e4c12
Does git log
includes this commit?
Just to be clear, #793 is not merged yet.
I just merged fixes for broken main branch.
@doums are you sure?
Does
git log
includes this commit?
I was talking about artifact bug on main branch. Yes the build is fixed of main branch and yes it includes the commit.
This should be fixed now on main.
Describe the bug
To Reproduce Steps to reproduce the behavior:
Expected behavior Fonts and lines should not be cut off after scrolling
Screenshots If applicable, add screenshots to help explain your problem.
Look at line 210 in below screenshot
Desktop (please complete the following information):