gowner
gowner

Reputation: 327

Designating a font in Tkinter?

I want to use a font called Myriad Pro Condensed, which is installed on my computer. If I use Label(infoframe, text="test", font=("Myriad Pro Condensed", 30, "bold")) It just uses the default system font. Using just the family name Myriad Pro works but it doesn't use the condensed version I want to use. How would I go about using the correct font in Tkinter? Here's an MCVE:

from tkinter import *
root = Tk()
label = Label(root, text="test", font=("Myriad Pro Condensed"))
label.pack()
mainloop()

Upvotes: 2

Views: 580

Answers (1)

Kenly
Kenly

Reputation: 26678

Use font name:

Label(root, text="test",font=("MyriadPro-LightCond",size))

Upvotes: 2

Related Questions