module

Egui::SystemPorts::Fonts

Constants

NAME_TAG = "name".to_slice

Class methods

family_name(path : String) : String | Nil

Family name (SFNT name table, nameID 1) read straight off the file: 12-byte header → table records → the name table's own header + records, then only the winning string's bytes. A handful of small reads per file, no glyph data touched. Public so apps that group fonts beyond #installed_families' one-representative-per-family view (a specimen browser listing every style file) can reuse the same cheap reader.

Source
font_dirs

Font DIRECTORY roots #installed_families scans (recursively).

Source
installed_families

Every installed family NAME → its representative regular file (a .ttf the backends can load — no .ttc collections, no CFF 'OTTO' faces). The name comes from each file's SFNT name table (nameID 1), read as a few seek'd byte RANGES — the font itself is never parsed here; the stack materializes lazily on first use (Context#register_deferred_font). Unreadable files degrade silently: a family nobody picks must not cost a warning.

Source
search_paths

Candidate font files, best-first (plain .ttf — both backends load a single face, not .ttc collections).

Source