| 23 | |
| 24 | @image_comparison(['pdf_use14corefonts.pdf'], style='_classic_test') |
| 25 | def test_use14corefonts(): |
| 26 | rcParams['pdf.use14corefonts'] = True |
| 27 | rcParams['font.family'] = 'sans-serif' |
| 28 | rcParams['font.size'] = 8 |
| 29 | rcParams['font.sans-serif'] = ['Helvetica'] |
| 30 | rcParams['pdf.compression'] = 0 |
| 31 | |
| 32 | text = '''A three-line text positioned just above a blue line |
| 33 | and containing some French characters and the euro symbol: |
| 34 | "Merci pépé pour les 10 €"''' |
| 35 | |
| 36 | fig, ax = plt.subplots() |
| 37 | ax.set_title('Test PDF backend with option use14corefonts=True') |
| 38 | ax.text(0.5, 0.5, text, horizontalalignment='center', |
| 39 | verticalalignment='bottom', |
| 40 | fontsize=14) |
| 41 | ax.axhline(0.5, linewidth=0.5) |
| 42 | |
| 43 | |
| 44 | def test_multipage_pagecount(): |