[Libreoffice-bugs] [Bug 124292] KDE5: Fractional scaling makes most UI and rendered text look bad

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Mar 29 21:06:00 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=124292

--- Comment #7 from Jan-Marek Glogowski <glogow at fbihome.de> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190329/2b0e32b7/attachment.html>


More information about the Libreoffice-bugs mailing list