May 2018
Beginner to intermediate
452 pages
11h 26m
English
There are three ways of specifying a widget's font in Tkinter.
The simplest way is to just use a string format:
tk.Label(text="Direct font format", font="Times 20 italic bold")
The string takes the format Font-family size styles, where styles can be any valid combination of text style keywords.
Those words include:
Everything but the font family is optional, though you need to specify a size if you want to specify any of the styling keywords. The ordering of style keywords doesn't matter, but the weight and slant keywords are mutually exclusive (that is, you ...