Bug 470138 - Accent colors ruin HiDPI text globally
Summary: Accent colors ruin HiDPI text globally
Status: RESOLVED NOT A BUG
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-22 17:55 UTC by Maximilian Böhm
Modified: 2023-05-26 14:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maximilian Böhm 2023-05-22 17:55:07 UTC
Accent colors ruin HiDPI text globally.
This is a bug I got to observe since the introduction of accent colors but always thought, it’s such a striking problem, you will probably fix it soon. But it is still present in Plasma 5.27.5.

When I set to use an accent color, all my programs are falling back to non-HiDPI font rendering. Both Qt and GTK. Relogin doesn’t help. Makes no difference if I chose the accent color from my wallpaper or a custom color. Only setting the default non-accent followed by a relogin does reset my HiDPI fonts.
X.org session on 4K resolution with global HiDPI slider at 162,5%, sets the fonts DPI to 162.

I made you a screencast: https://youtu.be/HQ9K_nyL3jo 
(Downscaled to FHD)

KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Comment 1 Nate Graham 2023-05-22 20:45:11 UTC
From what I can tell in your screen recording, the fonts get *smaller* in newly-launched apps after you set an accent color. That's extremely odd and I can't recall any other reports of it.

> but always thought, it’s such a striking problem, you will probably fix it soon
Unfortunately issues that affect you don't always effect everyone else. This is why it's always important to submit bug reports and not assume that someone else has already noticed the issue and is in the process of fixing it.

Can you do the following?
1. Unset accent color and reboot
2. In a terminal window, run `cp ~/.config/kcmfonts ~/.config/kcmfonts.ORIG && cp ~/.config/kdeglobals ~/.config/kdeglobals.ORIG`
3. Set an accent color to trigger the bug; verify by launching an app and seeing that it's messed up
4. In a terminal window, run `diff ~/.config/kcmfonts ~/.config/kcmfonts`
5. Paste the output into a comment here
6. In a terminal window, run `diff ~/.config/kdeglobals ~/.config/kdeglobals.ORIG`
7. Paste the output into a comment here
8 In a terminal window, `rm ~/.config/kdeglobals.ORIG ~/.config/kdeglobals.ORIG`


Thanks!
Comment 2 Maximilian Böhm 2023-05-23 19:05:37 UTC
The resulting 'smaller' fonts are just their standard size without any HiDPI adjustments (probably 96 dpi). This bug ruins the HiDPI setting getting applied to fonts on my machine.

You know, there are other stunning visual bugs like the freezing of window previews in the new WindowHeap Desktop Grid effect for about a year now which isn’t getting fixed despite a bug report (456280) what makes me feel like this just is the state of things with Plasma QA in general.

Between ~/.config/kcmfonts and ~/.config/kcmfonts.ORIG are no differences.
Content:
[General]
dontChangeAASettings=true
forceFontDPI=162


diff ~/.config/kdeglobals ~/.config/kdeglobals.ORIG:

30c30
< BackgroundAlternate=217,186,140
---
> BackgroundAlternate=163,212,250
32,34c32,34
< DecorationFocus=203,158,93
< DecorationHover=203,158,93
< ForegroundActive=203,158,93
---
> DecorationFocus=61,174,233
> DecorationHover=61,174,233
> ForegroundActive=61,174,233
36c36
< ForegroundLink=203,158,93
---
> ForegroundLink=41,128,185
46,48c46,48
< DecorationFocus=203,158,93
< DecorationHover=203,158,93
< ForegroundActive=203,158,93
---
> DecorationFocus=61,174,233
> DecorationHover=61,174,233
> ForegroundActive=61,174,233
50c50
< ForegroundLink=203,158,93
---
> ForegroundLink=29,153,243
60,62c60,62
< DecorationFocus=203,158,93
< DecorationHover=203,158,93
< ForegroundActive=203,158,93
---
> DecorationFocus=61,174,233
> DecorationHover=61,174,233
> ForegroundActive=61,174,233
64c64
< ForegroundLink=203,158,93
---
> ForegroundLink=41,128,185
86,92c86,92
< BackgroundAlternate=218,187,141
< BackgroundNormal=218,187,141
< DecorationFocus=203,158,93
< DecorationHover=203,158,93
< ForegroundActive=203,158,93
< ForegroundInactive=0,0,0
< ForegroundLink=203,158,93
---
> BackgroundAlternate=163,212,250
> BackgroundNormal=61,174,233
> DecorationFocus=61,174,233
> DecorationHover=61,174,233
> ForegroundActive=255,255,255
> ForegroundInactive=112,125,138
> ForegroundLink=253,188,75
95c95
< ForegroundNormal=0,0,0
---
> ForegroundNormal=255,255,255
102,104c102,104
< DecorationFocus=203,158,93
< DecorationHover=203,158,93
< ForegroundActive=203,158,93
---
> DecorationFocus=61,174,233
> DecorationHover=61,174,233
> ForegroundActive=61,174,233
106c106
< ForegroundLink=203,158,93
---
> ForegroundLink=41,128,185
116,118c116,118
< DecorationFocus=203,158,93
< DecorationHover=203,158,93
< ForegroundActive=203,158,93
---
> DecorationFocus=61,174,233
> DecorationHover=61,174,233
> ForegroundActive=61,174,233
120c120
< ForegroundLink=203,158,93
---
> ForegroundLink=41,128,185
130,132c130,132
< DecorationFocus=203,158,93
< DecorationHover=203,158,93
< ForegroundActive=203,158,93
---
> DecorationFocus=61,174,233
> DecorationHover=61,174,233
> ForegroundActive=61,174,233
134c134
< ForegroundLink=203,158,93
---
> ForegroundLink=41,128,185
149d148
< AccentColor=203,158,93
158d156
< accentColorFromWallpaper=true
Comment 3 Nate Graham 2023-05-24 15:50:44 UTC
> The resulting 'smaller' fonts are just their standard size without any HiDPI adjustments (probably 96 dpi)
Yes, that's extremely weird. I don't see how it could be happening. It's not happening to me, and apparently not to anyone else using fractional scaling on X11. What distro are you using? How is your Fontconfig set up? Have you by any chance made any custom changes to it?
Comment 4 Maximilian Böhm 2023-05-24 19:02:25 UTC
Arch Linux with standard fontconfig.
Tried with a new user account. On this account, I don’t get into this problem.
There must be something wrong with my config… Are there other files we could compare?
Comment 5 Nate Graham 2023-05-26 14:20:00 UTC
Unfortunately you've reached the limit of my knowledge. I don't know, sorry. But regardless, it doesn't seem like it's caused by a code defect. Perhaps you can start a thread about it in https://discuss.kde.org/ to try to find the exact setting that's causing it. Perhaps some an ancient stale config left over from years ago.