Skip to content

Add optional icu4x unicode data#407

Merged
dfrg merged 5 commits into
mainfrom
icu4x-unicode
Jul 14, 2026
Merged

Add optional icu4x unicode data#407
dfrg merged 5 commits into
mainfrom
icu4x-unicode

Conversation

@dfrg

@dfrg dfrg commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Adds a new icu feature that pulls in the icu_properties and icu_normalizer crates to provide Unicode support for general category, script, canonical combining class, mirroring, compose and decompose (the HB unicode funcs set).

When the feature is enabled, we use the ICU functions and our built-in UCD is excluded from the build.

Also includes a little bit of reorganization and cleanup of the unicode types.

@dfrg
dfrg requested a review from behdad July 8, 2026 19:57
Comment thread harfrust/src/hb/algs.rs
Comment on lines -19 to -21
pub fn rb_flag_range(x: u32, y: u32) -> u32 {
(x < y) as u32 + rb_flag(y + 1) - rb_flag(x)
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This port from HB of static_assert_expr((x) < (y)) + FLAG((y) + 1) - FLAG(x) wasn't quite right :)

@dfrg
dfrg merged commit bd0a9d2 into main Jul 14, 2026
3 checks passed
@dfrg
dfrg deleted the icu4x-unicode branch July 14, 2026 16:56
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