commit | 36a779e64c580519550aa6478c5aa8c58b8fa7b6 | [log] [tgz] |
---|---|---|
author | Desmond Cheong <desmondcheongzx@gmail.com> | Sat Dec 26 05:18:06 2020 +0800 |
committer | GitHub <noreply@github.com> | Fri Dec 25 23:18:06 2020 +0200 |
tree | 9ee86f0cbe8e6a0de0cbe8f3544374ca0fdd7b8a | |
parent | 675c97eb6c7c14c6a68ebf476c52931c1e5c1220 [diff] [blame] |
bpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py index 7f6ba5a..06ed01b 100644 --- a/Lib/tkinter/font.py +++ b/Lib/tkinter/font.py
@@ -17,10 +17,10 @@ ITALIC = "italic" -def nametofont(name): +def nametofont(name, root=None): """Given the name of a tk named font, returns a Font representation. """ - return Font(name=name, exists=True) + return Font(name=name, exists=True, root=root) class Font: