How to know which fonts are installed on CentOS?
Solution 1:
As for question one, fc-list
gives you all fonts.
${HOME}/.fonts
will contain additional fonts for your user.
fc-list | grep "Courier New"
allows you to check if that particular font is installed.
Solution 2:
Besides
# fc-list
You can find all true type fonts in your disk with find: (caution: it can take long time to process)
# find / -type f -name "*.ttf"
Solution 3:
There is a command xlsfonts
to list all fonts available in X.
Solution 4:
you can also try with python. For example using matplotlib:
python -c 'import matplotlib.font_manager; print "\n".join(matplotlib.font_manager.findSystemFonts(fontpaths=None, fontext="ttf"))'
on my linux it gives me output like:
/usr/share/fonts/truetype/kacst/KacstTitle.ttf
/usr/share/fonts/truetype/tlwg/TlwgTypo-Oblique.ttf
/usr/share/fonts/truetype/ttf-indic-fonts-core/Malige-b.ttf
/usr/share/fonts/truetype/msttcorefonts/verdanab.ttf
/usr/share/fonts/truetype/tlwg/Umpush.ttf
/usr/share/fonts/truetype/horai-umefont/ume-tgo5.ttf
/usr/share/fonts/truetype/tlwg/Garuda-Bold.ttf
...
UPDATE: Ofcourse you need python-matplotlib package for that. Try with yum, if not found , you can install it via pip or easy install, so:
sudo yum install python-matplotlib
or
pip install matplotlib
or
easy_install matplotlib