Skip to content

Instantly share code, notes, and snippets.

@andy0130tw
Last active February 8, 2021 23:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andy0130tw/cd7c026f63215932497d54898defcf99 to your computer and use it in GitHub Desktop.
Save andy0130tw/cd7c026f63215932497d54898defcf99 to your computer and use it in GitHub Desktop.
Turn on an OpenType feature for Fira Sans through fontconfig for tabular figures, making it a nicer UI font. Perfect for Pop!_OS.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<test qual="any" name="family">
<string>Fira Sans</string>
</test>
<edit name="fontfeatures" mode="prepend">
<string>tnum</string>
</edit>
</match>
</fontconfig>
@andy0130tw
Copy link
Author

A solution to this issue (for Linux).

Preview through LibreOffice with OpenType feature supported. It does not apply "tabular figures" (tnum) at first and adding a suffix ":tnum" turns on that feature.

This fixes the widths for some fields that contain only changing digits (like clocks, system stats, etc.), making them much less disturbing.

2018-04-24 03-10-30

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