MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_ft2font_clear

Function test_ft2font_clear

lib/matplotlib/tests/test_ft2font.py:225–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223
224
225def test_ft2font_clear():
226 file = fm.findfont('DejaVu Sans')
227 font = ft2font.FT2Font(file)
228 assert font.get_num_glyphs() == 0
229 assert font.get_width_height() == (0, 0)
230 assert font.get_bitmap_offset() == (0, 0)
231 font.set_text('ABabCDcd')
232 assert font.get_num_glyphs() == 8
233 assert font.get_width_height() != (0, 0)
234 assert font.get_bitmap_offset() != (0, 0)
235 font.clear()
236 assert font.get_num_glyphs() == 0
237 assert font.get_width_height() == (0, 0)
238 assert font.get_bitmap_offset() == (0, 0)
239
240
241def test_ft2font_set_size():

Callers

nothing calls this directly

Calls 4

findfontMethod · 0.80
get_width_heightMethod · 0.80
set_textMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…