harfbuzz / rustybuzz

A complete harfbuzz's shaping algorithm port to Rust
MIT License
551 stars 37 forks source link

Is it possible to push `char` into `UnicodeBuffer`? #44

Closed Riey closed 1 year ago

Riey commented 2 years ago

I want push some chars into UnicodeBuffer for now, I have to collect into String then use push_str

however, push_str seems just decode it into chars so I think fn push(ch: char) method can be possible or at least fn push_chars(chars: impl Iterator<Item = char>) but I'm not sure about cluster

RazrFalcon commented 2 years ago

Probably yes. Will have to take a look. In general, you have to preprocess your string beforehand.

bluebear94 commented 1 year ago

I’m interacting with Java code, so a way to bypass conversion into UTF-8 would be helpful for me, too.