From cfc0f524498755e8965411c38046ec3be9e846c3 Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 20 Jun 2022 18:52:10 -0700 Subject: [PATCH] Support tab codepoints; --- src/modules/graphics/graphics.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/graphics/graphics.c b/src/modules/graphics/graphics.c index 11c3c3f1..2267dc23 100644 --- a/src/modules/graphics/graphics.c +++ b/src/modules/graphics/graphics.c @@ -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;