Shane F. Carr

Results 1850 comments of Shane F. Carr

Example of using the const function to build a ZeroSlice: https://github.com/unicode-org/icu4x/blob/269b807d9f0eda2905efab6c9e6bd30d8c243a80/utils/codepointtrie/benches/tries/gc_small.rs The first step for this issue is to migrate all users of `from_slice_or_alloc` to use the const function if...

@Manishearth Can you assign this issue to a milestone, such as 1.x Untriaged?

Skia's code is here: https://skia.googlesource.com/skia/+/refs/heads/main/modules/skunicode/src/SkUnicode_icu.cpp Key call sites: - [x] `sk_ubidi_setPara(bidi.get(), (const UChar*)utf16, utf16Units, bidiLevel, nullptr, &status);` - [ ] `sk_ubidi_reorderVisual(runLevels, levelsCount, logicalFromVisual);` - [x] `sk_ubidi_getLevelAt(fBidi.get(), pos);` - [x] `sk_ubidi_getLength(bidi.get());`...

> **For `sk_ubidi_reorderVisual(runLevels, levelsCount, logicalFromVisual);`** while our discussion, we decided for now to use the `reorder` function on a paragraph instead of using `reorder` on just the levels and the...

For (2), please change Skia to continue using ICU4C APIs, just a smaller set that are compatible with ICU4X. Actually changing Skia to ICU4X is a bigger change.

Thought: since the `ubidi_reorderVisual` function is stateless (requires no data), and it is only about a dozen lines long, we could _just implement the function in Skia_ in the ICU4X...

> @sffc we still need some kind of intermediate API exposed from unicode_bidi for this, yes? any idea what it should look like? What I mean is that this particular...

The function doesn't cross FFI; it operates only on the two arrays that were passed in (one mutable, one immutable) https://github.com/unicode-org/icu/blob/e69f337f3cf3cfa8504513cdfdd72dd67e071a0e/icu4c/source/common/ubidiln.cpp#L813

It's none of my business how Skia gets the level maps; they must have code somewhere that generates them. Maybe they come from Harfbuzz or elsewhere.

No, this issue is not done until we also expose `reorder_visual` in the FFI. That is literally the title of the issue :)