<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <!-- Default font (no fc-match pattern) -->
  <match>
    <edit mode="prepend" name="family">
      <string>Iosevka Aile</string>
    </edit>
  </match>

  <!-- Default font for the ja_JP locale (no fc-match pattern) -->
  <match>
    <test compare="contains" name="lang">
      <string>ja</string>
    </test>
    <edit mode="prepend" name="family">
      <string>Sarasa Fixed J</string>
    </edit>
  </match>

  <!-- Default sans-serif font -->
  <match target="pattern">
    <test qual="any" name="family"><string>sans-serif</string></test>
    <edit name="family" mode="prepend" binding="same"><string>Iosevka Aile</string></edit>
    <edit name="family" mode="append" binding="same"><string>Sarasa Fixed J</string></edit>
  </match>

  <!-- Default serif fonts -->
  <match target="pattern">
    <test qual="any" name="family"><string>serif</string></test>
    <edit name="family" mode="prepend" binding="same"><string>Iosevka Etoile</string></edit>
    <edit name="family" mode="append" binding="same"><string>Sarasa Fixed Slab J</string></edit>
  </match>

  <!-- Default monospace fonts -->
  <match target="pattern">
    <test qual="any" name="family"><string>monospace</string></test>
    <edit name="family" mode="prepend" binding="same"><string>Iosevka</string></edit>
    <edit name="family" mode="append" binding="same"><string>Sarasa Mono J</string></edit>
  </match>

  <!-- Fallback fonts preference order -->
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Iosevka Aile</family>
      <family>Noto Sans</family>
      <family>FreeSans</family>
      <family>Open Sans</family>
      <family>Droid Sans</family>
      <family>Ubuntu</family>
      <family>Roboto</family>
      <family>Sarasa Fixed J</family>
      <family>NotoSansCJK</family>
      <family>Source Han Sans JP</family>
      <family>IPAPGothic</family>
      <family>VL PGothic</family>
      <family>Koruri</family>
    </prefer>
  </alias>
  <alias>
    <family>serif</family>
    <prefer>
      <family>Iosevka Etoile</family>
      <family>Noto Serif</family>
      <family>FreeSerif</family>
      <family>Droid Serif</family>
      <family>Roboto Slab</family>
      <family>Sarasa Fixed Slab J</family>
      <family>IPAPMincho</family>
    </prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>Iosevka</family>
      <family>Noto Sans Mono</family>
      <family>FreeMono</family>
      <family>Inconsolatazi4</family>
      <family>Ubuntu Mono</family>
      <family>Droid Sans Mono</family>
      <family>Roboto Mono</family>
      <family>Sarasa Mono J</family>
      <family>IPAGothic</family>
    </prefer>
  </alias>
  <!-- <match target="font"> -->
  <!--   <edit name="antialias" mode="assign"> -->
  <!--     <bool>true</bool> -->
  <!--   </edit> -->
  <!--   <edit name="hinting" mode="assign"> -->
  <!--     <bool>true</bool> -->
  <!--   </edit> -->
  <!--   <edit name="hintstyle" mode="assign"> -->
  <!--     <const>hintnone</const> -->
  <!--   </edit> -->
  <!--   <edit name="rgba" mode="assign"> -->
  <!--     <const>none</const> -->
  <!--   </edit> -->
  <!--   <edit name="autohint" mode="assign"> -->
  <!--     <bool>false</bool> -->
  <!--   </edit> -->
  <!--   <edit name="lcdfilter" mode="assign"> -->
  <!--     <const>lcdnone</const> -->
  <!--   </edit> -->
  <!--   <edit name="dpi" mode="assign"> -->
  <!--     <double>96</double> -->
  <!--   </edit> -->
  <!-- </match> -->
</fontconfig>
