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

It is lack support for font size and subpixel rendering #84

Open
iamzhaohongxin opened this issue May 30, 2021 · 10 comments
Open

It is lack support for font size and subpixel rendering #84

iamzhaohongxin opened this issue May 30, 2021 · 10 comments

Comments

@iamzhaohongxin
Copy link

No description provided.

@grulja
Copy link
Collaborator

grulja commented May 31, 2021

Description from RH bugzilla since this bug doesn't provide any:

Description of problem:

When enable subpixel rendering in GNOME tweaks, all gtk software work properly.
But fontconfig does not work on Qt software.

It seem that QtWayland does not work as Qt on X11.

This problem could be resolved by manually create fonts.conf on /home/username/.config/fontconfig/, but Qt program's font size is still cannot be set. 

Another solution is using qt5ct, but this software has many bug with QtWayland,
include GTK's window manager loses theme and cannot load icon theme file.  

I will submit bug report for qt5ct later.


Version-Release number of selected component (if applicable):

Fedora 34 x86_64
GNOME 40 and wayland session
Qt5 programs

How reproducible:

Everytime

Steps to Reproduce:
1. Install gnome-treak and enble subpixel rendering
2. Install some qt based software such as qbittorrent
3. Open qbittorrent

Actual results:

qbittorrent's UI does not enable subpixel rendering and font size is unchange.

Expected results:

As other GTK based software.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Sep 29, 2021

But fontconfig does not work on Qt software.

fontconfig works on Qt software, it's GNOME who doesn't use fontconfig to set font settings...

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Sep 29, 2021

Maybe it's better to file a bug for GNOME and ask them to set font settings in a standardized way instead of doing hacks in Qt?

@RushingAlien
Copy link

Hello! May I add that Qt fonts do scale according to gnome-tweaks for Qt apps on xwayland (QT_QPA_PLATFORM=xcb), but not for native wayland, (QT_QPA_PLATFORM=wayland)

@RushingAlien
Copy link

But fontconfig does not work on Qt software.

fontconfig works on Qt software, it's GNOME who doesn't use fontconfig to set font settings...

@ilya-fedin
If that is the case, why is my fontconfig settings in ~/.config/fontconfig/fonts.conf being ignored?
I set a dpi setting of 120

@ilya-fedin
Copy link
Contributor

Because Qt doesn't read it? I believe Qt supports only a small subset of options like those related to hinting and antialiasing

@RushingAlien
Copy link

I see, so you can't set font size and scale factor via fontconfig

@ilya-fedin
Copy link
Contributor

Yeah, Qt has no platform backend supporting text scaling even though its abstraction can theoretically do that

@RushingAlien
Copy link

Does KDE or the KDE platform theme do anything special in this regard?

@ilya-fedin
Copy link
Contributor

Yeah, they have a plenty of hacks via Qt's debug environment variables (like QT_SCREEN_SCALE_FACTORS) which have a side effect of forcing modes applications may not support and resulting in broken scaling

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

4 participants