diff tests/test_font.nim @ 422:a03b6db25282

add: text-wrapping, fix: incorrect descriptor poolsizes
author Sam <sam@basx.dev>
date Wed, 31 Jan 2024 00:29:40 +0700
parents 91e018270832
children 1e3c242435af
line wrap: on
line diff
--- a/tests/test_font.nim	Mon Jan 29 00:21:16 2024 +0700
+++ b/tests/test_font.nim	Wed Jan 31 00:29:40 2024 +0700
@@ -12,7 +12,7 @@
   var scene = Scene(name: "main")
   # var font = loadFont("DejaVuSans.ttf", lineHeightPixels=90'f32, charset="abcdefghijklmnopqrstuvwxyz ".toRunes)
   var font = loadFont("DejaVuSans.ttf", lineHeightPixels = 210'f32)
-  var main_text = font.initText("", 32, color = newVec4f(1, 0.15, 0.15, 1), scale = 0.001)
+  var main_text = font.initText("", maxLen = 255, color = newVec4f(1, 0.15, 0.15, 1), scale = 0.0005, maxWidth = 1.0)
   var help_text = font.initText("""Controls
 
 Horizontal alignment: