in the name of god, the most beneficent, the most merciful


linux: manage fonts

in this note, i’ll try to show how i manage fonts on my linux machine.

fontconfig

fontconfig is the system that controls fonts in linux machines. it includes the following programs:

  • fc-cache to maintain the fontconfig cache

  • fc-list to list installed fonts

  • fc-match to test the matching rules

  • fc-cat to dump the binary cache files in string form

check installed fonts

to check which font families installed on your machine run:

fc-list : family | sort | unique

download font file

to install the font on your linux system, you must first download either .otf or .ttf file. if you have a choice, try to download otf instead of ttf.[1]

manually install font

read the arch page first[2]

the following is a summary of above article.

for a single user installation, place your font file into:

~/.local/share/fonts/

if installing system-wide, place your font file into:

/usr/local/share/fonts/

the result could be as follows:

/usr/local/share/fonts/<otf|ttf>/<font-family>/<font-style.<otf|ttf>

finally update fontconfig cache w/:

fc-cache

delete font

TODO: finish the note later