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.

This commit is contained in:
Alex Szpakowski
2018-12-27 21:16:45 -04:00
parent a91a0a9431
commit 752c5b70f1
+1 -1
View File
@@ -456,7 +456,7 @@ std::vector<Font::DrawCommand> 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;