iris: add replaceable glyph atlas buckets

This commit is contained in:
iris committed 2026-09-12 18:10:55 -04:00
1 parent c97df72015
commit 90dffce514
12 files changed
+401 -91

No files matched your search

+10 -3
View File
@@ -823,9 +823,16 @@ a text widget's `TextHandle` wraps the UI-local `RscHandle` into it. The same
generic arena owns texture and managed-paint lifetimes. Its `StrongRscId` and
`WeakRscId` are sendable IDs rather than data pointers; clone and drop events
cross one arena-owned standard channel, and reference counts remain in the
arena instead of allocating one atomic counter per resource. Registering
another family invalidates the live text entries and dirties their active owner
widgets, so registration is also valid after the first shape. ai-app owns the
arena instead of allocating one atomic counter per resource. The ordinary
`register_font(family, data)` call needs no policy argument and uses the shared
default glyph-atlas bucket; `register_font_in` opts a reloadable or sparse font
into a named bucket. `replace_font` unregisters the old faces, releases only
that bucket's pages, and invalidates the live text entries so their active owner
widgets reshape automatically. Freed array layers are reused without moving
live pages. Glyph rasterisation retains four horizontal quarter-pixel phases,
while final primitive edges (including retained scroll moves) snap to physical
pixels; this favours low-DPI text stability and keeps vertical scrolling from
resampling atlas masks. 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.