Skip to content

Commit

Permalink
🎨: properly factor in padding when computing line breaks by-words
Browse files Browse the repository at this point in the history
  • Loading branch information
merryman committed Feb 11, 2025
1 parent e76487d commit ee71639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lively.morphic/rendering/font-metric.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ class DOMTextMeasure {
measuringState.emptySpace -= hit;
break;
case 'by-words':
if (measuringState.wordLength < morph.width) {
if (measuringState.wordLength < emptySpace) {
if (measuringState.emptySpaceForWord < measuringState.wordLength && code !== 32) {
measuringState.virtualRow++;
measuringState.currentWord.forEach(entry => entry[1] = measuringState.virtualRow);
Expand Down

0 comments on commit ee71639

Please sign in to comment.