Skip to content
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

Blurry text #4868

Open
mateiandrei94 opened this issue Mar 16, 2024 · 2 comments
Open

Blurry text #4868

mateiandrei94 opened this issue Mar 16, 2024 · 2 comments
Labels
a:text Text rendering, fonts, Text input (mS,bF)

Comments

@mateiandrei94
Copy link

Blurry text

Although not always, if resized "the wrong way" all slint programs have blurry text; this includes all the executables, the demos in the web browser (firefox, chrome, edge, all of them), slint pad and the slint live preview in Visual Studio Code (tested on Windows 11 with 100% scale).

For the purpose of this bug report I will specify a specific scenario (Rust in release mode on windows 11 with 100% scale).
The 100% scale is important, since changing it to 125, the issue goes away. But I don't think this should be an excuse or solution since all the other programs do not have blurry text at 100% scale.

I believe this problem is valid regardless of renderer or backend.

I would not be making this bug report if it were simply an issue with window size, see last picture.

Details

Programming Language : Rust
cargo 1.75.0 (1d8b05cdd 2023-11-20)
rustc 1.75.0 (82e1608df 2023-12-21)

Operating System: Microsoft Windows 11
Version 23H2 (0S Build 22631.3296)

Steps to reproduce:

Use the latest Windows 11, have git cargo and rustc installed
In your windows 11 settings, (System > Display), section Scale & layout, make sure you have Scale at at "100% (Recommended)", if your display is not (Recommended) on 100% use a different one that is.
My display is 27″ with resolution 2560 x 1440

git clone https://github.com/slint-ui/slint.git
cd slint\examples\gallery
cargo run --release
Click on the left (List View)
Resize the window left or right by 1 or multiple pixels until you see blurry text.

Expected behavior :

I don't expect text to become blurry.
If you resize the window by 1 or multiple pixels in any other application such as the windows setting application, you will notice that sometimes the contents grow and other times nothing changes.
In all slint applications the contents always grow (which I think is an error or bug).
I suppose there are some calculations on pixel bounds, rather than rendering text in between pixels, some magic happens where text is kept correctly.

What do you see instead :

Blurry text sometimes and clear and readable text some other times.

To set the Window size, I'm using a program called sizer which adds a context menu at the bottom right of any resizable window.

Here are some screenshots:

image
image
image

@treuks
Copy link

treuks commented Apr 13, 2024

I recognize that font rendering is an incredibly immense task, however, personally, this issue seems to be my number one deal breaker with Slint. I have noticed that you can get semi-tolerable results by using the Skia backend, however I really think it should not be needed.

I would love the possibility of utilising system native font rendering solutions, such as DWriteCore on Windows 10+, CoreText on MacOS, and Freetype on Linux and friends (if possible), alternatively, cosmic-text.

@ogoffart ogoffart added the a:text Text rendering, fonts, Text input (mS,bF) label Apr 26, 2024
@EdnY1
Copy link

EdnY1 commented May 14, 2024

I really tried to use Slint but the font rendering issues is a deal breaker for me. It would be so nice if you guys manage to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:text Text rendering, fonts, Text input (mS,bF)
Projects
None yet
Development

No branches or pull requests

4 participants