Created attachment 153511 [details] screenshot Title says it all. Please see the attached screenshot. EXPECTED RESULT the bug seen in the attached screenshot should not occur SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.26.2 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.7 Graphics Platform: Wayland
Created attachment 153521 [details] SF Pro Display fonts This bug does not occur when I use Noto fonts, it does when I use the attached SF Pro Display fonts.
Can not reproduce on Plasma 6 with any of the SF Pro Display font. However I was able to reproduce it on Plasma 5.27 by setting "Small:" font in Fonts KCM. With that said, I think we used to have some issues with TextMetrics in Qt 5 times which have been fixed for Qt 6. The chart component itself also had quite few porting changes during last year. Not sure whom to attribute this fix.
Created attachment 163649 [details] full font hinting It's still reproducible with sf display pro fonts if font hinting is set to Full. Please see the attached screenshot. Operating System: Arch Linux KDE Plasma Version: 5.90.0 KDE Frameworks Version: 5.246.0 Qt Version: 6.6.1 Graphics Platform: Wayland
Can confirm, full hinting somehow breaks it.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-nm/-/merge_requests/310
Git commit 275eacf2088e84d5d4d70531a976ea3d807b0ebd by ivan tkachenko. Committed on 01/12/2023 at 17:57. Pushed by ratijas into branch 'master'. applet: Fix layout of the network speed graph with certain font preferences TextMetrics uses a different text rendering backend by default, which has led to inaccurate estimation of the width of AxisLabels. By default TextMetrics uses QtRendering type; but our Label uses NativeRendering. In past we used to override renderType with a conditional expression, so considering such history, hardcoding any type seems inappropriate. That's why we need an actual instance of Label to fetch a correct render type at runtime. Second part of the issue was that instead of width property the layout should have used advanceWidth, and ceil() it, just in case. But with a port to Label instance it doesn't matter anymore. M +9 -6 applet/contents/ui/TrafficMonitor.qml https://invent.kde.org/plasma/plasma-nm/-/commit/275eacf2088e84d5d4d70531a976ea3d807b0ebd
Bulk transfer as requested in T17796