From 2fd5580e1365ad27a1dc489e49c85681e8014173 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 26 Oct 2022 18:42:42 +0200 Subject: [PATCH] Fixed a small font offset problem mostly seen at really low resolutions. --- es-core/src/resources/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/resources/Font.cpp b/es-core/src/resources/Font.cpp index 6a3924989..51d21e8e5 100644 --- a/es-core/src/resources/Font.cpp +++ b/es-core/src/resources/Font.cpp @@ -154,7 +154,7 @@ TextCache* Font::buildTextCache(const std::string& text, yBot = getHeight(lineSpacing); } - float y {offset[1] + (yBot + yTop) / 2.0f}; + float y {std::round(offset[1] + (yBot + yTop) / 2.0f)}; // Vertices by texture. std::map> vertMap;