From 752c5b70f139012a90a18fe801dc9ddc191bb638 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 27 Dec 2018 21:16:45 -0400 Subject: [PATCH] Fix font vertex generation skipping the first glyph in the string if it restarts its loop due to its texture atlas being recreated to make room for more glyphs. Resolves issue #1452. --- src/modules/graphics/Font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/Font.cpp b/src/modules/graphics/Font.cpp index c70d0b290..4e2c86a06 100644 --- a/src/modules/graphics/Font.cpp +++ b/src/modules/graphics/Font.cpp @@ -456,7 +456,7 @@ std::vector Font::generateVertices(const ColoredCodepoints &c // If findGlyph invalidates the texture cache, re-start the loop. if (cacheid != textureCacheID) { - i = 0; + i = -1; // The next iteration will increment this to 0. maxwidth = 0; dx = offset.x; dy = offset.y;