MCPcopy Index your code
hub / github.com/RustPython/RustPython / metrics

Method metrics

Lib/tkinter/font.py:163–181  ·  view source on GitHub ↗

Return font metrics. For best performance, create a dummy widget using this font before calling this method.

(self, *options, **kw)

Source from the content-addressed store, hash-verified

161 return self._tk.getint(self._call("font", "measure", self.name, *args))
162
163 def metrics(self, *options, **kw):
164 """Return font metrics.
165
166 For best performance, create a dummy widget
167 using this font before calling this method."""
168 args = ()
169 displayof = kw.pop('displayof', None)
170 if displayof:
171 args = ('-displayof', displayof)
172 if options:
173 args = args + self._get(options)
174 return self._tk.getint(
175 self._call("font", "metrics", self.name, *args))
176 else:
177 res = self._split(self._call("font", "metrics", self.name, *args))
178 options = {}
179 for i in range(0, len(res), 2):
180 options[res[i][1:]] = self._tk.getint(res[i+1])
181 return options
182
183
184def families(root=None, displayof=None):

Callers 1

font.pyFile · 0.80

Calls 6

_getMethod · 0.95
lenFunction · 0.85
_splitMethod · 0.80
popMethod · 0.45
getintMethod · 0.45
_callMethod · 0.45

Tested by

no test coverage detected