Expand description
Typography scale used by the default theme.
Designed around the Sora typeface (Google Fonts). If Sora is not installed on the system, ltk falls back to Liberation Sans / DejaVu Sans; glyph metrics will differ slightly but the scale still reads correctly.
Two scales coexist: the historic px constants (H0 through
BODY_XS) for code that wants a frozen pixel size, and the new
responsive scale (h0, h1, …, body_xs) that returns
viewport-relative crate::Length values clamped to the same px
range that used to be the constant. Call sites can mix freely:
.size( typography::H2 ) still resolves to Length::px( 24.0 ) via
From<f32>, while .size( typography::h2() ) scales with the
surface’s smaller dimension.
Constants§
- Interlineado (line-height) multiplier recommended by the kit. Apply as
size * LINE_HEIGHTwhen laying out multi-line text blocks.