Skip to main content

Crate egui_system_fonts

Crate egui_system_fonts 

Source
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§

FontPreset
A preset represents a prioritized group of candidate font families.
FontRegion
Writing system/locale region used to decide fallback priority.
FontStyle
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 egui font definitions with system fonts detected from the current system locale.
set_with_presets
Replaces egui font definitions with system fonts resolved from the given presets.
set_with_region
Replaces egui font definitions with system fonts for the given region.