Skip to content

Instantly share code, notes, and snippets.

@kkm000
Created June 3, 2021 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkm000/2373722b012ec6fedc3f6d1729c6cc20 to your computer and use it in GitHub Desktop.
Save kkm000/2373722b012ec6fedc3f6d1729c6cc20 to your computer and use it in GitHub Desktop.
Fontconfig to make Emacs recognise semilight Cascadia fonts as such
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Place into an fcconfig directory (e.g. /etc/fonts/conf.d/) -->
<!-- Run 'fc-conflist' to see where your fontconfig is looking. -->
<!-- Run 'fc-cache -f' after dropping this file. -->
<description>Adjust weight of Cascadia fonts for Emacs</description>
<match target="scan">
<test target="font" name="family" ignore-blanks="true">
<string>Cascadia Mono</string>
</test>
<test target="font" name="weight">
<const>semilight</const>
</test>
<edit name="weight">
<const>book</const>
</edit>
</match>
<match target="scan">
<test target="font" name="family" ignore-blanks="true">
<string>Cascadia Mono PL</string>
</test>
<test target="font" name="weight">
<const>semilight</const>
</test>
<edit name="weight">
<const>book</const>
</edit>
</match>
<match target="scan">
<test target="font" name="family" ignore-blanks="true">
<string>Cascadia Code</string>
</test>
<test target="font" name="weight">
<const>semilight</const>
</test>
<edit name="weight">
<const>book</const>
</edit>
</match>
<match target="scan">
<test target="font" name="family" ignore-blanks="true">
<string>Cascadia Code PL</string>
</test>
<test target="font" name="weight">
<const>semilight</const>
</test>
<edit name="weight">
<const>book</const>
</edit>
</match>
</fontconfig>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment