Bug 405572 - font dpi not saved/loaded correctly
Summary: font dpi not saved/loaded correctly
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fonts (show other bugs)
Version: 5.15.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-17 18:32 UTC by tusooa
Modified: 2019-07-11 13:50 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.16.4


Attachments
low-dpi systemsettings. Note that the font inside the window is much smaller than the font in window decoration. (133.67 KB, image/png)
2019-03-17 18:32 UTC, tusooa
Details
normal systemsettings (184.43 KB, image/png)
2019-03-17 18:33 UTC, tusooa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tusooa 2019-03-17 18:32:39 UTC
Created attachment 118866 [details]
low-dpi systemsettings. Note that the font inside the window is much smaller than the font in window decoration.

SUMMARY
Tested on Surface Pro 4. Use systemsettings to set both screen scaling and font DPI. Re-login and DPI is right for Plasma and applications restored from the saved session. Newly started applications are with tiny font. Go to systemsettings again to re-enforce the settings and new apps work right, just for this session though.

STEPS TO REPRODUCE
0. Login from SDDM.
1. System Settings -> Display and Monitor -> Displays -> Scale Display -> Set scale to `2` -> Apply
2. System Settings -> Fonts -> Fonts -> enable Force Fonts DPI -> set to `192` -> Apply
3. System Settings -> Startup and Shutdown -> Desktop Session -> On Login -> choose `Restore previous session`.
4. Close System Settings. Start a Konsole.
5. K-Menu -> Leave -> Logout
6. Re-login from SDDM.
7. Start another Konsole.
8. System Settings -> Fonts -> Disable `Force Fonts DPI` -> Apply -> Enable `Force Fonts DPI` -> set to `192` -> Apply
9. Restart System Settings.

OBSERVED RESULT
4. The Konsole starts with 192 DPI.
6. Plasma starts with 192 DPI. The Konsole, restored from the last session, starts with 192 DPI. However, when the cursor moves onto the window decorations (kwin), the cursor gets smaller than normal. The font size is right though.
7. The newly-started Konsole has tiny font.
8. The System Settings has tiny font.
9. System Settings starts with 192 DPI.

EXPECTED RESULT
All applications should start with 192 DPI, including kwin.


SOFTWARE/OS VERSIONS
Windows: N/A
MacOS: N/A
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.15.3
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.1 (built against 5.11.1)

ADDITIONAL INFORMATION
Comment 1 tusooa 2019-03-17 18:33:17 UTC
Created attachment 118867 [details]
normal systemsettings
Comment 2 Nate Graham 2019-03-18 14:48:03 UTC
If your end goal is to achieve high DPI scaling, the "Force Fonts DPI" setting is not the correct way to accomplish it. This is a historical holdover from an earlier time and isn't intended to be used to accomplish a high DPI setup. Try using System Settings > Display & Monitor > Scale >adjust the slider there > log out and log lack in.
Comment 3 tusooa 2019-03-20 01:38:24 UTC
(In reply to Nate Graham from comment #2)
> If your end goal is to achieve high DPI scaling, the "Force Fonts DPI"
> setting is not the correct way to accomplish it. This is a historical
> holdover from an earlier time and isn't intended to be used to accomplish a
> high DPI setup. Try using System Settings > Display & Monitor > Scale
> >adjust the slider there > log out and log lack in.

So I tested again, same steps in the description, but Step 2 changed to `disable Force Fonts DPI`, and Step 8 to `Adjust All fonts to another size -> Apply -> Adjust them to the original size -> Apply`. Same results.
Comment 4 tusooa 2019-03-20 01:41:56 UTC
The fact that Plasma panels and programs restored from the last session have normal sizes could indicate the problem may lie somewhere other than systemsettings (some other program during startup resets the font) which I do not know.
Comment 5 Eugene Shalygin 2019-07-02 01:04:06 UTC
Same problem here. Easy reproducible:

1. Enable "Force fonts DPI", set to any non-default value (use 128 here).
2. click "Apply", close systemsettings.
3. Open the fonts KCM again.

Result: "Force fonts DPI" is enabled, the value is reset to 96.
Comment 6 Adomas Jackevičius 2019-07-08 20:31:48 UTC
(In reply to Eugene Shalygin from comment #5)
> Same problem here. Easy reproducible:
> 
> 1. Enable "Force fonts DPI", set to any non-default value (use 128 here).
> 2. click "Apply", close systemsettings.
> 3. Open the fonts KCM again.
> 
> Result: "Force fonts DPI" is enabled, the value is reset to 96.

Not sure if your issue is same like in this bug-report. I have issue exactly like yours. I set "Force font DPI" to 144 to achieve 1.5 scaling. When I visit that KCM module again, it always shows 96, if I want to keep 144, I must set it to 144, otherwise any other action forces 96 to apply.
Comment 7 Adomas Jackevičius 2019-07-08 20:33:24 UTC
(In reply to Adomas Jackevičius from comment #6)
Forgot that this started with 5.16, and not 5.15 as in this report.

For sure we need a separate bug-report
Comment 8 Kai Uwe Broulik 2019-07-11 13:50:02 UTC
Git commit e9a38fbd4d6af2b3b5a5ab10417ab895ed13c12b by Kai Uwe Broulik.
Committed on 11/07/2019 at 13:49.
Pushed by broulik into branch 'Plasma/5.16'.

[Fonts KCM] Alter DPI only on explicit user interaction

The settings are loaded after the QML is created, and once it is loaded, it becomes indeterministic which property
(checkbox checked or spinbox value) is re-evaluated first and the Binding ends up resetting the config.
FIXED-IN: 5.16.4

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

M  +3    -7    kcms/fonts/package/contents/ui/main.qml

https://commits.kde.org/plasma-desktop/e9a38fbd4d6af2b3b5a5ab10417ab895ed13c12b