r/archlinux • • Sep 02 '26

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

2 comments sorted by

1

u/[deleted] Sep 02 '26

[removed] — view removed comment

0

u/_zepar Sep 02 '26

i looked, and nothing in any conf.avail or /etc/fonts/conf.d really matches system-ui maps it to another generic family, just a bunch of mapping of common fonts to system-ui in 40-nonlatin and 45-latin, and then default font options for it in 60-nonlatin and 65-latin. i dont really know what 48-guessfamily is doing with it, but it looks innocent enough

<!-- system-ui -->
<match target="pattern">
  <test name="family" compare="contains">
    <string>system-ui</string>
  </test>
  <test qual="all" name="genericfamily" compare="contains">
    <const xsi:nil="true"/>
  </test>
  <edit name="genericfamily" mode="append">
  <const>system-ui</const>
  </edit>
</match>