Bug 486039 - [wayland] Some Applications Render Fonts with Artifacting at Certain Window/Element Widths at Fractional Scale Factors
Summary: [wayland] Some Applications Render Fonts with Artifacting at Certain Window/E...
Status: RESOLVED DUPLICATE of bug 479891
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-23 21:20 UTC by Eamonn Rea
Modified: 2024-07-30 22:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Discover Font Rendering (259.14 KB, image/png)
2024-04-23 21:20 UTC, Eamonn Rea
Details
Kasts "Add Button" Rendering (131.74 KB, image/png)
2024-04-23 21:21 UTC, Eamonn Rea
Details
Application Dashboard Rendering (61.93 KB, image/png)
2024-04-23 21:21 UTC, Eamonn Rea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eamonn Rea 2024-04-23 21:20:38 UTC
Created attachment 168847 [details]
Discover Font Rendering

SUMMARY
Some text is rendered with unusual artifacting at certain window sizes when using fractional scaling. The width/position of the containing element is also likely to play a role.

When resizing the window, the text will jump around a little bit to the sides as it goes between being artifacted and rendering correctly. However, if you resize the window and get one part of the application to look correct, other parts will not look correct, causing a constant game of cat-and-mouse. I have not yet found a window size that renders correctly.

On a display without fractional scaling, text renders correctly.

This affects the following software:
- Discover
- NeoChat (resizing doesn't always help in the case of the "About KDE" section, where the text is always rendered with artifacts).
- Kasts (probably the least impacted except for one case that I will attach a screenshot of)
- Application Dashboard
- Info Center, to a minimal degree

These issues are usually most visible on the "About" page.

I filed this under "I don't know" because this only affects some (QML?) applications. Some applications, like Dolphin, are entirely unaffected.


STEPS TO REPRODUCE
For this example, I will use Discover.
1. Open Discover and go to the About page, with a scale factor of 150%
2. If not observe the issue, resize slowly until observed. 
3. Text will jump around to the sides by a few pixels while resizing.


OBSERVED RESULT
Some applications will render fonts ugly at 150% scaling.


EXPECTED RESULT
All applications render fonts cleanly regardless of scale factor.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.8.7 Linux Zen
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
On my system I am using the "Inter Display" font set to Medium 10pt, but this also affects Noto.
Comment 1 Eamonn Rea 2024-04-23 21:21:11 UTC
Created attachment 168848 [details]
Kasts "Add Button" Rendering
Comment 2 Eamonn Rea 2024-04-23 21:21:57 UTC
Created attachment 168849 [details]
Application Dashboard Rendering
Comment 3 Eamonn Rea 2024-04-23 21:23:22 UTC
I forgot to note this on my OP, but this was not an issue in Plasma 5.27. Perhaps this is related to the Fractional Scaling Wayland protocol, like Bug 480171.
Comment 4 Eamonn Rea 2024-07-20 21:50:09 UTC
I noticed recently that this affects Elisa particularly badly, and it can even be seen on a screenshot for this week's "This Week in KDE", although it is not quite as bad as it is on my system, it may help confirm that this is not a bug specific to my system.

This is the screenshot in question where this is visible, along the lefthand side text like the highlighted "Artists" section can show this issue: https://pointieststick.com/wp-content/uploads/2024/07/screenshot_20240719_104718.jpeg

In my case, however, this is more apparent. But that may be a case of varying scale factors/window sizes.
Comment 5 cwo 2024-07-30 12:32:11 UTC
Thank you for the bug report! This issue has already been filed; please follow the linked bug report for updates on a fix.

In particular, there is a workaround involving setting an environment variable that seems to work for several users; consider setting this if you are badly affected by this bug until a proper solution is implemented.

*** This bug has been marked as a duplicate of bug 479891 ***
Comment 6 Eamonn Rea 2024-07-30 22:28:29 UTC
Thanks for resolving! I will keep an eye on the linked issue.

To my understanding, the workaround of `QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor` disables fractional scaling which might not be viable for my setup. I may still try it if the situation worsens, but good to know the cause is at least being looked into and that this is known!