You are not logged in.
Everything was tested on a fresh install in a VM.
~/.config/fontconfig/fonts.conf:
<fontconfig>
<match target="font">
<edit mode="assign" name="antialias">
<bool>false</bool>
</edit>
</match>
</fontconfig>The above configuration should disable all font anti-aliasing, it applies to all GTK3 (thunar, xfce4-panel), GTK4 and Qt 5 (mumble, quasselclient, qt5ct) applications, but is ignored by Qt6 (qt6ct, audacious, telegram-desktop). Previous versions of Qt 6 respected fontconfig settings.
Searching online I found some reports of this happening, and it seemed to be caused by qt6 using its built-in freetype, instead of the one supplied by the system, so i rebuilt the qt6-base package myself, and the configuration said that it was using system freetype.
If this is intended, and system fontconfig usage is deprecated, is there another method for changing parameters per font? I used fontconfig to disable anti-aliasing on specific fonts. While its still possible to disable it in Qt 6 by changing font settings in xfce4, this will apply to all fonts.
Am i doing something wrong or is this an actual bug that i should be reporting to Qt developers instead of crying on archlinux forums
Last edited by shestifled (2024-10-18 19:26:54)
Offline
While its still possible to disable it in Qt 6 by changing font settings in xfce4, this will apply to all fonts.
But the suggested fontconfig would do exactly that?
I assume the xfce4 config take precedence, possibly because of a platform plugin? Or it prefers xrdb?
fc-conflist # with your personal fonts config
xrdb -q | grep -i xftPrevious versions of Qt 6 respected fontconfig settings.
Font clipping was broken as well, so there's a good chance this is a regression bug in Qt 6.8 w/ major changes to the rasterizer.
Online
But the suggested fontconfig would do exactly that?
The provided config is only an example, my actual config is more complex and disables anti-aliasing for specific fonts.
I assume the xfce4 config take precedence
Turns out this is actually the case! For whatever reason the Xft.antialias entry in the xrdb overrides my fontconfig, but only in qt6!
Here is what my xrdb looks like when set up by xfce4:
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: rgb
Xft.dpi: 96
Xcursor.theme: default
Xcursor.size: 16
Xcursor.theme_core: 1If I remove the Xft.antialias option (not setting to 0, just removing it completely), all application still apply anti-aliasing to all fonts by default, and now I'm able to disable it per font in Qt 6 applications! This solution is not perfect, as changing any xrdb altering settings in xfce4 will add the entry back.
If every other framework (gtk, qt5) prioritizes fontconfig over xrdb, does it mean its a bug?
Offline
It's certainly an odd choice to have the general xft config obliterate the fontconfig details and if this has behaved different w/ Qt 6.7 (assumign you didn't also update/switch to xfce4) it's a regression and probaby undesired bug.
=> https://bugreports.qt.io/browse/QTBUG-5 … 0%22xft%22 actually has quite a bunch of hits and https://bugreports.qt.io/browse/QTBUG-56809 suggests the Qt5 behavior was objected.
Online
My solutions for now:
Adding this file to xfce4 session autorun:
#!/bin/sh
echo """Xft.hinting:1
Xft.hintstyle:hintfull
Xft.rgba:rgb
Xft.dpi:96
Xcursor.theme:default
Xcursor.size:16
Xcursor.theme_core:1""" | xrdbOf course you should use your own settings for the cursor and hinting and stuff, and it will reset every time you change stuff in the settings manager.
Thanks for all the help! I didn't even know that anti-aliasing options can be applied through xrdb!
Offline
xrdb -q | grep -vi antialias | xrdbOnline