Python Forum

Full Version: Tkinter font style
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here I have code:
Label(window_1, textvariable=display_alarm_switch, font=("Ticking Timebomb BB", 30), fg=colorfg, bg=colorbg).place(x=x_pos, y=y_pos)
It printed with italic style, I need change to regular, how? use style="regular" not work...
I think you need to specify Regular in font name:
Label(window_1, textvariable=display_alarm_switch, font=("Ticking Timebomb BB REGULAR", 30), fg=colorfg, bg=colorbg).place(x=x_pos, y=y_pos)
(Oct-24-2020, 07:16 PM)Larz60+ Wrote: [ -> ]I think you need to specify Regular in font name:
Label(window_1, textvariable=display_alarm_switch, font=("Ticking Timebomb BB REGULAR", 30), fg=colorfg, bg=colorbg).place(x=x_pos, y=y_pos)

Ah Yes, Thanks!