Bug 273343 - DPI is inconsistent between the plasma desktop and other apps
Summary: DPI is inconsistent between the plasma desktop and other apps
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: 4.9.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-15 15:15 UTC by Julian Sikorski
Modified: 2018-06-08 19:06 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Kwin and plasma fonts don't match (352.07 KB, image/png)
2013-06-15 08:02 UTC, Alexander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Sikorski 2011-05-15 15:15:10 UTC
Version:           4.6 (using KDE 4.6.2) 
OS:                Linux

Originally reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=704842

A picture says more than a thousand words:
http://belegdol.fedorapeople.org/kdefonts.png
I have a 1920x1080 15.6' screen. As I was told, gnome overrides the dpi (to 96 it seems), while KDE uses the real one:

$ xdpyinfo | grep -B1 dot
  dimensions:    1920x1080 pixels (351x191 millimeters)
  resolution:    139x144 dots per inch

The problem is that plasma desktop seems started before the dpi gets detected, resulting in fonts smaller than everything else. Overriding the dpi to 96 seems to bring the consistency back (systemsettings in this screenshot was started after the override):
http://belegdol.fedorapeople.org/kdefonts2.png

Reproducible: Always

Steps to Reproduce:
1. Log in to KDE desktop on a high dpi screen
2. Start an application

Actual Results:  
Font sizes are inconsistent

Expected Results:  
Font sizes remain the same
Comment 1 Rex Dieter 2011-05-15 23:45:11 UTC
confirmed.

my experience does tell me that qt/kde indeed does respect dpi as reported by your system whereas gtk/gnome generally hard-codes 96 (or 120 in some circumstances).  I'm not sure there's much to do until that fundamental difference is resolved.
Comment 2 Christoph Feck 2011-09-26 00:20:42 UTC
Looking at similar reports (bug 179962, bug 171683), I feel that this bug is specific to Fedora.
Comment 3 Kevin Kofler 2011-09-26 00:33:21 UTC
It's probably specific to distros using xsettings-kde. But xsettings-kde should be setting the DPI xsettings to the same value as the KDE settings. And why is Qt looking at xsettings in the first place? Normally, those are only used by GTK+ apps.
Comment 4 Matija Šuklje 2012-05-02 21:32:58 UTC
Since at least in my case (ThinkPad T400s, intel drivers), xdpyinfo shows wrong phsyical size of the display and therefore DPI (96, instead of 120), while xrandr guessed both correctly, I would rather like to have Qt/KDE guess the DPI from xrandr.

From what I heard on #intel-gfx channel, it also seems like xrandr is in general a lot more reliable then xdpyinfo.
Comment 5 Julian Sikorski 2012-06-03 08:34:24 UTC
This is still the case with KDE 4.8.1 and Fedora 17.
Comment 6 Eugene Shalygin 2012-08-16 10:48:38 UTC
Same here with Gentoo and KDE 4.9

$ xdpyinfo | grep -B1 dot
  dimensions:    1920x1080 pixels (407x229 millimeters)
  resolution:    120x120 dots per inch
which is correct.

Fonts in Plasma and windows titlles are smaller (96 DPI?), while all other - 120. If "Force  fonts DPI" option in System Settings is set, Plasma and KWin use that value
Comment 7 Alexander 2013-06-15 07:17:21 UTC
Have the same issue. My resolution is 2560x1440 and dpi is 109. I set it in X11 config, kde systemsetting and even in kdmrc and still plasma and kwin fonts are smaller.

Using Arch Linux with
Qt: 4.8.4
KDE: 4.10.4
kde4-config: 1.0
Comment 8 Alexander 2013-06-15 08:02:40 UTC
Created attachment 80522 [details]
Kwin and plasma fonts don't match

Please look at Kwin window titles and desktop icon fonts, they are smaller than in other apps.

Also can confirm that kwin --replace and killall plasma-desktop && plasma-desktop fixes the issue.

Best,
Alex
Comment 9 Nate Graham 2018-06-08 19:06:56 UTC
Hello!

This bug report was filed for KDE Plasma 4, which reached end-of-support status in August 2015. KDE Plasma 5's desktop shell has been almost completely rewritten for better performance and usability, so it is likely that this bug is already resolved in Plasma 5.

Accordingly, we hope you understand why we must close this bug report. If the issue described  here is still present in KDE Plasma 5.12 or later, please feel free to open a new ticket in the "plasmashell" product after reading https://community.kde.org/Get_Involved/Bug_Reporting

If you would like to get involved in KDE's bug triaging effort so that future mass bug closes like this are less likely, please read https://community.kde.org/Get_Involved#Bug_Triaging

Thanks for your understanding!

Nate Graham