<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - KDE5: Fractional scaling makes most UI and rendered text look bad"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=124292#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - KDE5: Fractional scaling makes most UI and rendered text look bad"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=124292">bug 124292</a>
              from <span class="vcard"><a class="email" href="mailto:glogow@fbihome.de" title="Jan-Marek Glogowski <glogow@fbihome.de>"> <span class="fn">Jan-Marek Glogowski</span></a>
</span></b>
        <pre>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:

* <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SAL_USE_VCLPLUGIN=kde5 renders everything aliased"
   href="show_bug.cgi?id=124237">bug 124237</a> - kde5 renders everything aliased
* <a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Bad resolution for icons in LO Draw"
   href="show_bug.cgi?id=122263">bug 122263</a> - Bad resolution for icons in LO Draw

There is a little test program (qscreen) attached to <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - SAL_USE_VCLPLUGIN=qt5: Fonts, tooltips, toolbar icons way too large"
   href="show_bug.cgi?id=122131">bug 122131</a>.

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 <a href="https://doc.qt.io/qt-5/highdpi.html">https://doc.qt.io/qt-5/highdpi.html</a>: "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:
<a href="https://gerrit.libreoffice.org/#/c/69941/">https://gerrit.libreoffice.org/#/c/69941/</a>

Bit since I have massive other graphics problems in KDE when scaling is
enabled, I would like to get some feedback before merging.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>