From 757c817855a80d766740afb8a8e718124152227d Mon Sep 17 00:00:00 2001 From: tovjemam Date: Sun, 22 Mar 2026 19:42:15 +0100 Subject: [PATCH] Align text to whole pixels if scale is 1 to make it pixel perfect and not retarded in some cases --- src/gui/context.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/context.cpp b/src/gui/context.cpp index 502385a..35a52c7 100644 --- a/src/gui/context.cpp +++ b/src/gui/context.cpp @@ -146,6 +146,9 @@ void gui::Context::DrawText(std::string_view text, const glm::vec2& pos, uint32_ glm::vec2 cursor = pos; + if (scale == 1.0f) + cursor = glm::floor(cursor); + uint32_t curr_color = color; while (cp = DecodeUTF8Codepoint(p, end))