go-text / typesetting

High quality text shaping in pure Go.
Other
88 stars 11 forks source link

shaping: fix and test cluster splitting bug #30

Closed whereswaldon closed 1 year ago

whereswaldon commented 1 year ago

I discovered that our logic to prevent splitting harfbuzz clusters during wrapping only worked if the run in consideration was at the beginning of the shaped text. A Gio fuzz test for rune accounting was failing as a result. I've fixed the logic and added a new test case to exercise the non-zero-offset cluster splitting case.

Signed-off-by: Chris Waldon christopher.waldon.dev@gmail.com