comparison tests/test_font.nim @ 426:1e3c242435af

did: mini-cleanup
author Sam <sam@basx.dev>
date Sat, 03 Feb 2024 21:40:25 +0700
parents a03b6db25282
children b1c9374c7080
comparison
equal deleted inserted replaced
425:df621844e32b 426:1e3c242435af
8 var engine = initEngine("Test fonts") 8 var engine = initEngine("Test fonts")
9 engine.initRenderer([]) 9 engine.initRenderer([])
10 10
11 # build scene 11 # build scene
12 var scene = Scene(name: "main") 12 var scene = Scene(name: "main")
13 # var font = loadFont("DejaVuSans.ttf", lineHeightPixels=90'f32, charset="abcdefghijklmnopqrstuvwxyz ".toRunes)
14 var font = loadFont("DejaVuSans.ttf", lineHeightPixels = 210'f32) 13 var font = loadFont("DejaVuSans.ttf", lineHeightPixels = 210'f32)
15 var main_text = font.initText("", maxLen = 255, color = newVec4f(1, 0.15, 0.15, 1), scale = 0.0005, maxWidth = 1.0) 14 var main_text = font.initText("", maxLen = 255, color = newVec4f(1, 0.15, 0.15, 1), scale = 0.0005, maxWidth = 1.0)
16 var help_text = font.initText("""Controls 15 var help_text = font.initText("""Controls
17 16
18 Horizontal alignment: 17 Horizontal alignment: