View previous topic :: View next topic |
Author |
Message |
Zarhan Veteran
Joined: 27 Feb 2004 Posts: 1010
|
Posted: Wed Sep 11, 2024 5:35 pm Post subject: Font sizes after upgrade to Plasma 6 |
|
|
Upgrade to Plasma/KDE 6 went otherwise without issues, however, my fonts sizes are all wrong.
I have a display where xdpyinfo (and DPMS) says that it's 157 DPI.
After the upgrade, all my fonts were ridiculously small. Looks like it's assuming 96 DPI screen.
However, in system settings setting "force font DPI" to 157 leads to ridiculously oversized display elements, instead (e.g. taskbar taking like 1/4 of the vertical length), and things like K menu fill the whole screen while the text size is fine. There's lots of empty space everywhere.
It's almost as the whole darn UI is assuming 96 DPI and not taking in the actual screen estate consumed by text.
Is there some best practice for this if I want font sizes to actually reflect e.g. paper size (so "pt" actually means the standard of 0.3515 mm)? That does not screw up ever other display element?
With KDE 5 everything just worked and made sense... |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 9261
|
Posted: Wed Sep 11, 2024 8:11 pm Post subject: |
|
|
Forget "Force Font DPI" and use
Display Configuration -> Scale
instead. |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 420
|
Posted: Thu Sep 12, 2024 12:41 am Post subject: |
|
|
"Force Font DPI" and use Display Configuration -> Scale do not actually accomplish the same thing. I appreciate that the KDE devs do not wish to support Force Font DPI anymore, but for some people with vision problems or extreme setups (85 inch montitor 18 feet away in industrial settings) Font DPI was a useful tool to increase only fonts and certain screen elements like the system tray icons. Scaling the display resolution scales everything, not just fonts. It also changes the screen real estate.
I would like to know where you (Zarhan) found "Force Font DPI" in System Settings in KDE 6? I thought it was removed. I do not see any such setting. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3416 Location: Canada
|
Posted: Thu Sep 12, 2024 4:09 am Post subject: |
|
|
rab0171610 wrote: | "Force Font DPI" and use Display Configuration -> Scale do not actually accomplish the same thing. I appreciate that the KDE devs do not wish to support Force Font DPI anymore, but for some people with vision problems or extreme setups (85 inch montitor 18 feet away in industrial settings) Font DPI was a useful tool to increase only fonts and certain screen elements like the system tray icons. Scaling the display resolution scales everything, not just fonts. It also changes the screen real estate.
I would like to know where you (Zarhan) found "Force Font DPI" in System Settings in KDE 6? I thought it was removed. I do not see any such setting. |
That is indeed one thing I could not stand on Mac OS - that to increase menu fonts you need to zoom the whole desktop. Saying that - can't one one just go to Settings/Fonts and change font sizes (option I could not find on Mac OS) ? |
|
Back to top |
|
|
Zarhan Veteran
Joined: 27 Feb 2004 Posts: 1010
|
Posted: Thu Sep 12, 2024 4:43 am Post subject: |
|
|
rab0171610 wrote: |
I would like to know where you (Zarhan) found "Force Font DPI" in System Settings in KDE 6? I thought it was removed. I do not see any such setting. |
The setting is in system settings => Text & Fonts => Fonts, right beneath the "sub-pixel rendering" and "hinting" settings for me. |
|
Back to top |
|
|
Zarhan Veteran
Joined: 27 Feb 2004 Posts: 1010
|
Posted: Thu Sep 12, 2024 4:47 am Post subject: |
|
|
asturm wrote: |
Display Configuration -> Scale
|
Nope, that just scales everything. As I said, I'd prefer the font sizes to represent paper sizes. I do plenty of documentation that sometimes gets printed so I want to have a proper WYSIWYG setup. If I *know* that a 12 pt font is 4.23mm both on display and on paper, it makes checking for readability on screen much easier.
The "Force font DPI" works fine for the *fonts* but the issue I have is that every other desktop element scales with the text too, and that's just weird. |
|
Back to top |
|
|
Zarhan Veteran
Joined: 27 Feb 2004 Posts: 1010
|
|
Back to top |
|
|
Zarhan Veteran
Joined: 27 Feb 2004 Posts: 1010
|
Posted: Thu Sep 12, 2024 5:19 am Post subject: |
|
|
Zarhan wrote: |
Anyway, some have found a proper workaround by setting either "QT_FONT_DPI" or "QT_USE_PHYSICAL_DPI" (hints to that in the final link).
|
Unfortunately, no dice. Those settings just bring the capability to set font DPI on Wayland side as well (where as on X11 you have that setting in the systemsettings). The screen elements still get ridiculously large and have huge spacings.
I was able to get a sort of ok-ish result by placing a ruler against my screen, opening some PDF with "100%" zoom and fiddling with the global scale until the actual size matched the real-world ruler size, but this is hardly ideal. |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 420
|
Posted: Thu Sep 12, 2024 2:24 pm Post subject: |
|
|
No it is not ideal for some of us. I understand that if people don't use this setting, they would probably not understand its usefulness. When discussing this in an online article, developer Nate Graham at KDE discussed how users were using this setting along with desktop scaling and it was creating issues. This was resulting in bug reports about UI elements and visual problems that were affected by more than one settings, complicating issues. I get it. But for people who know how to use the setting correctly, track their settings changes, and using the two settings independently of each other and understanding their effects, it is a non-issue. Desktop scaling is not an independent fix for font manipulation. Period.
I initially read that article many months ago. I was not happy about it then but there is nothing I can do about it. But I digress.
I appreciate the heads up about the Environment Variables. I was not aware of those. From my understanding of your comments, the setting you refer to in System Settings, Force Font DPI, no longer exists for me because I am using Wayland. I will look into those variables and see if they provide any use for me. Thanks for the heads up.
**On a side note, I noticed that despite all of my efforts to get desirable results in Firefox, the font still was too small (in KDE Plasma 6), despite my efforts. Ultimately, I found a solution. In about:config, searching for 'perpx', changing 'layout.css.devPixelsPerPx' to 2.5 from the default value of '1.0' along with desktop scaling was an effective setting. Depending on users individual needs, change the increments in values of 0.2 and monitor the effects. Other values may be more desirable in their respective setups. |
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 652
|
Posted: Thu Sep 12, 2024 2:35 pm Post subject: |
|
|
How does it behave if you use Code: | echo "Xft.dpi: 157" | xrdb -merge | then open a program? |
|
Back to top |
|
|
Zarhan Veteran
Joined: 27 Feb 2004 Posts: 1010
|
Posted: Thu Sep 12, 2024 2:53 pm Post subject: |
|
|
Ralphred wrote: | How does it behave if you use Code: | echo "Xft.dpi: 157" | xrdb -merge | then open a program? |
Pretty much same results as with the other methods. Font sizes are fine, but other screen elements have are ridiculously large in comparison (icons, spacings, etc). |
|
Back to top |
|
|
Zarhan Veteran
Joined: 27 Feb 2004 Posts: 1010
|
Posted: Thu Sep 12, 2024 2:57 pm Post subject: |
|
|
rab0171610 wrote: |
**On a side note, I noticed that despite all of my efforts to get desirable results in Firefox, the font still was too small (in KDE Plasma 6), despite my efforts. Ultimately, I found a solution. In about:config, searching for 'perpx', changing 'layout.css.devPixelsPerPx' to 2.5 from the default value of '1.0' along with desktop scaling was an effective setting. Depending on users individual needs, change the increments in values of 0.2 and monitor the effects. Other values may be more desirable in their respective setups. |
Thanks for this! I had also the font problem with Firefox. Resolved for FF now with this! |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 420
|
Posted: Thu Sep 12, 2024 9:19 pm Post subject: |
|
|
I decided after a year or more of using Wayland to go back to X11 for now because of this issue and also virtual keyboard (onboard). I am glad you pointed out that the "Force Font DPI" setting is still available under X in KDE 6, otherwise I would never had known about it. I had read last year it was being removed completely so maybe they took the feedback into consideration.
X+forced font DPI+100% scaling works much better for my crazy oversized,(85" screen at distances of over 18 feet) across the room setup that I am working with. Wayland worked well under KDE 5, but under 6 this issue was still bothersome, for me at least. The resolution under X11 is great at 100 percent, whereas under Wayland I was having to scale to 125%, while the fonts, even when setting at huge font sizes system-wide were still too small in most cases to read comfortably from a distance. This also allowed me to reset the Firefox perpx setting I mentioned ('layout.css.devPixelsPerPx) from a high of 2.5 back down to a minimal 1.4.
Also, the Force Font DPI setting in System Settings (still available under X only) also affects the System Tray icons in the panel. They are now scaled to a larger, more comfortable size.
The environment variables you referred to do not apply under Wayland as it gets its font DPI from the scaling settings:
https://doc.qt.io/qt-6/highdpi.html
Code: | Set the scale factor in display settings. On Ubuntu 20.04 and later this can be done per display, in increments of 25%. Earlier versions support setting a global scale to either 100% or 200%.
X11 Set Xft.dpi, or opt-in to use physical DPI.
Wayland Qt reads wl_output::scale, which is restricted to integer values. Wayland compositors typically have a configuration option for setting the scale factor, for example weston --scale.
EGLFS Set QT_FONT_DPI to the desired logical DPI value, for example QT_FONT_DPI=192. Qt assumes that the base DPI is 96, and scales the UI accordingly. |
|
|
Back to top |
|
|
|