~Typescale(void)=default
Default destructor.
void set(TypeRole role, const TypeToken &token)
Replace the text style of a role.
const TypeToken & get(TypeRole role) const
Get the text style of a role.
Typescale(void)
Create the scale with the Material 3 baseline styles listed in TypeRole.
Design tokens: colors, type scale, shapes, elevation, motion and spacing. Read them through guillaume...
const std::string & fontPath(FontWeight weight)
Get the font file shipped with the library for a weight.
TypeRole
The named text styles of Material Design 3: what a piece of text is, not how big it is.
@ BodyLarge
16 / 24, regular.
@ LabelSmall
11 / 16, medium weight.
@ DisplayLarge
57 / 64, regular.
@ LabelMedium
12 / 16, medium weight.
@ HeadlineLarge
32 / 40, regular.
@ TitleSmall
14 / 20, medium weight.
@ BodySmall
12 / 16, regular.
@ TitleLarge
22 / 28, regular.
@ DisplayMedium
45 / 52, regular.
@ LabelLarge
14 / 20, medium weight.
@ TitleMedium
16 / 24, medium weight.
@ HeadlineMedium
28 / 36, regular.
@ DisplaySmall
36 / 44, regular.
@ Default
14 / 20, regular: text with no specific role.
@ HeadlineSmall
24 / 32, regular.
@ BodyMedium
14 / 20, regular.
@ Count
Number of roles; not a role.
FontWeight
Font weights available to the typescale. The value is the usual numeric weight (400 regular,...
@ Count
Number of roles; not a role.
One text style: everything needed to measure and draw a piece of text.
float letterSpacing
Extra space between characters, in dp.
FontWeight fontWeight
Font weight.
std::string fontFamily
Font family name.
float fontSize
Font size, in dp.
float lineHeight
Distance between two baselines, in dp.