Skip to content

Instantly share code, notes, and snippets.

@AnwarShah
Created February 25, 2018 04:02
Show Gist options
  • Save AnwarShah/033246bc1f1cfa610858def56f16c08a to your computer and use it in GitHub Desktop.
Save AnwarShah/033246bc1f1cfa610858def56f16c08a to your computer and use it in GitHub Desktop.
Replace thin fonts with ultralight using fontconfig
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- replace thin fonts for fira with ultralight, since thin is too light -->
<match target="font">
<test name="family" compare="contains">
<string>Fira Sans</string>
</test>
<test name="weight" compare="less_eq">
<const>thin</const>
</test>
<edit name="weight" mode="assign" binding="same">
<const>ultralight</const>
</edit>
</match>
</fontconfig>
@AnwarShah
Copy link
Author

We can also use <int> for the weight.

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