<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <!-- Include the system defaults -->
  <include ignore_missing="yes">/etc/fonts/fonts.conf</include>
  <include ignore_missing="yes">/etc/fonts/conf.d</include>

  <!-- Custom overrides for Ghostty -->
  <!-- Force JetBrainsMono Nerd Font (and fallback to Noto Sans CJK JP) -->
  <match>
    <edit name="family" mode="prepend" binding="strong">
      <string>JetBrainsMono Nerd Font</string>
    </edit>
    <edit name="family" mode="append">
      <string>Noto Sans CJK JP</string>
    </edit>
    <edit name="family" mode="append">
      <string>FluentSystemIcons</string>
    </edit>
  </match>

  <!-- For Japanese text, prefer Noto Sans CJK JP -->
  <match>
    <test name="lang" compare="contains">
      <string>ja</string>
    </test>
    <edit name="family" mode="prepend" binding="strong">
      <string>Noto Sans CJK JP</string>
    </edit>
  </match>

  <!-- Monospace alias for Ghostty (so it uses the fixed‑width variant) -->
  <alias>
    <family>monospace</family>
    <prefer>
      <family>JetBrainsMono Nerd Font Mono</family>
      <family>Noto Sans Mono CJK JP</family>
      <family>DejaVu Sans Mono</family>
      <family>Noto Sans Mono</family>
    </prefer>
  </alias>
</fontconfig>

