Skip to main content

specimen

Function specimen 

Source
pub fn specimen(ctx: &Context, name: &str, weight: Weight) -> Option<FontFamily>
Expand description

The egui family drawing a family by its name at a weight, outside the theme’s roles: a face registered, egui’s or the system’s, egui’s bundled fonts behind it. None until it is installed: the first ask installs the fonts again (one slow frame, from the next pass) and asks for a repaint; draw with another font meanwhile. A name found nowhere draws egui’s bundled fonts, and is said in the Report.

Only the face and egui’s bundled fonts draw it, never the theme’s: a sample shows what the face covers. Text it may not cover (other scripts, a name read from a file) goes through sample_label, which draws the missing letters as boxes, or is checked with uncovered first: laid out as is, a letter no face has panics under kittest’s MissingGlyphPolicy::Panic.