MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / measure

Method measure

tools/python-3.11.9-amd64/Lib/tkinter/font.py:156–161  ·  view source on GitHub ↗

Return text width

(self, text, displayof=None)

Source from the content-addressed store, hash-verified

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

Callers 4

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

Calls 2

_callMethod · 0.80
getintMethod · 0.45

Tested by 1

test_measureMethod · 0.36