diff options
Diffstat (limited to 'src/graphics/engine')
-rw-r--r-- | src/graphics/engine/text.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 581ff01..d0c9cc8 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -646,7 +646,13 @@ void CText::DrawString(const std::string &text, std::vector<FontMetaChar>::itera DrawCharAndAdjustPos(ch, font, size, pos, color); - fmtIndex++; + // increment fmtIndex for each byte in multibyte character + if ( ch.c1 != 0 ) + fmtIndex++; + if ( ch.c2 != 0 ) + fmtIndex++; + if ( ch.c3 != 0 ) + fmtIndex++; } if (eol != 0) |