Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xi-unicode allows linebreaks in emoji sequences #1322

Open
laurmaedje opened this issue Apr 12, 2022 · 0 comments
Open

xi-unicode allows linebreaks in emoji sequences #1322

laurmaedje opened this issue Apr 12, 2022 · 0 comments
Labels

Comments

@laurmaedje
Copy link

The xi_unicode::LineBreakIterator allows breaks inside of a lot of the longer emoji sequences. For example:

assert_eq!(
    vec![(10, false), (14, false)],
    LineBreakIterator::new("πŸ³οΈβ€πŸŒˆ").collect::<Vec<_>>()
);

Not sure whether this is an actual bug in the code or whether the Unicode data is just outdated. In any case, since this library is used by quite a few projects, it might be worth investigating!

@cmyr cmyr added the bug label Apr 13, 2022
mrobinson added a commit to mrobinson/servo that referenced this issue May 23, 2024
Emoji clusters, such ('πŸ³οΈβ€πŸŒˆ') do not render properly in Servo.
This is because xi-unicode is inserting a linebreak opportunity between
components of the cluster (see xi-editor/xi-editor#1322). This change
adds a workaround for this issue.

`xi-unicode` is fast, but supports an older version of the Unicode
standard than libraries like `icu4x`. In addition, `icu4x` does not
supoprt non-contiguous segmentation which Servo currently depends on.
Finally, the currently released version of `icu4x` has the same issue
(unicode-org/icu4x#4146).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants