bpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)

This commit is contained in:
Desmond Cheong 2020-12-26 05:18:06 +08:00 committed by GitHub
parent 675c97eb6c
commit 36a779e64c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 4 deletions

View file

@ -17,10 +17,10 @@ BOLD = "bold"
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: