How to make the label text bold in PySimpleGUI?

Question:

for example

label = sg.Text("Hello World", font="Helvetica")

How to make this text Bold ?

Also, is there any source that all of the supporting fonts by PySimpleGUI are mentioned?

Asked By: Hardliner

||

Answers:

The font parameter can be used to specify a bold font

for example:

import PySimpleGUI as sg

label = sg.Text("Hello World", font=("Helvetica", 12, "bold"))

layout = [[label]]

window = sg.Window("My Window", layout)
event, values = window.read()
window.close()

For the supported fonts, you can go to https://www.cssfontstack.com/ to see a list of the most used

Answered By: Saxtheowl
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.