Typography

Centralised typography helpers for the OctoMY UI.

Declared in src/libs/libstyle/Typography.hpp
Group libstyle

Detailed description

All fonts in the UI should be derived from one source of truth — the application's base font (QApplication::font()) — so a single change (accessibility scaling, density preference, theme switch) cascades through every widget consistently.

Typography exposes the "body" font as the 1.0 baseline and a small set of role helpers that encode the design's relative size ratios in one place. Callers ask for a role (activityTitle, sectionTitle, etc.) rather than a concrete point size, so retuning the design means editing one ratio here rather than chasing fixed point sizes through dozens of .ui files.

All getters return a fresh QFont per call (cheap). Apply via QWidget::setFont() on any widget.

#include "Typography.hpp"
ui->labelTitle->setFont(Typography::activityTitle());

See also OctoStyle, SemanticPalette.

In this section