slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.55k stars 601 forks source link

bug: text is still blurry in low dpi #4122

Closed std-microblock closed 11 months ago

std-microblock commented 11 months ago

https://github.com/slint-ui/slint/pull/2618 This doesn't fix it for me.

Default(up) vs Skia(down) image

my slint version is 1.3.2

tronical commented 11 months ago

Yes, this is valid. As long as FemtoVG uses its own method of rasterising glyphs, it will always look different than Skia - which uses the "system" way of rasterising glyphs.

tronical commented 11 months ago

Duplicate of #3742

std-microblock commented 11 months ago

@Berrysoft told me that femtovg is actually rendering text pretty clearly when it's used directly. slint did something that makes it become blurry.

I'll test it when I'm free.

codecat commented 10 months ago

I'm also seeing this behavior, which reminds me a lot of rendering text at sub-pixel coordinates. You can verify this using a hello world file:

export component TestWindow inherits Window {
    Text { text: "Hello, world"; }
}

If you resize the window, the text remains in the center, but it will be blurry at only certain (uneven?) window sizes. Tested on Fedora 39 w/ Gnome/Wayland.