Reference navigation
On this page
TextStyle
Reusable typography for Text(style=...). Sizes use 1080p design pixels.
from proteinmotion import TextStyleConstructor
TextStyle(
font_size: float=36,
font: str='regular',
color: str | tuple='#edf3fc',
line_spacing: float=1.3,
)Parameters
| Parameter | Default | Description |
|---|---|---|
font_sizefloat | 36 | Font size in pixels at a 1080-pixel image height. |
fontstr | 'regular' | Bundled "regular" or "semibold", or a path to a TTF/OTF font. |
colorstr | tuple | '#edf3fc' | Hex color or RGB values. For tint setters, None restores the representation’s base palette. |
line_spacingfloat | 1.3 | Line spacing multiplier. |
Attributes
| Name | Description |
|---|---|
font_size | Font size in pixels at a 1080-pixel image height. |
font | Bundled "regular" or "semibold", or a path to a TTF/OTF font. |
color | Hex color or RGB values. For tint setters, None restores the representation’s base palette. |
line_spacing | Line spacing multiplier. |