@@ -259,18 +259,15 @@ def test_draw_path_collection_error_handling():
259259
260260@image_comparison (["font_fallback.png" ])
261261def test_font_fallback ():
262- fp = fm .FontProperties (family = ["Noto Sans CJK SC" , "Noto Sans CJK JP" ])
262+ fp = fm .FontProperties (family = ["Noto Sans CJK JP" ])
263263 name = Path (fm .findfont (fp )).name
264- if name not in ( "NotoSansCJKsc-Regular.otf" , " NotoSansCJK-Regular.ttc") :
265- pytest .skip (f"Noto Sans CJK SC font may be missing, found: { name } " )
264+ if name != " NotoSansCJK-Regular.ttc" :
265+ pytest .skip (f"Noto Sans CJK JP font may be missing, found: { name } " )
266266
267- plt .rc ('font' , family = [
268- 'DejaVu Sans' , 'Noto Sans CJK JP' , 'Noto Sans CJK SC'
269- ], size = 15 )
270-
271- fig , ax = plt .subplots ()
272- ax .text (0.25 , 0.475 , "There are 多个汉字 in between!" )
267+ plt .rc ('font' , family = ['DejaVu Sans' , 'Noto Sans CJK JP' ], size = 15 )
273268
274269 with warnings .catch_warnings ():
275270 warnings .filterwarnings ('ignore' , 'findfont: Font family.*not found' )
271+ fig , ax = plt .subplots ()
272+ ax .text (0.25 , 0.475 , "There are 多个汉字 in between!" )
276273 fig .canvas .draw ()
0 commit comments