Skip to main content

Module fonts

Module fonts 

Source
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.ttf

The 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 through loader, silently skipping any that aren’t there.
load_pack
Attempts to load the Khora brand font pack via the asset I/O layer.