Repository navigation
Update icu4x to version 2.2 - #8406
Merged
Merged
Conversation
Member
|
FYI: I'm currently rebasing this and preparing for merge. I've decided to squash the latter two commits (to not have an intermediate bad state on main) and to reorder the test commit to the back (to not have a wrong test reference). I think your commit structure was useful for review, but I prefer the other structure on main. |
Co-authored-by: Moh Takver <[email protected]>
Co-authored-by: Philipp Niedermayer <[email protected]>
Member
|
Parts of ixu4x 1.5 were still in the dependency tree. I manage to get rid of it by running |
Member
|
Thanks! |
This was referenced Jun 4, 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.
Updates
icu4xto version 2.2.0 and uses constant compiled data instead of postcard data where possible.This depends on the updated postcard data for CJ line segmenting in my fork of
typst-assets, but can target the official repo once typst/typst-assets#20 lands.Closes #7834
Based on work by @mohtakver in #7412
Adds the test from #7652 by @eltos, closing #1920
Supersedes #8396 by @Drodt, unblocking work on typst/hayagriva#314
Finally unblocks #7350, which I will be rebasing on top of this branch
Why did this take so long?
We currently run patched line segmenter data for icu4x v1.4 that were generated by @peng1999 for #1355. These data apply custom line break properties to curly quotes (
“,U+201Cand”,U+201D) for the line segmenter so that there are only line break opportunities on the outside of the quotes, which is important for good linebreaking in Chinese and Japanese.However, postcard blobs from icu4x v1.x are incompatible with v2.x. So to avoid regressing linebreaking for Chinese/Japanese, updating icu4x has stalled on regenerating the postcard data, which is a huge hassle, but I have persevered! Fixing this required researching and understanding the original problem, the original fix to the problem, how icu4x data loading works, how icu4x data generation changed in version 2, recovering from dead ends like using the unstable neo line segmenter, and incorporating all of those fixes together in the current Typst repo.
Wait, what was that about an unstable neo line segmenter? I'm so glad you asked!
Cargo.tomltargeting the neo line segmenter Unicode 17 updateSo, I finally caved to the last option and made this PR. However I will be very excited for the CJ segmenter patch to be made obsolete by a future version of icu4x!