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