FedoraQt/QGnomePlatform

It is lack support for font size and subpixel rendering

Opened this issue · 10 comments

It is lack support for font size and subpixel rendering

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.

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...

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?

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)

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

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

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

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

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

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