Skip to content

Move char_style_indices out of the per-item ShapeOptions - #741

Merged
tomcur merged 3 commits into
linebender:mainfrom
tomcur:push-rxklskroztqn
Aug 10, 2026
Merged

Move char_style_indices out of the per-item ShapeOptions#741
tomcur merged 3 commits into
linebender:mainfrom
tomcur:push-rxklskroztqn

Conversation

@tomcur

@tomcur tomcur commented Aug 9, 2026

Copy link
Copy Markdown
Member

LLM Contributions: Review.

The style indices are text-wide, whereas the options are per-item since #727. Fixes the TODO from #727 (comment).

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tomcur tomcur changed the title Push rxklskroztqn Move char_style_indices out of the per-item ShapeOptions Aug 9, 2026
@tomcur
tomcur added this pull request to the merge queue Aug 10, 2026
Merged via the queue into linebender:main with commit a0752c7 Aug 10, 2026
24 checks passed
@tomcur
tomcur deleted the push-rxklskroztqn branch August 10, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants