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):

add_auto(ctx, 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§

add_auto
Appends system fonts as fallback to the existing fonts in ctx.
add_with_presets
Appends system fonts resolved from the given presets as fallback to the existing fonts in ctx.
add_with_region
Appends system fonts for the given region as fallback to the existing fonts in ctx.
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.