diff options
Diffstat (limited to 'Lib/lib-tk/tkFont.py')
-rw-r--r-- | Lib/lib-tk/tkFont.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/lib-tk/tkFont.py b/Lib/lib-tk/tkFont.py index 5e9abed..a41e368 100644 --- a/Lib/lib-tk/tkFont.py +++ b/Lib/lib-tk/tkFont.py @@ -8,7 +8,7 @@ # # FIXME: should add 'displayof' option where relevant (actual, families, # measure, and metrics) -# +# # Copyright (c) Secret Labs AB 1998. # # info@pythonware.com @@ -52,10 +52,10 @@ class Font: return tuple(options) def _get(self, args): - options = [] - for k in args: - options.append("-"+k) - return tuple(options) + options = [] + for k in args: + options.append("-"+k) + return tuple(options) def _mkdict(self, args): options = {} @@ -117,7 +117,7 @@ class Font: ) configure = config - + def measure(self, text): "Return text width" return string.atoi(self._call("font", "measure", self.name, text)) @@ -143,7 +143,7 @@ def families(root=None): "Get font families (as a tuple)" if not root: root = Tkinter._default_root - return root.tk.splitlist(root.tk.call("font", "families")) + return root.tk.splitlist(root.tk.call("font", "families")) def names(root=None): "Get names of defined fonts (as a tuple)" @@ -153,7 +153,7 @@ def names(root=None): # -------------------------------------------------------------------- # test stuff - + if __name__ == "__main__": root = Tkinter.Tk() @@ -186,7 +186,7 @@ if __name__ == "__main__": fb = Font(font=w["font"]).copy() fb.config(weight=BOLD) - + w.config(font=fb) Tkinter.mainloop() |