scistag.imagestag.font_registry.RegisteredFont¶
- class RegisteredFont(font_face, base_path, variations)[source]¶
Bases:
objectA registered font contains information about a single available font and it’s style variations.
Upon request it can be used to create a real font handle with the specified properties such as weight and style.
- Parameters
e.g. “-Bold”)
Methods
Tries to create a font handle for given font :type size: int :param size: The font's size :type flags: set[str] | None :param flags: The flags such as {'Bold'} or {'Bold', 'Italic'} :rtype: Font | None :return: On success the handle of the font
Attributes
__dict____doc____module____weakref__list of weak references to the object (if defined)
The font face's name
The filename base path (excluding variations)
The file extension
Has the font a totally flexible weight?
Different main variations, e.g.
- get_handle(size, flags=None)[source]¶
Tries to create a font handle for given font :type size: int :param size: The font’s size :type flags: set[str] | None :param flags: The flags such as {‘Bold’} or {‘Bold’, ‘Italic’} :rtype: Font | None :return: On success the handle of the font
- base_path¶
The filename base path (excluding variations)
- extension¶
The file extension
- font_face¶
The font face’s name
- variable_weight¶
Has the font a totally flexible weight?
- variations¶
Different main variations, e.g. Italic