Skip to main content

sample_label

Function sample_label 

Source
pub fn sample_label(ui: &mut Ui, text: &str, font: FontId) -> Response
Expand description

A label drawing text in font, the chars no face of its family covers (uncovered) drawn as boxes in the text’s colour.

For a sample showing what a face covers, such as a specimen: its family is the face then egui’s bundled fonts, never the theme’s, so a letter the face lacks is shown missing rather than borrowed. egui draws the same box (the .notdef glyph) but panics instead under MissingGlyphPolicy::Panic; here a missing letter is drawn, never a panic, whatever the policy.