diff --git a/src/pixie/fonts.nim b/src/pixie/fonts.nim index 2f934f0..59687fb 100644 --- a/src/pixie/fonts.nim +++ b/src/pixie/fonts.nim @@ -272,6 +272,7 @@ proc typeset*( result.selectionRects[i].xy = vec2(at.x, at.y) at.x += advance(font, result.runes, i) dec lineStart + prevCanWrap = 0 result.lines[^1][1] = lineStart - 1 result.lines.add((lineStart, 0)) diff --git a/tests/fonts/diffs/basic8b.png b/tests/fonts/diffs/basic8b.png index 088423a..f8f0e47 100644 Binary files a/tests/fonts/diffs/basic8b.png and b/tests/fonts/diffs/basic8b.png differ diff --git a/tests/fonts/rendered/basic8b.png b/tests/fonts/rendered/basic8b.png index 4458fac..27725ad 100644 Binary files a/tests/fonts/rendered/basic8b.png and b/tests/fonts/rendered/basic8b.png differ diff --git a/tests/test_fonts.nim b/tests/test_fonts.nim index bb51f57..b4a34e3 100644 --- a/tests/test_fonts.nim +++ b/tests/test_fonts.nim @@ -194,7 +194,7 @@ block: image.fillText( font, "Long words: Supercalifragilisticexpialidocious\nAntidisestablishmentarianism", - bounds = vec2(100, 100) + bounds = vec2(100, 0) ) doDiff(image, "basic8b")