space fix for paragraph

This commit is contained in:
Ryan Oldenburg 2021-04-29 20:26:29 -05:00
parent c166183f35
commit 410057806e
3 changed files with 2 additions and 1 deletions

View file

@ -137,7 +137,8 @@ proc typeset*(
prevCanWrap = i
let advance = glyphAdvance(result.runes, font, i)
if bounds.x > 0 and at.x + advance > bounds.x: # Wrap to new line
if rune != Rune(32) and bounds.x > 0 and at.x + advance > bounds.x:
# Wrap to new line
at.x = 0
at.y += lineHeight

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB