go-text / typesetting

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

Wrapping Refactors #44

Closed whereswaldon closed 1 year ago

whereswaldon commented 1 year ago

I'm working to implement the insertion of a text truncation symbol, and I've found the wrapping algorithm to be quite difficult to read (it's long, it's intricate, etc). These commits are an effort to make the core algorithm clearer, and to provide reusable helpers. There's definitely more that can be done here, but I thought these changes made a dent, and are probably not contentious.