ltk::theme

Module text_style

Source
Expand description

Typography tokens: a resolved text style (family + weight + size + …) as the theme knows it.

The struct is deliberately named TextStyle rather than Typography to avoid colliding with the super::typography constants module that ships alongside it.

§Resolution

A TextStyle carries a FontRef (by name) and optionally a slot reference for its default colour. Both are resolved lazily by the theme’s slot table: the string IDs live here, the actual font bytes and crate::types::Color value come from the font registry and the slot store respectively. This keeps the struct copy-cheap and JSON-friendly.

Structs§

  • A resolved text style: family, weight, size, line-height and the visual modifiers that go with them.

Enums§

  • Reference to a font family registered in the theme’s fonts block.
  • Italic vs upright.
  • How the vertical advance between lines is specified.
  • Underline / strikethrough decoration.
  • Case transform applied at render time.