Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b81ceb6

Browse files
committed
Move pdf_use14corefonts test to regression testing framework.
1 parent 3e1bb65 commit b81ceb6

3 files changed

Lines changed: 25 additions & 40 deletions

File tree

Binary file not shown.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# -*- encoding: utf-8 -*-
2+
3+
from matplotlib import rcParams
4+
from matplotlib import pyplot as plt
5+
from matplotlib.testing.decorators import image_comparison, knownfailureif
6+
7+
@image_comparison(baseline_images=['pdf_use14corefonts'], extensions=['pdf'])
8+
def test_use14corefonts():
9+
rcParams['backend'] = 'pdf'
10+
rcParams['pdf.use14corefonts'] = True
11+
rcParams['font.family'] = 'sans-serif'
12+
rcParams['font.size'] = 8
13+
rcParams['font.sans-serif'] = ['Helvetica']
14+
15+
title = u'Test PDF backend with option use14corefonts=True'
16+
17+
text = u'''A three-line text positioned just above a blue line
18+
and containing some French characters and the euro symbol:
19+
"Merci pépé pour les 10 €"'''
20+
21+
plt.figure()
22+
plt.title(title)
23+
plt.text(0.5, 0.5, text, horizontalalignment='center', fontsize=24)
24+
plt.axhline(0.5, linewidth=0.5)
25+
plt.savefig('pdf_use14corefonts.pdf')

unit/test_pdf_use14corefonts.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)