Description
Summary
In #26989 I could remove the lines warning that a glyph was missing without breaking any tests:
Lines 582 to 585 in 112a225
Lines 594 to 596 in 112a225
I didn't remove the warnings cause I don't think we test what Ft2Font.load_char does when given a missing glyph. It's used in three places in the library:
- mathtext:
matplotlib/lib/matplotlib/_mathtext.py
Lines 329 to 333 in 978b402
- textpath:
matplotlib/lib/matplotlib/textpath.py
Lines 163 to 167 in 978b402
- backend_pdf:
matplotlib/lib/matplotlib/backends/backend_pdf.py
Lines 661 to 664 in 978b402
Proposed fix
Minimally, there should be at least two tests of how load_char
/the methods calling it handle missing glyphs - mathtext may be a good start. There should be one test for each codepath that triggers a missing glyph error. It would probably also be good to add some more tests for TextPath -> it mostly seems to be tested via gallery examples.