|
13 | 13 | from matplotlib import pyplot as plt |
14 | 14 | from matplotlib.testing.decorators import image_comparison, knownfailureif, cleanup |
15 | 15 |
|
16 | | - |
17 | | -# if 'TRAVIS' not in os.environ: |
18 | | -# @image_comparison(baseline_images=['pdf_use14corefonts'], extensions=['pdf']) |
19 | | -# def test_use14corefonts(): |
20 | | -# rcParams['pdf.use14corefonts'] = True |
21 | | -# rcParams['font.family'] = 'sans-serif' |
22 | | -# rcParams['font.size'] = 8 |
23 | | -# rcParams['font.sans-serif'] = ['Helvetica'] |
24 | | - |
25 | | -# title = 'Test PDF backend with option use14corefonts=True' |
26 | | - |
27 | | -# text = '''A three-line text positioned just above a blue line |
28 | | -# and containing some French characters and the euro symbol: |
29 | | -# "Merci pépé pour les 10 €"''' |
30 | | - |
31 | | -# plt.figure() |
32 | | -# plt.title(title) |
33 | | -# plt.text(0.5, 0.5, text, horizontalalignment='center', |
34 | | -# verticalalignment='bottom', |
35 | | -# fontsize=24) |
36 | | -# plt.axhline(0.5, linewidth=0.5) |
| 16 | +if 'TRAVIS' not in os.environ: |
| 17 | + @image_comparison(baseline_images=['pdf_use14corefonts'], extensions=['pdf']) |
| 18 | + def test_use14corefonts(): |
| 19 | + rcParams['pdf.use14corefonts'] = True |
| 20 | + rcParams['font.family'] = 'sans-serif' |
| 21 | + rcParams['font.size'] = 8 |
| 22 | + rcParams['font.sans-serif'] = ['Helvetica'] |
| 23 | + rcParams['pdf.compression'] = 0 |
| 24 | + |
| 25 | + text = u'''A three-line text positioned just above a blue line |
| 26 | + and containing some French characters and the euro symbol: |
| 27 | + "Merci pépé pour les 10 €"''' |
37 | 28 |
|
38 | 29 |
|
39 | 30 | @cleanup |
|
0 commit comments