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

Skip to content

Commit 372fee6

Browse files
committed
Add multi-font tests for PS backend
1 parent bd11b22 commit 372fee6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/matplotlib/tests/test_backend_ps.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,21 @@ def test_linedash():
234234
fig.savefig(buf, format="ps")
235235

236236
assert buf.tell() > 0
237+
238+
239+
@image_comparison(["multi_font_type3.eps"])
240+
def test_multi_font_type3():
241+
plt.rc('font', family=['DejaVu Sans', 'WenQuanYi Zen Hei'], size=27)
242+
plt.rc('ps', fonttype=3)
243+
244+
fig = plt.figure()
245+
fig.text(0.15, 0.475, "There are 多个汉字 in between!")
246+
247+
248+
@image_comparison(["multi_font_type42.eps"])
249+
def test_multi_font_type42():
250+
plt.rc('font', family=['DejaVu Sans', 'WenQuanYi Zen Hei'], size=27)
251+
plt.rc('ps', fonttype=42)
252+
253+
fig = plt.figure()
254+
fig.text(0.15, 0.475, "There are 多个汉字 in between!")

0 commit comments

Comments
 (0)