()
| 239 | |
| 240 | |
| 241 | def test_ft2font_set_size(): |
| 242 | file = fm.findfont('DejaVu Sans') |
| 243 | font = ft2font.FT2Font(file) |
| 244 | font.set_size(12, 72) |
| 245 | font.set_text('ABabCDcd') |
| 246 | orig = font.get_width_height() |
| 247 | font.set_size(24, 72) |
| 248 | font.set_text('ABabCDcd') |
| 249 | assert font.get_width_height() == tuple(pytest.approx(2 * x, 1e-1) for x in orig) |
| 250 | font.set_size(12, 144) |
| 251 | font.set_text('ABabCDcd') |
| 252 | assert font.get_width_height() == tuple(pytest.approx(2 * x, 1e-1) for x in orig) |
| 253 | |
| 254 | |
| 255 | def test_ft2font_features(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…