Setting widget fonts
In Tkinter, it is possible to customize the font used in widgets that display text to the users, such as buttons, labels, and entries. By default, the font is system-specific, but you can change it using the font
option.
Getting ready
The following application allows users to dynamically change the font family and size of a label with static text. Try around different values to see the results of the font configuration:

How to do it...
We will have two widgets to modify the font configuration: a drop-down option with font family names and a spinbox to enter the font size:
import tkinter as tk class App(tk.Tk): def __init__(self): super().__init__() self.title("Fonts demo") text = "The quick brown fox jumps over the lazy dog" self.label = tk.Label(self, text=text) self.family = tk.StringVar() self.family.trace("w", self.set_font) families = ("Times", "Courier", "Helvetica") self.option = tk.OptionMenu(self...