RazrFalcon / rustybuzz

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

Allow setting pre- and post-contexts in `UnicodeBuffer` #85

Closed bluebear94 closed 8 months ago

bluebear94 commented 8 months ago

Resolves #60.

Only dealing with the UTF-8 version for now. I personally need a UTF-16 version as well, but generalizing this for other encodings can come later.

RazrFalcon commented 8 months ago

Thanks!

khaledhosny commented 8 months ago

FWIW, HarfBuzz API is designed so that when you are shaping a piece of text, e.g. a paragraph, you can itemize it then shape each item by passing the whole string and the item offset and length without having to split the string.

RazrFalcon commented 8 months ago

I understand. Lucky in Rust it's a very simple and safe operation.