Fixed a small font offset problem mostly seen at really low resolutions.

This commit is contained in:
Leon Styhre 2022-10-26 18:42:42 +02:00
parent cbea006a70
commit 2fd5580e13

View file

@ -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<FontTexture*, std::vector<Renderer::Vertex>> vertMap;