Skip to content

Instantly share code, notes, and snippets.

@codebrainz
Last active December 14, 2018 08:06
Show Gist options
  • Save codebrainz/8621904 to your computer and use it in GitHub Desktop.
Save codebrainz/8621904 to your computer and use it in GitHub Desktop.
fontconfig settings
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Disable "faked bold" done when font doesn't have bold style
-->
<match target="font">
<test name="spacing" compare="eq">
<const>mono</const>
</test>
<edit name="embolden" mode="assign">
<bool>false</bool>
</edit>
</match>
<!--
Monaco font has bad shapes and is angular without autohinting and the
kerning gets ruined if the hinting is left on.
-->
<match target="font">
<test compare="eq" name="family">
<string>Monaco</string>
</test>
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
</match>
<!--
Consolas font is made way too sharp and thick with hinting.
-->
<match target="font">
<test compare="eq" name="family">
<string>Consolas</string>
</test>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
</match>
<!--
Inconsolata is way too small and fuzzy without autohinting.
-->
<match target="font">
<test compare="eq" name="family">
<string>Inconsolata</string>
</test>
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>
<!--
NovaMono and Crystal are too tall and sharp without autohinting but
without hinting the kerning gets messed up at small sizes.
-->
<match target="font">
<or>
<test compare="eq" name="family">
<string>NovaMono</string>
</test>
<test compare="eq" name="family">
<string>Crystal</string>
</test>
</or>
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintfull</const>
</edit>
</match>
</fontconfig>
@codebrainz
Copy link
Author

Goes in ~/.config/fontconfig/fonts.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment