Bug 377436 - Non-integer scaling values are not properly propagated to force fonts DPI setting
Summary: Non-integer scaling values are not properly propagated to force fonts DPI set...
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.9.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-09 20:44 UTC by Szymon Łągiewka
Modified: 2017-06-02 08:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Łągiewka 2017-03-09 20:44:07 UTC
For the entire time that I've been using HiDPI display (not so long, since december) I thought that scaling by factors different than 2 was not working for the whole desktop.
Yesterday I discovered that scaling by 1.6-1.9 can be easily achieved, but still does not work out of the box. One just needs to set desired scaling factor in Kscreen kcm and proceed to font settings kcm and use Force fonts DPI to Factor x 96 DPI.

Why is it a bug?
When scaling by 1.5, the force fonts DPI is automatically set to 144 (1.5 x 96).
When scaling by 2, the force fonts DPI is automatically set to 192 (2 x 96).

When scaling by anything between 1.6 and 1.9 (I suppose 1.1-1.4 as well), the force fonts DPI setting is not set at all, thus scaling is not complete.
The common thing between all of them is the fact, that when 96 is multiplied by this factor we get non integer DPI value (i.e. 163.2), which is probably not accepted by whatever is behind font settings.

Tested on X11 session. Reproducible: always.

Possible solutions:
Take the closest integer to the multiplied value (ceiling or floor)
or
if not every DPI (even integer) can be accepted (I see that arrow up/down in font settings change the value by 24 which is a quarter of 96 DPI) then the closest possible DPI value should be set.
Comment 1 Sebastian Kügler 2017-03-13 11:32:38 UTC
David, any thoughts on this?
Comment 2 David Edmundson 2017-06-02 08:20:18 UTC
Fixed in 5.10 with your first suggestion. 
Sorry it took so long, I hadn't seen this till now.