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

Method text_width

pager/pagerctl.py:405–407  ·  view source on GitHub ↗

Get width of text in pixels.

(self, text, size=1)

Source from the content-addressed store, hash-verified

403 _lib.pager_draw_text_centered(y, text.encode(), color, size)
404
405 def text_width(self, text, size=1):
406 """Get width of text in pixels."""
407 return _lib.pager_text_width(text.encode(), size)
408
409 def draw_number(self, x, y, num, color, size=1):
410 """Draw a number. Returns width."""

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected