SUMMARY Since upgrade to plasma-workspace-5.24.0, my plasma X11 session opens with Xft.dpi: 0. This messes especially webkit-gtk applications (in my case, Evolution mail, but tested epiphany browser too). I see there was change in this area, especially https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1012/diffs#96a3553f6e69e17f575e2ced2f36e16c755d5e6a_0_22 If I’m not mistaken, if fontDpiKey is present, it’s value is dumped to xrdb, even if it’s 0? In my case, it’s present in configuration (forcing dpi is disabled in fonts kcm) and the value is 0 indeed in configuration file. xrdb right after opening session: $ xrdb -query Xcursor.size: 24 Xcursor.theme: breeze_cursors Xft.antialias: 1 Xft.dpi: 0 Xft.hinting: 1 Xft.hintstyle: hintslight Xft.rgba: rgb kcm font config file: $ cat .config/kcmfonts [General] dontChangeAASettings=true forceFontDPI=0 STEPS TO REPRODUCE 1. upgrade to plasma-wokspace-5.24.0 2. restart session 3. OBSERVED RESULT Xft.dpi is set to 0 EXPECTED RESULT Xft.dpi should not be set in my case (I have no scaling) just like it was before SOFTWARE/OS VERSIONS Linux/KDE Plasma: Gentoo linux (available in About System) KDE Plasma Version: 5.24.0 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION
Good catch, looks like that's exactly what happens. `fontsCfg.readEntry(fontDpiKey, 0)` means "fall back to 0 if fontDpiKey isn't found". And then that 0 gets unconditionally written out. Would you like to submit a merge request to fix it?
>Good catch, looks like that's exactly what happens. `fontsCfg.readEntry(fontDpiKey, 0)` means "fall back to 0 if fontDpiKey isn't found". And then that 0 gets unconditionally written out. Just above we have: if (!fontsCfg.hasKey(fontDpiKey)) { return; } It means there is a key with this set to 0 set by someone. So similar bug, but not the fault of my patch (obviously :D )
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1457
Git commit 0bb681869f0462e74d0c411e2108bf3e0d371dd5 by Nate Graham, on behalf of David Edmundson. Committed on 15/02/2022 at 00:38. Pushed by ngraham into branch 'master'. Move to runtime check of valid font DPI The current code checks if we have an entry, but not that the entry is sane. FIXED-IN: 5.24.1 M +3 -2 kcms/fonts/fontinit.cpp https://invent.kde.org/plasma/plasma-workspace/commit/0bb681869f0462e74d0c411e2108bf3e0d371dd5
Git commit 6c2d9d4a66db35ab208f194f6a37c7d0bc634d11 by Nate Graham, on behalf of David Edmundson. Committed on 15/02/2022 at 00:39. Pushed by ngraham into branch 'Plasma/5.24'. Move to runtime check of valid font DPI The current code checks if we have an entry, but not that the entry is sane. FIXED-IN: 5.24.1 (cherry picked from commit 0bb681869f0462e74d0c411e2108bf3e0d371dd5) M +3 -2 kcms/fonts/fontinit.cpp https://invent.kde.org/plasma/plasma-workspace/commit/6c2d9d4a66db35ab208f194f6a37c7d0bc634d11