harfbuzz / rustybuzz

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

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

Closed bluebear94 closed 1 year ago

bluebear94 commented 1 year 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 1 year ago

Thanks!

khaledhosny commented 1 year 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 1 year ago

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