makepad/examples/aichat
Kevin Boos 5e9a697940
app_main!: only ship the fonts an app declares (#1247)
Every manifest `app_main!` emitted carried three fonts no theme role uses:
`NewCMMath-Regular.otf` for `MathView`, and `Inter.ttf` / `RobotoFlex.ttf` for the opt-in
iOS and Android platform styles. That was 3.6 MB in every package, and it only existed
because a font an app forgot to declare failed silently: `FontFamily::update_font_definitions`
skipped a member whose bytes never arrived, so the text showed as boxes with no log line.

* Drop the forced extras. The manifest is now the font set's fallback chain plus whatever
  the app puts in `font_assets`, which is what makepad's own apps already did for `Inter`.
* `font_assets` takes expressions, and `INTER_FONT_ASSET` / `ROBOTO_FLEX_FONT_ASSET` join
  `MATH_VIEW_FONT_ASSET`, so an app declares a font by name instead of by path.
* A font that never loads now logs one `error!` naming the path and the fix. A missing
  member still degrades gracefully: the family keeps its remaining members.
* The apps that use those fonts declare them: the `wm` family binds both platform faces,
  `clock`, `weather` and `director` draw with Inter and can select any style, `terminal`
  and the builder use Inter for symbols, `splash` and `aichat` use `MathView`.
2026-09-19 20:35:58 +02:00
..
resources history 2026-06-26 16:47:13 +02:00
src app_main!: only ship the fonts an app declares (#1247) 2026-09-19 20:35:58 +02:00
Cargo.toml ai backbone: the hub era — makepad_ai deleted, every backend is a hub pipe; machine residency elections, job leases, ETA placement; the store only stores; creator pipelines run in the app (aicore) 2026-09-01 16:46:31 +02:00