Commit Graph
20 Commits
Author SHA1 Message Date
iris-aiandiris 0f6a28b4dd Move text layout and rendering to Parley (#10)
Replace the cosmic-text path with Parley layout and Swash rasterization, backed by shared glyph-atlas pages. Shaping, editing, rasterization, and glyph rendering move together because they share the text buffer and rendered-glyph types; splitting them further would require a temporary renderer that is immediately removed.

This is reconstructed rather than replayed from the extraction history. It also fixes issues found during review:

- texture binding changes remain set when an atlas patch follows a new page
- pressing an empty field places a caret and accepts input
- selection motion delegates collapse behavior to Parley
- character deletion follows logical clusters rather than visual neighbors
- the unused root-level Swash dependency is omitted

Four public-behavior integration tests live in `tests/text_edit.rs`: empty-field input, multibyte IME preedit replacement, UTF-8-safe backspace, and selection replacement. The old twelve-test inline block and implementation-restating cases are omitted.

Every added source comment was manually reviewed. Comments that narrated implementation or history were removed; retained comments document cache/rasterization keys, GPU upload constraints, focus representation, bidi geometry, or IME semantics.

Known limitation: atlas pages currently grow without eviction. Each page is 4 MiB on CPU and GPU. An arbitrary cap would leave cached rendered-text UVs pointing at reused glyph slots, so bounding this safely needs a later generation/invalidation change.

This changes public text types and signatures. GPU glyph rendering is covered by compilation rather than a live-surface test.

Verified with:

- `cargo fmt --all --check`
- `cargo clippy --workspace --all-targets -- -D warnings`
- `cargo test --workspace` (four integration tests pass)

Cargo still reports inherited future-incompatibility notices for existing wgpu/winit dependencies; there are no current clippy warnings.

---------

Co-authored-by: iris <2+iris@noreply.localhost>
Reviewed-on: iris/iris#10
Reviewed-by: iris <2+iris@noreply.localhost>
Co-authored-by: AIris <4+iris-ai@noreply.localhost>
2026-09-13 03:39:23 -04:00
iris 84c460a91f app work 2025-12-03 22:51:33 -05:00
iris 5785352ac0 max size + better scrolling size fn 2025-11-21 02:44:59 -05:00
iris 38d7ca3090 todo update 2025-11-18 01:09:58 -05:00
iris 126c442706 todo update 2025-11-18 01:08:17 -05:00
iris 3425eb7b80 finisth editing todo 2025-11-17 16:39:59 -05:00
iris 681efe1e2b edit todo 2025-11-17 16:39:09 -05:00
iris 182b1d4729 add detail on what the problem is in todo 2025-11-14 14:43:36 -05:00
iris deaf730901 app work 2025-11-11 13:55:36 -05:00
iris 1c49db1b89 initial mask impl 2025-11-10 14:45:22 -05:00
iris 5c2022396a update todo 2025-09-29 14:54:47 -04:00
iris 21f15fb9c5 event system!!! 2025-09-25 12:37:06 -04:00
iris 15cc91d92a update todo 2025-09-07 23:45:24 -04:00
iris 2b5965e2e9 add to todo 2025-09-07 23:44:55 -04:00
iris 9780724126 senses are now bitflags 2025-08-25 22:36:38 -04:00
iris d4b1a56467 comments 2025-08-25 16:30:06 -04:00
iris 5fe63e311c update todo 2025-08-22 23:10:32 -04:00
iris b7f83b58a9 sensor ctx 2025-08-20 13:09:03 -04:00
iris 1482e5d67c comments 2025-08-20 12:18:44 -04:00
iris 368826fe05 refcount ids and delete unused 2025-08-16 19:15:21 -04:00