Bug 499854

Summary: Chinese text in QML UI is thinner than in QWidgets UI
Product: [Frameworks and Libraries] libplasma Reporter: Jin Liu <ad.liu.jin>
Component: componentsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kde, kde, nate, notmart
Priority: NOR    
Version First Reported In: 6.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Chinese text
English text

Description Jin Liu 2025-02-12 05:29:57 UTC
Created attachment 178171 [details]
Chinese text

SUMMARY
See the attachment "chinese.png". Chinese text in Kickoff (i.e., QML, the line at the bottom) is thinner than in the popup menu (lines above).

This seems to affect all QML apps in KDE. E.g., Chinese text in Discover is thinner than in Dolphin. So plasmashell might not be the right component to report to, but I'm unsure where it should be.

English text (see the attachment "english.png") seems to be OK.

By visually comparing characters to the example text in the font selection dialog, it seems that all English text, and Chinese text in QWidget apps (e.g. Dolphin), are in the "Regular" weight, while Chinese text in QML is in the "Light" weight.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.91
KDE Frameworks Version: 6.10.0
Qt Version: 6.9.0beta2
Kernel Version: 6.13.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Jin Liu 2025-02-12 05:30:11 UTC
Created attachment 178172 [details]
English text
Comment 2 David Redondo 2025-02-12 08:24:54 UTC
Does it change with differnt render type? https://doc.qt.io/qt-6/qml-qtquick-text.html#renderType-prop
Comment 3 Jin Liu 2025-02-12 09:32:12 UTC
(In reply to David Redondo from comment #2)
> Does it change with differnt render type?
> https://doc.qt.io/qt-6/qml-qtquick-text.html#renderType-prop

Yes it does. Running plasmashell with `QML_DISABLE_DISTANCEFIELD=1 plasmashell --replace` (as suggested in https://stackoverflow.com/questions/43369016/can-i-globally-switch-to-native-text-rendering-in-qt-quick-controls-2 . IIUC this disables Text.QtRendering) results in Chinese text looking the same in Kickoff and Dolphin.