Adding Downloaded Fonts To Tkinter Adding Downloaded Fonts To Tkinter tkinter tkinter

Adding Downloaded Fonts To Tkinter


This worked for me on Windows (and I would guess on any platform which supports the pyglet module)

import tkinter as tkimport pyglet, ospyglet.font.add_file('myFont.ttf')  # Your TTF file name hereroot = tk.Tk()MyLabel = tk.Label(root,text="test",font=('myFont',25)) # although vera is one of the in built fonts but pyglet worked for me with all the # font filesMyLabel.pack()root.mainloop()