iris: move text state into shared resources

This commit is contained in:
iris committed 2026-09-12 14:18:12 -04:00
1 parent 4cbe7baea0
commit a8093b002b
26 files changed
+686 -467

No files matched your search

+12 -7
View File
@@ -814,13 +814,18 @@ private implementations of that wake; applications do not define platform
event types or manually request redraws.
**Iris ships no fonts, and font families are application-named strings**
(2026-09-12). Applications register their own font bytes on `Ui` before the
first text shape and select them by the same string used by text widgets. The
public boundaries accept `AsRef<str>`, so an application can use bare strings
or put its own semantic enum in front of them without Iris hardcoding the
roles. ai-app owns the `ai-app-icons` family, its Nerd Fonts subset, its
codepoints, its license and the script that rebuilds it; the CSS generic names
`sans-serif` and `monospace` continue to resolve through the platform.
(2026-09-12). Applications register their own font bytes on `Ui` and select
them by the same string used by text widgets. The public boundaries accept
`AsRef<str>`, so an application can use bare strings or put its own semantic
enum in front of them without Iris hardcoding the roles. Text buffers, layouts,
and prepared glyphs live in a per-`Ui` generational arena; a text widget holds
one compact handle into it, while the arena and its shaping state are shared by
one `Rc<RefCell<_>>`. Registering another family invalidates the live arena
entries and dirties their active owner widgets, so registration is also valid
after the first shape. ai-app owns the `ai-app-icons` family, its Nerd Fonts
subset, its codepoints, its license and the script that rebuilds it; the CSS
generic names `sans-serif` and `monospace` continue to resolve through the
platform.
`cargo-iris` is an installable Cargo subcommand, rather than a script callers
must find inside an Iris checkout. `cargo iris apk` builds the Rust `cdylib`