Where does matplotlib look for fonts on Linux?

Find out using

matplotlib_font_dirs.py
import matplotlib.font_manager
print(matplotlib.font_manager.X11FontDirectories)

On my Ubuntu 22.04, this lists:

example.py
['/usr/X11R6/lib/X11/fonts/TTF/',
 '/usr/X11/lib/X11/fonts',
 '/usr/share/fonts/',
 '/usr/local/share/fonts/',
 '/usr/lib/openoffice/share/fonts/truetype/',
 '~/.local/share/fonts',
 '~/.fonts']

 


Check out similar posts by category: Python