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

Skip to content

Commit dfa519b

Browse files
aitikguptatacaswell
authored andcommitted
Add fallback test for Agg backend
1 parent dc748f5 commit dfa519b

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

19.5 KB
Loading

lib/matplotlib/tests/test_agg.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,3 +349,11 @@ def test_chunksize_toobig_chunks(chunk_limit_setup):
349349
rcParams['agg.path.chunksize'] = 90_000
350350
with pytest.raises(OverflowError, match='Please reduce'):
351351
ra.draw_path(gc, p, idt)
352+
353+
354+
@image_comparison(["font_fallback.png"])
355+
def test_font_fallback():
356+
plt.rc('font', family=['DejaVu Sans', 'WenQuanYi Zen Hei'], size=15)
357+
358+
fig, ax = plt.subplots()
359+
ax.text(0.25, 0.475, "There are 多个汉字 in between!")

0 commit comments

Comments
 (0)