Blog → Post

(TIP) fc-match
fonts, fonts and more fonts.
by @admin, january 19, 2022, 01:19pm utc

It is not hard to see why Microsoft has been "all-in" on trying to get control of Linux recently.

Little known gems like fc-match are few and far between in the buggy operating system that Microsoft actually charges money for.

fc-match ( tells you information about fonts.

If you simply type fc-match in a terminal, it reports the font in use AND the fall-back fonts to use if the main one has a problem later.

$ fc-match DejaVuSans.ttf: "DejaVu Sans" "Book"

$ fc-match serif will tell you the font used for serif,
and fc-match -s serif will tell you fallback fonts,
in order of best match.

$ fc-match sans DejaVuSans.ttf: "DejaVu Sans" "Book" $ $ fc-match serif DejaVuSerif.ttf: "DejaVu Serif" "Book" $ $ fc-match condensed DejaVuSans.ttf: "DejaVu Sans" "Book" $ $ fc-match monospace DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book" $

Want to find a thin, sans-serif font on your system?
Try a related utility, fc-list:

$ fc-list | grep -i sans | grep -i thin | wc
which passes the full list of fonts to the first grep, which looks for anything named "sans". This is passed to the next grep to look for "thin" "sans" fonts; which is all passed to wc, a line counter. wc reports 127 thin sans fonts.

$ fc-list | grep -i sans | grep -i thin | wc 127 1133 17819
$ fc-match -b Arial Pattern has 35 elts (size 48) family: "Arimo"(s) familylang: "en"(s) style: "Regular"(s) stylelang: "en"(s) fullname: "Arimo"(s) fullnamelang: "en"(s) slant: 0(i)(s) weight: 80(f)(s) width: 100(f)(s) size: 12(f)(s) pixelsize: 12.5(f)(s) foundry: "GOOG"(w) hintstyle: 1(i)(w) hinting: True(s) verticallayout: False(s) autohint: False(s) globaladvance: True(s) file: "/usr/share/fonts/truetype/croscore/Arimo-Regular.ttf"(w) index: 0(i)(w) outline: True(w) scalable: True(w) dpi: 75(f)(s) scale: 1(f)(s) fontversion: 86508(i)(s) capability: "otlayout:cyrl otlayout:grek otlayout:hebr otlayout:latn"(w) fontformat: "TrueType"(w) embeddedbitmap: True(s) decorative: False(s) lcdfilter: 1(i)(w) namelang: "en"(s) prgname: "fc-match"(s) postscriptname: "Arimo"(w) color: False(w) symbol: False(s) variable: False(s)

... and that's not all!

See also:

fc-list - List your available fonts

and the wealth of data in your local fontconfig user's guide (HTML):


tags: All users, Tips
Footer done in Inkscape