Skip to content

Commit

Permalink
#482 #483 #491 Loads more tests for word breaker.
Browse files Browse the repository at this point in the history
Plus minor behaviour change for word break method to avoid setting ends-on -soft-hyphen flag for soft hyphen at end of box.
  • Loading branch information
danfickle committed Jun 1, 2020
1 parent 430edfb commit 15319be
Show file tree
Hide file tree
Showing 2 changed files with 337 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ static LineBreakResult doBreakTextWords(
extraSpacing + letterSpacing);
current.withHyphenGraphicsLength = current.graphicsLength + withTrailingHyphenSplitWidth;

if (current.withHyphenGraphicsLength > avail) {
if (current.withHyphenGraphicsLength >= avail &&
current.right != currentString.length()) {
current.graphicsLength = current.withHyphenGraphicsLength;
lastWrap = current.left;
current.left = current.right;
Expand Down
Loading

0 comments on commit 15319be

Please sign in to comment.