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>
This commit is contained in:
500 Internal Server Error
An error occurred:
An error occurred
Gitea Version: 1.28.0+dev-531-gcdf786ce92