Bug 395575 - It's not possible to lower the DPI to values smaller than 96
Summary: It's not possible to lower the DPI to values smaller than 96
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fonts (show other bugs)
Version: 5.13.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-18 18:32 UTC by Matheus Gritz
Modified: 2018-12-11 14:42 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matheus Gritz 2018-06-18 18:32:11 UTC
Distro: Manjaro KDE Edition 17.1.10
Qt: 5.11.0
KDE Plasma: 5.13.0
KDE Frameworks: 5.47.0
systemsettings5 version: 5.13.0

Steps to Reproduce:
1. Open System Settings
2. Select "Fonts"
3. Toggle "Force Fonts DPI"
4. Try to lower the DPI to a value smaller than 96.
5. Writing the number greys out the "Apply" button and the down arrow is not clickable.

Ever since the 5.13 update, I'm no longer able to lower the font DPI to values smaller than 96. Using the default DPI scaling makes windows, buttons, widgets and other elements too big in my laptop, taking most of the space of the screen.
Comment 1 Keren Sky 2018-07-10 21:10:58 UTC
I too am seeing that not possible to lower the DPI to values smaller than 96. It is possible to click in the box for the DPI value, erase the 96 and enter, for example, 85. But the change does not seem to be saved.
Comment 2 Christoph Feck 2018-08-02 20:46:09 UTC
It could be related to Qt not working with scale factors < 1 and the scale factor being computed with DPI/96.

Is your hardware actually a screen with less than 96 DPI? If yes, it probably is a big TV/Flatscreen, and you might check if it is possible to make Plasma believe it has 96 DPI (or larger), and do any further adjustments via font sizes or scaling factors.
Comment 3 David Edmundson 2018-08-02 22:48:52 UTC
Nah, it's just someone setting the minimum value in the fonts rewrite.

However, I haven't fixed it because setting a DPI of 96 doesn't really make sense.  DPI is historically there for the subpixel hinting. If one wants a smaller size, they can select a smaller point size instead of faking their monitor DPI to do it
Comment 4 mercuriete 2018-12-07 17:30:42 UTC
I can confirm this is a issue.

My screen is a Samsung S27F358.

not too big screen (27 inches)
but has low resolution (1920x1080)

If you do the calculations the dpi is something near 82 dpi.

The documentation of libreoffice says the following:

https://wiki.documentfoundation.org/Development/HiDpi

KDE: In 4.x system settings, under Application Appearance - Fonts, you can set the "Force fonts DPI" to 192. When this is set, the LibreOffice HiDPI mode kicks in.


So in my case I need to set "force fonts dpi" to 82 to see real size letters and paper sizes.

right now I see a ISO A4 too big compared with the reality. And the ruler shows fake centimeters.


the workaround is:

https://www.reddit.com/r/kde/comments/8ryn0a/513_i_can_no_longer_change_font_to_dpi_96/

When I force the dpi in .config/kcmfonts to 82, libreoffice shows a paper size more realistic and the ruler is more real.
Comment 5 David Edmundson 2018-12-07 18:01:52 UTC
Fake ruler should be based on the DPI, not the logical DPI, anything else is inherently wrong.

Font DPI only changes logical DPI.
Comment 6 mercuriete 2018-12-07 18:20:18 UTC
Not sure what do you mean by logical dpi.

If this is a bug in libreoffice feel free to report there.

The behaviour in libreoffice is that if you change that setting, the paper size and the font size changes.

So libreoffice writer with low dpi screens is broken in plasma because I cant set the dpi in systemsettings.

Maybe I am missing something.

Thanks for your quick response
Comment 7 David Edmundson 2018-12-11 11:29:21 UTC
Git commit 61b6e098f82566f289e95938de7789fdc84ec345 by David Edmundson.
Committed on 11/12/2018 at 11:29.
Pushed by davidedmundson into branch 'master'.

[kcms/fonts] Don't set minimium DPI value

Summary:
The QML port added a minimum value for the font DPI, the old widgets
code goes went 1 to 1000.

A slight bodge is needed to make sure we start at 96 when a user first
toggles force font DPI, which used to implicitly work as a minimum was
set.

Test Plan:
Set different value, looked at xrdb -q | grep -i dpi
Cleared
set another value

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

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

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

https://commits.kde.org/plasma-desktop/61b6e098f82566f289e95938de7789fdc84ec345
Comment 8 David Edmundson 2018-12-11 13:30:05 UTC
>Not sure what do you mean by logical dpi.

Copying QScreen docs, but the terms apply externally.

A note on logical vs physical dots per inch: physical DPI is based on the actual physical pixel sizes when available, and is useful for print preview and other cases where it's desirable to know the exact physical dimensions of screen displayed contents.

Logical dots per inch are used to convert font and user interface elements from point sizes to pixel sizes, and might be different from the physical dots per inch. The logical dots per inch are sometimes user-settable in the desktop environment's settings panel, to let the user globally control UI and font sizes in different applications.


----

I added the setting back as I don't think it was changed intentionally, but what you're describing does sound like a libreoffice bug.