You are not logged in.

#1 2017-06-24 12:35:37

gen2arch
Member
Registered: 2013-05-16
Posts: 182

SOLVED: Regions of horrible font rendering within KDE/Plasma

Hi

my system is plasma 5.10.2, KDE frameworks 5.35.0 and QT 5.9.0.

This is a laptop with a 4k internal display and mostly connected to a 4k external display via miniDP. I have an nvidia graphics card (quadro m2000m). I use the KDE scaling features via System Settings > Display and Monitor > Scaling. I also have "Force Fonts dpi" in the "Fonts" Settings enabled.

In general font rendering in applications and terminals is clean and crisp.

Yet there are exceptions, the reason of which I fail to see, nor what these exceptions might have in common:

1) certain modules in "System Setting": "Multimedia > Audio Volume" is especially horrible: it is barely readable, very different from the neighbouring module "Audio CDs", where font rendering is perfect.

2) certain modules in "Info Center": "Energy information" looks terrible, very comparable to the above mentioned "Audio Volume"

3) fonts in Virtual Box virtual machines look equally bad: e.g. boot messages of machines starting up

4) (sometimes ?) fonts on the sddm greeter that is displayed upon startup


Anyone seeing the reason what that might be, how are these connected, how can it be fixed?? How are these cases different from say: a firefox browser window, an emacs window or a terminal where fonts are displayd perfectly. Can it be due to the high res (4k) display? Do they need special settings?

Thanks for your help

gen2arch

Last edited by gen2arch (2017-06-26 11:07:05)

Offline

#2 2017-06-26 11:06:52

gen2arch
Member
Registered: 2013-05-16
Posts: 182

Re: SOLVED: Regions of horrible font rendering within KDE/Plasma

Hi

I found the the reason of all that: basically, KDE/Plasma is not HiDPI ready yet. The problem with botched font rendering on high res screens with scaling is well documented:

https://bbs.archlinux.org/viewtopic.php?id=227537
https://bbs.archlinux.org/viewtopic.php?id=227091
https://bbs.archlinux.org/viewtopic.php … 7#p1714447
https://bugs.kde.org/show_bug.cgi?id=362856
https://bugs.kde.org/show_bug.cgi?id=373178#c1
https://marc.info/?l=kde-devel&m=149005290016141&w=2
https://docs.google.com/document/d/1-Sm … EDWEw/edit

It seems that KDE doesn't handle well non-integer values of scaling (on my 32" 4k display I had "1.2"); if I set scaling to "1" (and increase "Force Fonts DPI" in Settings > Fonts) all of the above mentioned problems disappear immediately: no more ugly sheets (modules) in Info Center and Settings, much better font rendering in Okular!

Two environment variables are also involved in this: QT_SCREEN_SCALE_FACTORS and QT_AUTO_SCREEN_SCALE_FACTOR. Unsetting both or doing something like:

QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCREEN_SCALE_FACTORS=1 okular &

helps on a single use basis.

Also modifying e.g. the okular.desktop files is also possibe:

Exec=QT_SCREEN_SCALE_FACTORS=1 okular

There is a Google Summer of Code 2017 project 2017 by Lukas Hetzenecker to fix that:

https://summerofcode.withgoogle.com/pro … 0277862400

Thanks!

Offline

Board footer

Powered by FluxBB