Working with fonts in Tkinter
Some of our data entry users have complained that the font of the application is just a little too small to read easily, but others dislike the idea of you increasing it because it makes the application too big for the screen. To accommodate all the users, we can add a configuration option that allows them to set a preferred font size and family.
Configuring Tkinter fonts
Any widget in Tkinter that displays text allows us to specify a font, typically through its font
configuration property. For widgets that support tags, we can also specify font settings for each tag. We've been using the font
argument as far back as Chapter 1, Introduction to Tkinter, but now it's time to take a deeper look into what Tkinter allows us to do with fonts.
There are three ways of specifying a widget's font in Tkinter: using a string, using a tuple, and using a Font
object. Let's take a look at each one.