Expand description
System font helpers for egui.
This crate resolves platform-installed font families and applies them to an egui::Context.
§Quick start
Replace egui’s default fonts using the current system locale:
set_auto(ctx, FontStyle::Sans);Add system fonts as fallback only (keeps existing font priority):
let mut defs = egui::FontDefinitions::default();
extend_auto(ctx, &mut defs, FontStyle::Sans);Enums§
- Font
Preset - A preset represents a prioritized group of candidate font families.
- Font
Region - Writing system/locale region used to decide fallback priority.
- Font
Style - Font preference used when selecting system fonts.
Functions§
- extend_
auto - Appends system fonts as fallback families to an existing
FontDefinitions. - extend_
with_ presets - Appends system fonts resolved from the given presets as fallback families to an existing
FontDefinitions. - extend_
with_ region - Appends system fonts for the given region as fallback families to an existing
FontDefinitions. - set_
auto - Replaces
eguifont definitions with system fonts detected from the current system locale. - set_
with_ presets - Replaces
eguifont definitions with system fonts resolved from the given presets. - set_
with_ region - Replaces
eguifont definitions with system fonts for the given region.