# HG changeset patch # User Sam # Date 1705761401 -25200 # Node ID 8fb4387b2ea14e39829657b65687eda17b4000c2 # Parent 262e771e2573637b4a0536aabc55d2a8c071e06d add: packed textures for font-atlas diff -r 262e771e2573 -r 8fb4387b2ea1 semicongine/resources/font.nim --- a/semicongine/resources/font.nim Sat Jan 20 21:28:17 2024 +0700 +++ b/semicongine/resources/font.nim Sat Jan 20 21:36:41 2024 +0700 @@ -77,7 +77,6 @@ else: images.add empty_image - free(data) let packed = pack(images) diff -r 262e771e2573 -r 8fb4387b2ea1 tests/test_font.nim --- a/tests/test_font.nim Sat Jan 20 21:28:17 2024 +0700 +++ b/tests/test_font.nim Sat Jan 20 21:36:41 2024 +0700 @@ -12,7 +12,7 @@ # var font = loadFont("DejaVuSans.ttf", lineHeightPixels=90'f32, charset="abcdefghijklmnopqrstuvwxyz ".toRunes) var font = loadFont("DejaVuSans.ttf", lineHeightPixels=180'f32) var textbox = initText(32, font, "", color=newVec4f(1, 0, 0, 1)) - let fontscale = 0.001 + let fontscale = 0.002 scene.add textbox textbox.mesh.transform = scale(fontscale, fontscale) engine.loadScene(scene)