Mercurial > games > semicongine
comparison tests/test_font.nim @ 802:a9c67e1ecb8d
did: small font improvments
author | Sam <sam@basx.dev> |
---|---|
date | Fri, 08 Sep 2023 00:34:24 +0700 |
parents | d65b62812d34 |
children | b83b3a1ccb05 |
comparison
equal
deleted
inserted
replaced
801:73de86a9ec0a | 802:a9c67e1ecb8d |
---|---|
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() |