Expand description
Editor brand fonts — Geist & Geist Mono loader.
Loads Khora’s brand fonts at startup through the same I/O layer as project
assets ([khora_sdk::AssetIo] / [khora_sdk::FileLoader]). Today the
loader hits the disk; once the editor ships as a packed binary we can swap
FileLoader for PackLoader without touching the call sites.
If the font files are missing, returns an empty [FontPack] — the shell
will silently keep its built-in defaults. No build-time check, no recompile
required when adding the fonts later.
Expected layout (relative to the loader root):
fonts/
Geist-Regular.ttf
Geist-Medium.ttf
Geist-SemiBold.ttf
GeistMono-Regular.ttf
GeistMono-Medium.ttfThe fonts are distributed under the SIL Open Font License — see
https://github.com/vercel/geist-font for the source.
Constants§
- DISPLAY_
FILES 🔒 - Display / serif faces (Fraunces 72pt optical, SIL OFL). Listed
regular-then-semibold so the heavier face becomes the primary display face
(see
install_named). Optional — absent files leave the display family aliased to proportional. - ICON_
FILES 🔒 - MONOSPACE_
FILES 🔒 - PROPORTIONAL_
FILES 🔒 - File names looked up under the loader root. Listed in the order the shell should install them — the first proportional / monospace face becomes the primary one for that family.
Functions§
- candidate_
roots 🔒 - Builds the list of root directories to try, in priority order.
- collect 🔒
- Pulls bytes for each
(name, relative_path)pair throughloader, silently skipping any that aren’t there. - load_
pack - Attempts to load the Khora brand font pack via the asset I/O layer.