From 3402701f994c5436e74eabb8db4d4f0ca557ff15 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Thu, 13 Jun 2024 18:35:32 -0400 Subject: [PATCH] fix bug with outside bunds calc for VEFontCache.cache_glyph --- code/font/VEFontCache/VEFontCache.odin | 4 ++-- code/sectr/engine/render_vefc.odin | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/font/VEFontCache/VEFontCache.odin b/code/font/VEFontCache/VEFontCache.odin index bd32603..28d090e 100644 --- a/code/font/VEFontCache/VEFontCache.odin +++ b/code/font/VEFontCache/VEFontCache.odin @@ -466,8 +466,8 @@ cache_glyph :: proc( ctx : ^Context, font : FontID, glyph_index : Glyph, scale, bounds_0, bounds_1 := parser_get_glyph_box( & entry.parser_info, glyph_index ) outside := Vec2 { - f32(bounds_0.x - 21), - f32(bounds_0.y - 33), + f32(bounds_0.x) - 21, + f32(bounds_0.y) - 33, } // Note(Original Author): Figure out scaling so it fits within our box. diff --git a/code/sectr/engine/render_vefc.odin b/code/sectr/engine/render_vefc.odin index ef3790d..d9a468f 100644 --- a/code/sectr/engine/render_vefc.odin +++ b/code/sectr/engine/render_vefc.odin @@ -51,7 +51,7 @@ render :: proc() // ve_ctx := & font_provider.ve_font_cache // Triangle Demo - if true + if false { using debug.gfx_tri_demo_state sokol_gfx.begin_pass(sokol_gfx.Pass { action = pass_action, swapchain = sokol_glue.swapchain() })