Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing font DPI has no effect #403

Open
tsujan opened this issue Mar 14, 2016 · 15 comments
Open

Changing font DPI has no effect #403

tsujan opened this issue Mar 14, 2016 · 15 comments

Comments

@tsujan
Copy link
Member

tsujan commented Mar 14, 2016

It's under Configuration Center → Appearance → Font → Resolution (DPI). The same setting has effect in KDE's systemsettings and if changed from 96 to 192, fonts will be double-sized.

Changing font resolution is needed with HDPI monitors. Please see lxqt/lxqt#916 (comment) !

@Vladimir-csp
Copy link

see #1129 Some applications ignore ~/.config/fontconfig/fonts.conf and look in xrdb

@Vladimir-csp
Copy link

Vladimir-csp commented Jul 25, 2017

there are currently three sources that various applications look for DPI settings:

  • fontconfig settings,
  • xrdb
  • randr settings (xdpyinfo | grep inch)

Setting DPI should affect all of them for consistent look.
In reverse, xrandr supports setting xrandr --dpi $OUTPUT_NAME to automatically set dpi to native of given output. I do not know the proper way to restore consistency if DPI is changed from the other end.

@Vladimir-csp
Copy link

@tsujan
Copy link
Member Author

tsujan commented Jul 25, 2017

@Vladimir-csp Thanks for the info!

My knowledge of this part of LXQt is poor; just reported the issue. I think @palinek and @luis-pereira could fix this.

@palinek, @luis-pereira any progress on this?

@Vladimir-csp
Copy link

Given my previous comments: what response should there be if display has changed, i.e. laptop is connected to a monitor with completely different dimensions?

I do not know it this is a proper place, but I hope some wise people will give some valuable info: I've started a topic 'Current state of DPI settings under X' on XDG mailing list. https://lists.freedesktop.org/archives/xdg/2017-July/013926.html

@Vladimir-csp
Copy link

I've messed around with various settings.
It appears that:
Qt5, Qt4 and GTK2 apps have this priority: xrdb, randr. They seem to ignore fontconfig
GTK3 apps look for Xft.dpi in xrdb, ignore everything else.
X apps (like conky) have this priority: fontconfig, xrdb, randr

@palinek
Copy link
Contributor

palinek commented Jul 26, 2017

@palinek, @luis-pereira any progress on this?

I didn't look into this yet..

@luis-pereira
Copy link
Member

Did not look into it. Helth issues in my family has taken all my "free" time.

@Vladimir-csp
Copy link

Bumped into new info in plain sight: According to this, Fontconfig will default to the Xft.dpi xrdb value if it is set.

Also a useful feature would be the ability to leave fontconfig DPI value unset.

@agaida
Copy link
Member

agaida commented Oct 6, 2018

ok, we should spend some time on it - it might be that i will be a victim of some HDPI issues soon - my new small monitor will arrive hopefully tomorrow ... 🕶️

EDIT: So nobody should be surprised or offended if i might force HDPI things in the next time, it's only scratching own itches.

@agaida
Copy link
Member

agaida commented Nov 6, 2018

Should be a breeze to fix at least the dpi thing - no release without it.

@agaida agaida transferred this issue from lxqt/lxqt Feb 8, 2019
@ghost
Copy link

ghost commented Jul 12, 2020

having this issue...
i had very small tiny fonts for some reason and i could disable dpi on xfce and it was fine (same effect as setting it to 95)
but on lxqt there's no option to disable it and setting it to any number does absolutely nothing

@ted1735
Copy link

ted1735 commented Jan 19, 2023

This is still an issue please kindly fix it.

@tsujan
Copy link
Member Author

tsujan commented Jan 19, 2023

If you want scaling with HDPI screens, you could use LXQt Session Settings → Global Screen Scaling.

@tsujan
Copy link
Member Author

tsujan commented Jan 19, 2023

An update on this may be needed after years:

Qt considers the default font DPI to be 96. Any change should be reflected in the EV QT_FONT_DPI. However, Qt5 and Q6 have different behaviors. In Qt5, setting QT_FONT_DPI just scales the texts, while in Qt6, it also scales the GUI.

Since we should port LXQt to Qt6, setting QT_FONT_DPI will interfere with QT_SCALE_FACTOR (LXQt Session Settings → Global Screen Scaling). QT_SCALE_FACTOR isn't ideal, because it doesn't take multi-screen setups into account, but it's practically good for now. With Qt6, we'll have to deal with these two EVs and more.

Add to this the behaviors of GTK3 and GTK4 (if we still want to support them), to see how complex the situation will be.

EDIT: Don't mistake the behavior of Fusion in Qt5 for a GUI scaling when QT_FONT_DPI is set. Qt5's Fusion just scales icons and some other GUI elements alongside texts, but the the whole GUI isn't scaled. Only Qt6 scales the whole GUI (with all styles).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants