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

1

findfont: Font family ['Times New Roman'] not found. Falling back to DejaVu Sans. findfont: Font family ['Times New Roman'] not found. Falling back to DejaVu Sans.

#Assuming you working on conda:
conda install -c conda-forge mscorefonts
#Then detete the cache as follows:
rm ~/.cache/matplotlib -rf
#Use the following as fit:
import matplotlib
myfonts = "Times New Roman"
matplotlib.rcParams['font.family'] = "sans-serif"
matplotlib.rcParams['font.sans-serif'] = myfonts
Posted by: Guest on October-21-2021

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

Python Answers by Framework

Browse Popular Code Answers by Language