Reputation: 71
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?
Upvotes: 4
Views: 2694
Reputation: 101
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
Upvotes: 9