User:Meskarune/fontconfig

From ArchWiki

Setting up fonts so they look nicer.

Packages

Packages to install for nice fonts and configuration.

Configuration and rendering

Fonts

Arch Packages

  • ttf-liberation - Font family with metric compatibility with Arial/Helvetica (sans-serif), Times New Roman (serif), and Courier New (monospace).

AUR Packages

Infinality Like Fonts/settings

Favorite Fonts

Directory locations

  • Fonts are installed in /usr/share/fonts
  • User installed fonts are in $HOME/.local/share/fonts
  • Global font configurations in /etc/fonts/
  • System/package font configurations in /usr/share/fontconfig
  • User font configuration in $HOME/.config/fontconfig

User Configuration

~/.config/fontconfig/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <include ignore_missing="yes">conf.d</include>
  <match target="font">
    <edit name="antialias" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
  <match target="font">
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>
  <match target="font">
    <edit name="lcdfilter" mode="assign">
      <const>lcddefault</const>
    </edit>
  </match>
  <match target="font">
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
  <match target="font">
    <edit name="hintstyle" mode="assign">
      <const>hintfull</const>
    </edit>
  </match>
  <match target="font">
    <edit name="autohint" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
  <match target="pattern">
    <edit name="dpi" mode="assign">
      <double>96</double>
    </edit>
  </match>
</fontconfig>