diff options
Diffstat (limited to 'Lib/tkinter/font.py')
-rw-r--r-- | Lib/tkinter/font.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py index b96673208b..a04fedf655 100644 --- a/Lib/tkinter/font.py +++ b/Lib/tkinter/font.py @@ -153,7 +153,7 @@ class Font: args = (text,) if displayof: args = ('-displayof', displayof, text) - return int(self._call("font", "measure", self.name, *args)) + return self._root.tk.getint(self._call("font", "measure", self.name, *args)) def metrics(self, *options, **kw): """Return font metrics. @@ -166,13 +166,13 @@ class Font: args = ('-displayof', displayof) if options: args = args + self._get(options) - return int( + return self._root.tk.getint( self._call("font", "metrics", self.name, *args)) else: res = self._split(self._call("font", "metrics", self.name, *args)) options = {} for i in range(0, len(res), 2): - options[res[i][1:]] = int(res[i+1]) + options[res[i][1:]] = self._root.tk.getint(res[i+1]) return options |