Align text to whole pixels if scale is 1 to make it pixel perfect and not retarded in some cases

This commit is contained in:
tovjemam 2026-03-22 19:42:15 +01:00
parent 1afd4100b4
commit 757c817855

View File

@ -146,6 +146,9 @@ void gui::Context::DrawText(std::string_view text, const glm::vec2& pos, uint32_
glm::vec2 cursor = pos; glm::vec2 cursor = pos;
if (scale == 1.0f)
cursor = glm::floor(cursor);
uint32_t curr_color = color; uint32_t curr_color = color;
while (cp = DecodeUTF8Codepoint(p, end)) while (cp = DecodeUTF8Codepoint(p, end))