MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / ttf_width

Method ttf_width

pager/pagerctl.py:418–420  ·  view source on GitHub ↗

Get width of TTF text in pixels.

(self, text, font_path, font_size)

Source from the content-addressed store, hash-verified

416 return _lib.pager_draw_ttf(x, y, text.encode(), color, font_path.encode(), font_size)
417
418 def ttf_width(self, text, font_path, font_size):
419 """Get width of TTF text in pixels."""
420 return _lib.pager_ttf_width(text.encode(), font_path.encode(), font_size)
421
422 def ttf_height(self, font_path, font_size):
423 """Get height of TTF font in pixels."""

Callers 5

_draw_stat_cardMethod · 0.45
draw_dashboardMethod · 0.45
drawMethod · 0.45
draw_menuMethod · 0.45
_draw_main_menuMethod · 0.45

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected