neoscore.core.font
- class neoscore.core.font.Font[source]
Bases:
object
A text font.
All fonts are immutable. To get a modified version of a font, use
Font.modified
- __init__(family_name: str, size: Union[Unit, float], weight: Optional[int] = None, italic: bool = False)[source]
- Parameters
family_name – The font family name
size – The size (height) of the font
weight – The font weight on a 0-100 scale, where 50 is normal, lower numbers are lighter, and higher are darker. If
None
(the default), a normal weight will be used.italic – Whether the font is italicized
- property family_name: str
- property weight: Optional[int]
- property italic: bool
- property ascent: Unit
The ascent of the font.
The ascent is the vertical distance between the font baseline and the highest any font characters reach.
- property descent: Unit
The descent of the font.
The ascent is the vertical distance between the font baseline and the lowest any font characters reach.
- property interface: FontInterface
The backing low-level font interface