Mercurial > games > semicongine
comparison tests/test_font.nim @ 341:6cc16b62e497
did: small font improvments
author | Sam <sam@basx.dev> |
---|---|
date | Fri, 08 Sep 2023 00:34:24 +0700 |
parents | 05fb85ba97dd |
children | b83b3a1ccb05 |
comparison
equal
deleted
inserted
replaced
340:01ccd1393e7f | 341:6cc16b62e497 |
---|---|
4 import semicongine | 4 import semicongine |
5 | 5 |
6 proc main() = | 6 proc main() = |
7 var font = loadFont("DejaVuSans.ttf", color=newVec4f(1, 0.5, 0.5, 1), resolution=20) | 7 var font = loadFont("DejaVuSans.ttf", color=newVec4f(1, 0.5, 0.5, 1), resolution=20) |
8 | 8 |
9 var textbox = initTextbox(32, font, "".toRunes) | 9 var textbox = initTextbox(32, font, "") |
10 var scene = Scene(name: "main") | 10 var scene = Scene(name: "main") |
11 scene.add textbox | 11 scene.add textbox |
12 textbox.mesh.transform = scale(0.01, 0.01) | 12 textbox.mesh.transform = scale(0.01, 0.01) |
13 var engine = initEngine("Test fonts") | 13 var engine = initEngine("Test fonts") |
14 engine.initRenderer() | 14 engine.initRenderer() |