Bug 374978 - Font scaling in plasma/wayland is broken; fonts are far too big
Summary: Font scaling in plasma/wayland is broken; fonts are far too big
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-wayland (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-12 22:56 UTC by AE
Modified: 2017-08-08 10:37 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Environment variables (4.21 KB, text/plain)
2017-01-13 14:19 UTC, AE
Details
kcmfonts config file (51 bytes, text/plain)
2017-01-13 14:19 UTC, AE
Details
kdeglobals config file (3.58 KB, text/plain)
2017-01-13 14:20 UTC, AE
Details
output of xrandr -q (855 bytes, text/plain)
2017-01-15 15:28 UTC, AE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AE 2017-01-12 22:56:55 UTC
Fonts in a wayland-plasma session are much bigger than they are supposed to be (ca. 16pt instead of 10pt in my case). Gtk and or Xwayland applications seem to be fine. Also, using the same plasma config with kwin_x11 has correct font size.
Comment 1 AE 2017-01-12 23:02:34 UTC
Seems that this happens only at high resolution (1920x1080), an external monitor (1280x1024) is also fine.
Comment 2 David Edmundson 2017-01-13 09:23:11 UTC
Please attach your ~/.config/kcmfonts and ~/.config/kdeglobals and the output of "env".

then remark this as unconfirmed.
Comment 3 AE 2017-01-13 14:19:05 UTC
Created attachment 103396 [details]
Environment variables
Comment 4 AE 2017-01-13 14:19:33 UTC
Created attachment 103397 [details]
kcmfonts config file
Comment 5 AE 2017-01-13 14:20:16 UTC
Created attachment 103398 [details]
kdeglobals config file
Comment 6 AE 2017-01-13 14:22:06 UTC
Switching back to 'unconfirmed' as requested.
Comment 7 mlt 2017-01-14 08:25:36 UTC
This is the same on my laptop as well resolution 1920 x 1080
Comment 8 AE 2017-01-14 16:20:59 UTC
I should add that I saw this for plasma 5.8.5 and 5.9.95. Wayland is at 1.12, qt is version 5.7.1.
Comment 9 David Edmundson 2017-01-15 15:02:29 UTC
One more piece of information please, can you include the output of xrandr -q


and then if you want a quick workaround, open the fonts KCM, set force font DPI to 96.
Comment 10 AE 2017-01-15 15:28:36 UTC
Created attachment 103422 [details]
output of xrandr -q
Comment 11 AE 2017-01-15 15:50:05 UTC
The workaround works fine, thanks!
Comment 12 Patrick Silva 2017-01-29 04:59:28 UTC
The same happens on my laptop, screen resolution 1366x768.
The workaround works here too.
Comment 13 Szymon Łągiewka 2017-06-09 21:37:34 UTC
Plasma 5.10.1.
Qt 5.9.0
Display 3200x1600, Scale=2

Setting force fonts DPI to 96 helps the entire shell, apps to look like they would in the normal scaling environment with X11.

But this workaround is not really a solution, is it?
Comment 14 Aleix Pol 2017-07-07 11:34:50 UTC
Confirming
Comment 15 David Edmundson 2017-07-07 12:00:32 UTC
The issue (or difference) is that Qt XCB takes the DPI from X, X is (unless explicitly set, which no-one does) always returns 96.

Under wayland the QPA evaluates it with pixel size/ physicalsize.

This can return a ridiculous value because EDID information is wrong.

and sometimes we get everything far too big because the user has already set a larger pixel value for their font size, which then gets multplied up.
Comment 16 David Edmundson 2017-08-08 10:37:33 UTC
Git commit 7cfdd9a5260b8bc6140a85270a6d6bb0cc98e009 by David Edmundson.
Committed on 08/08/2017 at 10:37.
Pushed by davidedmundson into branch 'master'.

Set a default font DPI if not set

Summary:
Currently X and Xwayland (unless set otherwise) defaults to a DPI of 96.

GTK on wayland (unless set otherwise) defaults to a DPI of 96.

Qt (currently) defaults to physical size/resolution. This leads to
reports that Wayland looks big.

Qt is potentially also changing to 96 for > Qt5.10.
(it's in review at the time of writing)

Now kwin has proper scaling support, legacy apps get scaled by the
compositor without font hacks, and apps that scale themselves need a
non-scaled font DPI. (i.e a 4k screen at 2x still wants a DPI of 96 not
184).

We want to change the wayland scale factor not the font.

If a user does override this setting that override will still work.

Test Plan:
don't have this setting explcitly set
dolphin --platform wayland and dolphin --platform xcb have everything
the same size. Even on a scaled display where one is scaled up by the
compositor and one is native.

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7185

M  +2    -0    startkde/startplasmacompositor.cmake

https://commits.kde.org/plasma-workspace/7cfdd9a5260b8bc6140a85270a6d6bb0cc98e009