cosmic-text icon indicating copy to clipboard operation
cosmic-text copied to clipboard

Do you need Unicode text segmentation?

Open sffc opened this issue 1 year ago • 2 comments

Hi, I'm from the ICU4X team. We're an open source project building i18n components in Rust.

I noticed in your README that you support "basic" line layout. If you need to support full UAX 14 line break, including models for Southeast Asian languages, I wanted to suggest ICU4X, the icu_segmenter crate.

icu4x.unicode.org

sffc avatar May 24 '23 02:05 sffc

We use this for uax 14, is it sufficient https://docs.rs/unicode-linebreak/latest/unicode_linebreak/

jackpot51 avatar May 24 '23 03:05 jackpot51

Ok! The main extra functionally icu_segmenter brings to the table are the models for Southeast Asian line break.

Actually I think a good solution here would be to have a trait that can be implemented on top of your choice of underlying UAX 14 engine.

sffc avatar May 24 '23 04:05 sffc