public class Font implements ValueType:
Immutable font used by window widgets.
A font combines one operating-system family, a pixel size and the two styles currently supported by the Klyn text renderer. Assign it to Widget.font; KSS can still override widgets that keep the default font.
title = Label("Klyn")
title.font = Font("Noto Sans", 24, bold=true)| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | boldbold as Boolean |
Whether the bold face is requested. |
| public readonly property | familyfamily as String |
Operating-system font family, or a comma-separated fallback list. |
| public readonly property | italicitalic as Boolean |
Whether the italic face is requested. |
| public readonly property | sizesize as Int |
Font size expressed in logical pixels. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | Font | Creates an immutable font. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | installedFamilies | Lists font families exposed by the current operating system. |
| public static | parse | Parses the font description consumed by Painter and KSS. |
| public override | toStringtoString() as String: |
Returns the CSS-like description consumed by the Klyn painter. |
| public | withBold | Returns a copy with the requested bold state. |
| public | withItalic | Returns a copy with the requested italic state. |
| public | withSize | Returns a copy with another size. |