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

Skip to content

Commit 5ccb7de

Browse files
committed
Add fallback test for Agg backend
1 parent 86878c8 commit 5ccb7de

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
@@ -251,3 +251,11 @@ def test_draw_path_collection_error_handling():
251251
ax.scatter([1], [1]).set_paths(path.Path([(0, 1), (2, 3)]))
252252
with pytest.raises(TypeError):
253253
fig.canvas.draw()
254+
255+
256+
@image_comparison(["font_fallback.png"])
257+
def test_font_fallback():
258+
plt.rc('font', family=['DejaVu Sans', 'WenQuanYi Zen Hei'], size=15)
259+
260+
fig, ax = plt.subplots()
261+
ax.text(0.25, 0.475, "There are 多个汉字 in between!")

0 commit comments

Comments
 (0)