Answers for "findfont: Font family ['Tahoma'] not found. Falling back to DejaVu Sans"

0

findfont: Font family ['Tahoma'] not found. Falling back to DejaVu Sans

#Type the following in ubuntu terminal:

sudo apt install msttcorefonts -qq
rm -rf ~/.cache/matplotlib 

'''Then make sure you only set fonts only at one main.py file,
this will help you manage the warning easier, main file is the
one that script start executing from'''

#If mymodule.py is the main python file then for example 
we can set our fonts as :

from  matplotlib import pyplot as plt
plt.rcParams['font.sans-serif'] = "Arial"
plt.rcParams['font.family'] = "sans-serif"
Posted by: Guest on April-30-2022

Code answers related to "findfont: Font family ['Tahoma'] not found. Falling back to DejaVu Sans"

Python Answers by Framework

Browse Popular Code Answers by Language