From 5cb84047b94b9ac390154ed074708825bda36cca Mon Sep 17 00:00:00 2001 From: Shadow Cat Date: Sun, 24 Aug 2025 22:40:12 -0400 Subject: [PATCH] text fix? --- src/layout/painter.rs | 2 +- src/render/shader.wgsl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layout/painter.rs b/src/layout/painter.rs index b5f875b..9b0c40c 100644 --- a/src/layout/painter.rs +++ b/src/layout/painter.rs @@ -157,7 +157,7 @@ impl<'a, Ctx> Painter<'a, Ctx> { // TODO: I feel like this shouldn't be needed // what this does is makes sure the text doesn't get squeezed into one pixel less // I'm unsure exactly why it happens or if this will ever expand it too much - region.bot_right.shift(0.01); + // region.bot_right.shift(0.01); self.draw_texture_at(&handle, region); } diff --git a/src/render/shader.wgsl b/src/render/shader.wgsl index a726477..3d70577 100644 --- a/src/render/shader.wgsl +++ b/src/render/shader.wgsl @@ -61,8 +61,8 @@ fn vs_main( ) -> VertexOutput { var out: VertexOutput; - let top_left = round(in.top_left_anchor * window.dim) + in.top_left_offset; - let bot_right = round(in.bottom_right_anchor * window.dim) + in.bottom_right_offset; + let top_left = floor(in.top_left_anchor * window.dim) + floor(in.top_left_offset); + let bot_right = floor(in.bottom_right_anchor * window.dim) + floor(in.bottom_right_offset); let size = bot_right - top_left; let uv = vec2(