r/archlinux • u/_zepar • 1d ago
SUPPORT Fontconfig: weird behaviour when setting system-ui
when i fc-match "system ui" it successfully binds to Roboto, but when i fc-match "system-ui" it binds to noto sans
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias binding="strong">
<family>serif</family>
<prefer>
<family>Noto Serif</family>
</prefer>
</alias>
<alias binding="strong">
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
</prefer>
</alias>
<alias binding="strong">
<family>monospace</family>
<prefer>
<family>Jetbrains Mono</family>
</prefer>
</alias>
<alias binding="strong">
<family>system-ui</family>
<prefer>
<family>Roboto</family>
</prefer>
</alias>
</fontconfig>
this is my /etc/fonts/local.conf
0
Upvotes
1
u/Vegetable-Company572 1d ago
you've got "system ui" with a space matching roboto but "system-ui" with a hyphen falling back to noto sans, that's the issue. fontconfig treats hyphenated family names differently, the alias for system-ui is probably being overridden by the sans-serif preference since noto sans gets picked up first in the fallback chain
try adding the hyphenated alias before the generic sans-serif alias in your config, or check if there's another config file in /etc/fonts/conf.d that's messing with system-ui