Move char_style_indices out of the per-item ShapeOptions - #741
Merged
Conversation
The style indices are text-wide, whereas the options are now per-item. Fixes the TODO from linebender#727 (comment).
tomcur
commented
Aug 9, 2026
Comment on lines
+90
to
+92
| /// `char_style_indices` holds per-character style indices; these are copied onto | ||
| /// [`Character`][super::Character`] and [`ShapedCluster`][super::ShapedCluster]. A shaped | ||
| /// cluster's style index is that of its logically first constituent character. |
Member
Author
There was a problem hiding this comment.
There's now an argument for dropping style_indices from parley_engine completely, as it doesn't actually read them. Since #727, the full text is shaped, so character indices exposed by parley_engine can be used by users to index into some per-character slice directly.
char_style_indices out of the per-item ShapeOptions
nicoburns
approved these changes
Aug 9, 2026
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.
LLM Contributions: Review.
The style indices are text-wide, whereas the options are per-item since #727. Fixes the TODO from #727 (comment).