Commit Graph
18 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 bc6cdd13c9 Decouple iris-core from winit 2026-09-13 00:38:29 -04:00
iris 07de7c8722 update deps 2026-01-04 14:45:18 -05:00
iris 59901b6580 tasks initial impl (still working on task_on trait method) 2026-01-03 16:26:23 -05:00
iris bae17235c6 better global state structure? 2025-12-19 21:54:48 -05:00
iris 2dc5b0f62c refactor project structure (start of redoing atomic branch without atomics) 2025-12-11 05:25:58 -05:00
iris 8896c64445 update imports 😂 2025-11-15 02:10:12 -05:00
iris 73afea8c35 switch to element defined span lens + better size fn 2025-11-13 14:27:31 -05:00
iris 379eec771a stuff 2025-11-10 22:14:27 -05:00
iris 5445008528 add offset / scrolling + clipboard support 2025-09-27 21:13:00 -04:00
iris c1f0b16f20 switch to fxhash 2025-09-21 16:27:36 -04:00
iris 2700c31c13 cursor finally working properly and removed from render_text 2025-09-15 20:30:26 -04:00
iris 9780724126 senses are now bitflags 2025-08-25 22:36:38 -04:00
iris 5ce6fca275 initial text impl 2025-08-23 21:15:39 -04:00
iris 7dbdcbba42 added underdeveloped but working image support (no freeing or samplers) 2025-08-22 23:07:31 -04:00
iris 58d9b32077 reactivity base 2025-08-10 02:05:35 -04:00
iris 56beeb80f3 initial commit 2025-08-08 18:22:52 -04:00
iris eba8481bde rhai 2025-08-05 14:18:37 -04:00