MCPcopy Index your code
hub / github.com/python/cpython / measure

Method measure

Lib/tkinter/font.py:157–162  ·  view source on GitHub ↗

Return text width

(self, text, displayof=None)

Source from the content-addressed store, hash-verified

155 configure = config
156
157 def measure(self, text, displayof=None):
158 "Return text width"
159 args = (text,)
160 if displayof:
161 args = ('-displayof', displayof, text)
162 return self._tk.getint(self._call("font", "measure", self.name, *args))
163
164 def metrics(self, *options, **kw):
165 """Return font metrics.

Callers 4

update_fontMethod · 0.95
font.pyFile · 0.45
test_measureMethod · 0.45
set_widthMethod · 0.45

Calls 2

getintMethod · 0.45
_callMethod · 0.45

Tested by 1

test_measureMethod · 0.36