Within Tk/tkinter there a number of fonts and font families.
Use a text widget to display an example of the fonts.
The following is an example of an output line
Times: abcdefghijknmnopqestuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
Use the following code snippets to display Tk font families and names. (and a text sample)
import sys print(sys.version_info) print('-----------------------------------------------------------') if sys.version_info.major is 3: import tkinter as Tk, tkinter.font as tkFont else: import Tkinter as Tk, tkFont root = Tk.Tk() print(tkFont.families()) print(tkFont.names()) root.mainloop()
OR
from Tkinter import * import tkFont root = Tk() fonts=list(tkFont.families()) fonts.sort() display = Listbox(root) display.pack(fill=BOTH, expand=YES, side=LEFT) scroll = Scrollbar(root) scroll.pack(side=RIGHT, fill=Y, expand=NO) scroll.configure(command=display.yview) display.configure(yscrollcommand=scroll.set) for item in fonts: display.insert(END, item) root.mainloop()
Note: the code snippets are from
here
1. Add "stuff" to the file and use pydoc to generate documentation.