Support tab codepoints;

This commit is contained in:
bjorn 2022-06-20 18:52:10 -07:00
parent 0c36f53fe6
commit cfc0f52449
1 changed files with 6 additions and 0 deletions

View File

@ -2920,6 +2920,12 @@ void lovrPassText(Pass* pass, Font* font, const char* text, uint32_t length, flo
previous = '\0';
text += bytes;
continue;
} else if (codepoint == '\t') {
wordStart = vertexCount;
x += lovrRasterizerGetGlyphAdvance(font->info.rasterizer, ' ') * 4.f;
previous = '\0';
text += bytes;
continue;
} else if (codepoint == '\n') {
if (halign != ALIGN_LEFT) {
float lineWidth = vertices[vertexCount - 1].position.x;