Bundled custom fonts (DESIGN §18.4).
A project ships font files under a top-level fonts/ directory. day build stages them into
each platform's native font location (Android res/font/, the iOS DayPieces bundle +
UIAppFonts, ArkUI rawfile, loose Resources/fonts on the desktops) and each backend
registers them at startup so Font::Custom("Family", pt) resolves by the font's family
name — the name baked into the file's name table (what Font Book / fontconfig report), not
its file name.
This module is the single source of truth shared by the CLI (staging-time family extraction, identifier naming) and the runtimes (startup registration, family → file resolution):
- [
parse_font_names] — a minimal sfntname-table reader for.ttf/.otf/.ttc. - [
font_dir] / [bundled_fonts] — locate the staged font files at runtime (DAY_FONT_ROOTunderday launch, bundle-relativeResources/fontswhen packed). - [
resolve_font_file] — map a requested family name to one of the bundled files, for backends whose native API wants a file path rather than a registered family (WinUI). - [
font_ident] — the identifier both the Android/ArkUI stagers and their runtimes derive from a family name ("Special Elite"→special_elite), so lookup needs no side table.