Font¶
- class pyto_ui.Font(name: str, size: float)¶
A
Fontobject represents a font (with name and size) to be used on labels, buttons, text views etc.- classmethod bold_system_font_of_size(size: float) Font¶
Returns the font object used for standard interface items that are rendered in boldface type in the specified size
- Parameters:
size – The size (in points) for the font. This value must be greater than 0.0.
- Return type:
pyto_ui.Font
- classmethod font_names_for_family_name(name: str) list[str]¶
Returns an array of font names available in a particular font family.
- Parameters:
name – The name of the font family. Use the
font_family_names()function to get an array of the available font family names on the system.- Return type:
list[str]
- classmethod font_with_style(style: FontTextStyle) Font¶
Returns an instance of the system font for the specified text style and scaled appropriately for the user’s selected content size category.
- Parameters:
style – The text style for which to return a font. See
Font Text Styleconstants for possible values.- Return type:
pyto_ui.Font
- classmethod italic_system_font_of_size(size: float) Font¶
Returns the font object used for standard interface items that are rendered in italic type in the specified size.
- Parameters:
size – The size (in points) for the font. This value must be greater than 0.0.
- Return type:
pyto_ui.Font