Skip to content

Instantly share code, notes, and snippets.

@AnwarShah
Created February 25, 2018 05:30
Show Gist options
  • Save AnwarShah/82b51fa7e1b82ba5736609e8c227eba8 to your computer and use it in GitHub Desktop.
Save AnwarShah/82b51fa7e1b82ba5736609e8c227eba8 to your computer and use it in GitHub Desktop.
Enable autohint for open type fonts since default hinting looks blurry
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- enable autohint for open type fonts -->
<match target="font">
<test name="fontformat">
<string>CFF</string>
</test>
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>
</fontconfig>
@AnwarShah
Copy link
Author

Beware of other rules residing/overriding these. Look at ~/.config/fontconfig files to double check if anyone is overriding. I had to spend quite a few hours figuring out what's wrong with the rule until discovered that some other file was overriding the rule

@AnwarShah
Copy link
Author

The examples are good https://wiki.ubuntu.com/Fonts

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