Bump parley from 0.9.0 to 0.10.0 and expose complex-scripts feature (#24094)#24683
Open
unclepomedev wants to merge 2 commits into
Open
Bump parley from 0.9.0 to 0.10.0 and expose complex-scripts feature (#24094)#24683unclepomedev wants to merge 2 commits into
unclepomedev wants to merge 2 commits into
Conversation
Contributor
|
Welcome, new contributor! Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨ |
mnmaita
approved these changes
Jun 22, 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.
Objective
Fixes #24094
Text containing complex scripts that lack explicit word boundaries (CJK, Thai, Khmer, Lao, Myanmar) is segmented by parley's lightweight segmenter, which emits a data error per layout:
parley 0.10 added a
complex-scriptsCargo feature that switches to dictionary-based segmentation, butbevy_text,bevy_ui, andbevy_ui_widgetswere still pinned to parley 0.9, so it was not reachable from Bevy.Solution
parleyfrom 0.9 to 0.10 inbevy_text,bevy_ui, andbevy_ui_widgets. All three are bumped together so the graph resolves to a single parley version instead of duplicating 0.9 + 0.10.complex_script_segmentationfeature tobevy_textthat forwards toparley/complex-scripts, propagated throughbevy_internalandbevy. It is off by default because the bundled segmentation dictionary increases binary size.This supplies the segmentation data and enables dictionary-based word segmentation; it does not change CJK line-break positions, which ICU keeps permissive by design.
Testing
cargo build -p bevy_text -p bevy_ui -p bevy_ui_widgets, with default features and with--features complex_script_segmentation.cargo tree -i parleyconfirms a single parley 0.10 in the graph (no 0.9/0.10 duplication).cargo tree -e features -i parleyconfirms parley'scomplex-scriptsfeature is only enabled whencomplex_script_segmentationis requested (not pulled in by any default/collection feature).Text2dexample with a Japanese string in a width-bounded box (TextBounds,LineBreak::WordBoundary) underRUST_LOG=warn:No segmentation model for language: jaerror is logged.--features complex_script_segmentation: the error is gone.cargo run -p ci(lints + compile + tests). One unrelated local failure:bevy_ecs ... filtered_backtrace_test, which also fails on main on my machine (an environment-dependent backtrace-symbolization test, unrelated to this PR).