Created attachment 150228 [details] Screenshot of badness 1. Go to KDE Plasma display settings 2. Change scaling to 1.2 or some other fractional value 3. Launch LibO with kde5 backend The assumption is that this is a Qt regression. Perhaps version from 5.11. Arch Linux 64-bit Version: 6.3.0.0.alpha0+ Build ID: 66b21521a95f7b2053aa99a23e0a4c34438af6c7 CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: kde5; Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US Calc: threaded Built on 22 March 2019
What distribution and Qt version are you using? Looks OK for me on Debian testing (with distro Qt packages at version 5.11.3+dfsg-5) and Version: 6.3.0.0.alpha0+ Build ID: c18179cf80516f1eca9629a0a8b888e0ca67a020 CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: kde5; Locale: en-GB (en_GB.UTF-8); UI-Language: en-US Calc: threaded Fonts get larger and still look good when I set the scale factor to e.g. 1.2 or 1.6.
As mentioned in desc, distro is Arch Linux. Qt is 5.12.2, but I have had the problem ever since the kde5 backend was buildable, so last year. I remember there being a report for Calc cell input text rendering, where the result matched mine exactly, but I cannot find it in the meta bug.
Thanks for the info and sry for being unable to read the desc properly...
Created attachment 150327 [details] Some good, some bad Can confirm with LO 6.2.0.3 using the KDE5 backend. Interestingly enough, menu text is nice looking, but text in the toolbars' comboboxes is bad, and all icons look bad.
*** Bug 123709 has been marked as a duplicate of this bug. ***
I have the same issue on KDE neon: Operating System: KDE neon 5.15 KDE Plasma Version: 5.15.3 KDE Frameworks Version: 5.56.0 Qt Version: 5.12.0 Kernel Version: 4.18.0-16-generic OS Type: 64-bit Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz Memory: 15,2 GiB However, this issue is not limited to fractional scaling, I also see it with non-fractional scaling (2x) and the fonts look *very* blurry. Using SAL_USE_VCLPLUGIN=gtk3 makes the fonts look good again.
I'm on Debian testing with Qt5 (libqt5core5a = 5.11.3+dfsg1-1). Various qt libraries have their own current version in Debian, so this just lists core. I generally can reproduce the problem. From all the images and tests I saw it looks like Qt and Cairo render with lower DPI and then scale the image. This matches the qscreen reports. And I don't know why gtk3 works and neither qt5 nor kde5. BTW: LO just uses the DPI value internally, no resolution. I guess it affects kde5 / cairo because of some x setting somewhere (xdpyinfo is still on 96 DPI and 1920x1080 with scale 1.1). Similar problems are quite probably these: * bug 124237 - kde5 renders everything aliased * bug 122263 - Bad resolution for icons in LO Draw There is a little test program (qscreen) attached to bug 122131. I'm changing the scaling factor via $ LANG=C kcmshell5 kcm_kscreen => Scale Display 1. If I run my qscreen program without scaling I get: devicePixelRatio: 1 geometry: QRect(0,0 1920x1080) logicalDotsPerInch: 96.1263 2. If I change the scaling to 1.1 and log in again I get: devicePixelRatio: 1.1 geometry: QRect(0,0 1745x982) logicalDotsPerInch: 96.3636 3. If I have scaling on login set to 1.1 and unset QT_SCREEN_SCALE_FACTORS, I get devicePixelRatio: 1 geometry: QRect(0,0 1920x1080) logicalDotsPerInch: 106 4. If I have scaling on login set to 1.1 and set it to 1.0, I get: devicePixelRatio: 1.1 geometry: QRect(0,0 1745x982) logicalDotsPerInch: 87.3876 As you can see, nothing seem really consistent. Factors in this bug are: * Scaling on session start * Current scaling setting * QT_SCREEN_SCALE_FACTORS value I also get various graphic problems in other KDE application with scaling set to 1.1 FWIW. What fixes LO for me is simply this: unset QT_SCREEN_SCALE_FACTORS before starting LO with scaling to 1.1. Quoting from https://doc.qt.io/qt-5/highdpi.html: "QT_SCREEN_SCALE_FACTORS [list] specifies scale factors for each screen. This will not change the size of point sized fonts. This environment variable is mainly useful for debugging, or to work around monitors with wrong EDID information(Extended Display Identification Data)." Which makes it highly suspicious for me to set this value. Actually I started a good old wmaker session with scaling 1.0 from KDE. The environment had no QT settings, but I don't know how scaling is actually set. Then I set QT_SCREEN_SCALE_FACTORS to 1.1 and started LO qt5 / kde5. Result was a bigger LO window on startup (expected), but the fonts were actually smaller and also just glibberish. qscreen outupt was: devicePixelRatio: 1.1 geometry: QRect(0,0 1745x982) logicalDotsPerInch: 87.3876 Anyway: the solution for me is 3. That fixes both qt5 and kde5 for me and actually scales the font correctly. It kind of seems logical, because it simply increases the DPI value and devicePixelRatio is 1, so no need to scale. Solution 3 matches this patch, which works for me: https://gerrit.libreoffice.org/#/c/69941/ Bit since I have massive other graphics problems in KDE when scaling is enabled, I would like to get some feedback before merging.
(In reply to Jan-Marek Glogowski from comment #7) > Solution 3 matches this patch, which works for me: > https://gerrit.libreoffice.org/#/c/69941/ I built with it and it seems to fix the issues indeed. Thanks!
(In reply to Jan-Marek Glogowski from comment #7) > [...] > As you can see, nothing seem really consistent. Factors in this bug are: > * Scaling on session start > * Current scaling setting > * QT_SCREEN_SCALE_FACTORS value > [...] This also explains why I couldn't reproduce. The QT_SCREEN_SCALE_FACTORS env variable is set on login only. When logging out and in again between steps 2 and 3 of the original description, I can also reproduce when using a LibO version that doesn't have the patch yet.
The patch has been cherry-picked to master in the meanwhile. It wasn't referenced here automatically (probably because TDF bugzilla had some issues last night) https://gerrit.libreoffice.org/plugins/gitiles/core/+/b4698a2241ec26d796c66da3a814f7cc693785b6 commit b4698a2241ec26d796c66da3a814f7cc693785b6 Author: Jan-Marek Glogowski <glogow@fbihome.de> Date: Fri Mar 29 02:58:59 2019 +0100 tdf#124292 Qt5 / KDE5 disable Qt's HiDPI scaling LO does its own layouting and also all the scaling, so disable the automatic HiDPI scaling explicitly. Otherwise fonts will be rendered in LoDPI and just scaled as an image, if UI scaling is enabled in KDE, resulting in really blocky / ugly fonts. Change-Id: I38503ce27c1671e80d0749d21c6c6dcff1a808a6 Reviewed-on: https://gerrit.libreoffice.org/69941 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> -> fixed now, s.a. comment 8 Backport for 6.2: https://gerrit.libreoffice.org/#/c/69984/
Jan-Marek Glogowski committed a patch related to this issue. It has been pushed to "libreoffice-6-2": https://git.libreoffice.org/core/+/c3eeb421526f284419e90d2c4c4da5b0d7bbcc0e%5E%21 tdf#124292 Qt5 / KDE5 disable Qt's HiDPI scaling It will be available in 6.2.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.