March 2018
Beginner to intermediate
422 pages
10h 33m
English
Now that we have seen the basic features that are available in Tkinter's font module, let's implement a font selector like the one shown in the following screenshot:

The key to building the font selector shown in the preceding screenshot is to fetch a list of all the fonts installed on a system. A call to the families() method from the font module fetches a tuple of all the fonts available on a system. Accordingly, when you run the following code, a tuple of all the fonts available on the system gets printed (see the 10.09_all_fonts_on_a_system.py code):
from tkinter import Tk, fontroot = Tk()all_fonts = font.families() ...
Read now
Unlock full access