diff --git a/src/libs/graphics/font.cpp b/src/libs/graphics/font.cpp index 93741b897..01aa4be6e 100644 --- a/src/libs/graphics/font.cpp +++ b/src/libs/graphics/font.cpp @@ -117,8 +117,8 @@ glm::vec2 Font::getTextOffset(const std::string &text, TextGravity gravity) cons float Font::measure(const std::string &text) const { float w = 0.0f; - for (auto &glyph : text) { - w += _glyphs[static_cast(glyph)].size.x; + for (const char &glyph : text) { + w += _glyphs[reinterpret_cast(glyph)].size.x; } return w; }