8000 Move test font inside test directory · matplotlib/matplotlib@b8cab72 · GitHub
[go: up one dir, main page]

Skip to content

Commit b8cab72

Browse files
jkseppanmdboom
authored andcommitted
Move test font inside test directory
1 parent 253d2be commit b8cab72

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/matplotlib/tests/test_ttconv.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
import matplotlib
2+
from matplotlib.font_manager import FontProperties
23
from matplotlib.testing.decorators import image_comparison
34
import matplotlib.pyplot as plt
5+
import os.path
46

57
@image_comparison(baseline_images=["truetype-conversion"],
68
extensions=["pdf", "png"])
79
def test_truetype_conversion():
10+
fontname = os.path.join(os.path.dirname(__file__), 'mpltest.ttf')
11+
fontname = os.path.abspath(fontname)
12+
fontprop = FontProperties(fname=fontname, size=80)
813
matplotlib.rcParams['pdf.fonttype'] = 3
914
fig = plt.figure()
1015
ax = fig.add_subplot(111)
11-
ax.text(0, 0, "ABCDE", name="mpltest", fontsize=80)
16+
ax.text(0, 0, "ABCDE", fontproperties=fontprop)
1217
ax.set_xticks([])
1318
ax.set_yticks([])

0 commit comments

Comments
 (0)
0