styled_text: add compact style spans and Parley lowering#631
Open
waywardmonkeys wants to merge 1 commit into
Open
styled_text: add compact style spans and Parley lowering#631waywardmonkeys wants to merge 1 commit into
waywardmonkeys wants to merge 1 commit into
Conversation
Add styled_text and styled_text_parley as first-slice crates for compact styled text storage. The core crate stores resolved complete styles as compact StyleId spans over attributed_text, with layout and paint payloads interned separately so paint-only changes can share layout identity. It includes a builder that resolves overlapping patch ranges and reusable segment workspaces for downstream layout or paint passes. Add styled_text_parley to lower resolved styled-text runs into Parley's low-level style-run builder with a reusable style-index workspace. The adapter includes default Parley-shaped payloads, coalesces adjacent equal style runs during lowering, and includes a Vello CPU example that renders overlapping layout and paint changes. This intentionally leaves cascading, editing policy, and application-specific style vocabularies outside the core styled_text crate.
Contributor
Author
|
This was done with the assistance of Codex (GPT 5.3, 5.4, 5.5, medium, high, xhigh). |
Contributor
Author
|
Some things I have in mind for follow up PRs:
|
This was referenced May 26, 2026
Contributor
PoignardAzur
left a comment
There was a problem hiding this comment.
Quick note: I think this code would be much easier to review if you split it into roughly one file per type. Right now it's kind of hard to find where types are defined without doing a lot of Ctrl+F.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add styled_text and styled_text_parley as first-slice crates for compact styled text storage.
The core crate stores resolved complete styles as compact StyleId spans over attributed_text, with layout and paint payloads interned separately so paint-only changes can share layout identity. It includes a builder that resolves overlapping patch ranges and reusable segment workspaces for downstream layout or paint passes.
Add styled_text_parley to lower resolved styled-text runs into Parley's low-level style-run builder with a reusable style-index workspace. The adapter includes default Parley-shaped payloads, coalesces adjacent equal style runs during lowering, and includes a Vello CPU example that renders overlapping layout and paint changes.
This intentionally leaves cascading, editing policy, and application-specific style vocabularies outside the core styled_text crate.