- class neoscore.core.font.Font
A text font.
All fonts are immutable. To get a modified version of a font, use
- __init__(family_name: str, size: Union[Unit, float], weight: Optional[int] = None, italic: bool = False)
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.
- modified(family_name: Optional[str] = None, size: Optional[Union[Unit, float]] = None, weight: Optional[int] = None, italic: Optional[bool] = None) Font
Derive a font from this one.
All properties not specified will be taken from the existing font.