Skip to content

Instantly share code, notes, and snippets.

@DanielG
Last active January 14, 2018 22:37
Show Gist options
  • Save DanielG/2508e6ea4e315d320b16a9fb55ccae2d to your computer and use it in GitHub Desktop.
Save DanielG/2508e6ea4e315d320b16a9fb55ccae2d to your computer and use it in GitHub Desktop.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="pattern">
<!-- Get rid of that default 12pt font shit FcDefaultSubstitute does -->
<!-- holy fuck this is so obscure -->
<!--
So get this: when we get an empty property, i.e. it being missing from
the pattern in this case, qual=all will unconditionally succeed without
actually checking the condition. There doesn't seem to be a way to
check if a property is empty explicitly so in case the property does
have a value already I don't want to override whatever comes in. So I
just match against the thing I substitute with which will have no
effect in the non-empty case :)
-->
<test qual="all" name="size" compare="eq"><double>7.5</double></test>
<edit name="size" mode="assign" binding="weak"><double>7.5</double></edit>
</match>
</fontconfig>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment