You are not logged in.

#26 2026-06-08 21:27:53

sebalis
Member
Registered: 2016-12-22
Posts: 20

Re: fontconfig-2:2.18.x - broken fonts?

This issue made me go back to 2.17.1 even though my other problem (KeePassXC crashing) never reappeared after I cleared the cache. It seems like my $HOME/.config/fontconfig/fonts.conf file is being ignored by 2.18.1. I’ll be watching this thread for updates.

Offline

#27 2026-06-09 06:29:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: fontconfig-2:2.18.x - broken fonts?

It seems like my $HOME/.config/fontconfig/fonts.conf is being ignored

cat $HOME/.config/fontconfig/fonts.conf
fc-conflist
fc-match -s sans-serif

Offline

#28 2026-06-09 08:26:30

sebalis
Member
Registered: 2016-12-22
Posts: 20

Re: fontconfig-2:2.18.x - broken fonts?

I assume you’re asking me to run these commands and post the output.

• My fonts.conf: https://paste.c-net.org/ElegantEvans

• The two commands with version 2.17.1: https://paste.c-net.org/ClickedGatorade

• The two commands with version 2.18.1: https://paste.c-net.org/OiledMorphine

This service invents funny names :-) Most of what is listed under http://wiki.archlinux.org/title/List_of … ted_client (your “How to upload text” link) didn’t work for me. 0x0.st has stopped accepting uploads, saying there is too much AI slop. The one instance of PrivateBin that I tried (anonpaste.org) has a max retention of one day. termbin.com didn’t work as expected (ran “echo just testing! | nc termbin.com 9999” and the command did not terminate).

Offline

#29 2026-06-09 11:59:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: fontconfig-2:2.18.x - broken fonts?

+ /home/sebastian/.config/fontconfig/fonts.conf: No description

Is sourced in either but oc 2.18 introduces

+ /etc/fonts/conf.d/48-guessfamily.conf: Guess a generic-family for substitution

which seems to get in the way for many people.
=> remove that file, see whether sans-serif is now resolved as Arimo w/ 2.18

Offline

#30 2026-06-11 13:10:27

rochus
Member
Registered: 2007-02-14
Posts: 96

Re: fontconfig-2:2.18.x - broken fonts?

removing 48-guessfamily.conf solved the issue for me.

Offline

#31 2026-06-18 06:39:01

joveian
Member
Registered: 2026-06-17
Posts: 1

Re: fontconfig-2:2.18.x - broken fonts?

It took me a while to get my default fonts working again but I think I'm starting to have the slightest hint of an idea how fontconfig works hmm.  The core issue that affected me seems to be that some fonts define their generic family but others don't (at least I assume so, they end up with 0 as the value, see man fonts.conf for the list of constant names and values) and the generic family is higher in the match priority than the default "weak" binding of the family when setting preferred fonts via the methods the arch wiki documents.  This means a random font that does have the generic family correctly set gets picked instead of what I wanted.

There are two basic ways to fix this:

  1. The correct way: add correct genericfamily settings for each font without it (it sounds like fontconfig is planning to do this for fonts mentioned in their config files so just waiting a bit should help):

    <fontconfig>
      <match target="scan">
        <test name="family"><string>Font Name</string></test>
        <edit name="genericfamily" mode="assign_replace" binding="same">
          <const>genericfamily</const>
        </edit>
      </match>
    </fontconfig>

    Of course replace Font Name with the family name of your font and the genericfamily inside the const tags with one of the generic names from man fonts.conf (use multiple const sections if you want it to have multiple generic families).  You can use

    fc-list ':' family genericfamily | grep 'genericfamily=0'

    to get a list of fonts that don't have the genericfamily set.  Run fc-cache -r as root and each user after changing this configuration (also I found some stale cache data in /var/cache/fontconfig even after fc-cache -r so maybe first rm -rf /var/cache/fontconfig and each user's ~/.cache/fontconfig, though I didn't see any sign it is used).

  2. Use strong bindings to set family preferences, with binding="strong" on either the alias or edit tags.  However, a disadvantage of doing this is that the strong family binding has higher priority than both the language and a postscript name provided by the application so it seems like this would produce worse results unless you do more complex matching before setting the high priority family binding.  It sounds like the strong binding is intended to apply to what the application requests.

I've spent way to much time on fontconfig without having even a basic idea how it works so hopefully this summary will help someone.  There are three basic stages corresponding to the three possible values of the target property of the match tag.  First, target="scan" is what fc-cache does and it builds a database describing each available font.  This is where rejectfont and acceptfont are applied and is why target="scan" is needed to set the genericfamily property of a font and why fc-cache -r is needed (well, the -r is needed because the cache doesn't seem to get invalidated if the config changes).  The second stage is target="pattern", the default target of match tags.  The application provides details about what it cares about to fontconfig and configuration can modify that information before it is used to lookup fonts from the cache based on the priority order linked above.  Once fonts are selected the third target="font" stage is run where font features can be altered and some other settings like hinting and subpixel rendering (any settings that affects rendering rather than lookup).

Offline

#32 2026-06-18 11:59:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: fontconfig-2:2.18.x - broken fonts?

Use strong bindings to set family preferences, with binding="strong" on either the alias or edit tags.  However, a disadvantage of doing this is

https://gitlab.freedesktop.org/fontconf … te_3495008
You might want to address that in the wiki once it's no longer 502

Offline

#33 2026-06-23 13:52:50

Heku
Member
Registered: 2023-07-05
Posts: 13

Re: fontconfig-2:2.18.x - broken fonts?

Removing 48-guessfamily.conf works for me too, thanks.

Offline

#34 2026-06-23 14:11:46

Heku
Member
Registered: 2023-07-05
Posts: 13

Re: fontconfig-2:2.18.x - broken fonts?

I just found a better solution from latest Arch wiki:

Fontconfig 2.18.0 introduced new "genericfamily" feature [1]. It is enabled by default via 48-guessfamily.conf preset and takes precedence over weak aliases for generic family names. Use binding="strong" to override it.

And it works for me.

Offline

Board footer

Powered by FluxBB