Skip to main content

text_styles

Function text_styles 

Source
pub fn text_styles(surface: &Surface) -> BTreeMap<TextStyle, FontId>
Expand description

egui’s text styles, from the type scale.

egui ships five roles and the scale has nine, so this maps the five onto the nearest role rather than inventing names: Small is Text::Fine, Body and Button are Text::Body, Monospace is Text::Note because a monospaced face reads larger at the same size, and Heading is Text::Head.

Small is the one that has bitten. egui defaults it to 9 points, which is under the 11 at which text stops being readable, and table sets every column heading in it. The scale has nothing below Fine on purpose: if a thing is worth painting it is worth three quarters of the base.