# HG changeset patch # User Sam # Date 1706963637 -25200 # Node ID 54c5b933cbfc525bb1f22e0686210b4f019fb657 # Parent 50a2dc75b5bd209b60312d4bcda1338106ef7068 add: word-wrapping for texts diff -r 50a2dc75b5bd -r 54c5b933cbfc semicongine/text.nim --- a/semicongine/text.nim Sat Feb 03 19:33:12 2024 +0700 +++ b/semicongine/text.nim Sat Feb 03 19:33:57 2024 +0700 @@ -220,6 +220,9 @@ text.processedText = text.text if text.maxWidth > 0: text.processedText = text.processedText.wordWrapped(text.font, text.maxWidth / text.scale) + echo "--------------------------" + echo text.processedText + echo "##########################" proc `text=`*(text: var Text, newText: string) = `text=`(text, newText.toRunes)