kas-gui / kas-text

Rich text processing
Apache License 2.0
59 stars 2 forks source link

Wrap lines rewrite #24

Closed dhardy closed 4 years ago

dhardy commented 4 years ago

This is a re-write of most of the wrapping code — all because the previous code could not easily be adapted to respect a no-break-at-end-of-run flag. This flag is a little important for bidi and will be much more important once formatting is implemented (e.g. to prevent wrapping after a bold letter in the middle of a word).

The new code is shorter and much cleaner than the old code, and avoids another bug I found in the old code (to do with justified bidi text). I care not to compare performance, but it's likely similar.

Several TODO notes remain here; these are for consideration later (if they aren't acted on, that's also fine).

dhardy commented 4 years ago

Note: f7c9222 is effectively excluded. Rather than rebase commits I'll just squash.