Py5Font.get_name()#

Get the font’s name.

Examples#

example picture for get_name()
1def setup():
2    font = py5.create_font('DejaVu Sans', 15)
3    py5.text_font(font)
4
5    py5.text(font.get_name(), 5, 20)
6    py5.text(font.get_post_script_name(), 5, 40)
7    py5.text(font.get_size(), 5, 60)
8    py5.text(font.get_default_size(), 5, 80)

Description#

Get the font’s name.

Underlying Processing method: PFont.getName

Syntax#

get_name() -> str

Updated on November 12, 2021 11:30:58am UTC