Hey im trying to save a matplotlib figure as pdf file with Palatino font. Im using the font manager as follos:
prop = font_manager.FontProperties(family = 'Palatino', fname = '/Users/kalex/Library/Fonts/Palatino.ttc')
Im getting the the error:
The PDF backend does not currently support the selected font.
Does anybody know what to do?
I ran into the same problem when I upgraded my mac to Catalina and did a fresh install of Anaconda Python. Out of the box, without trying to load any special font, I got the same "The PDF backend does not currently support the selected font." error.
I found the solution here.
Here is what I added to my Python script:
import matplotlib.pyplot as plt
from matplotlib import rc
rc('font',**{'family':'serif','serif':['Palatino']})
plt.rcParams['pdf.fonttype'] = 42
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With