From dac7819e5de1e531a86145257243fde88f924a4e Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 21 Sep 2021 22:17:04 +0300 Subject: Text: Use 8-wide tabs; hide indicators for now --- src/ui/text.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/text.c b/src/ui/text.c index 2c17b3da..de8f10a4 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -1339,7 +1339,7 @@ static void shape_GlyphBuffer_(iGlyphBuffer *d) { } static float nextTabStop_Font_(const iFont *d, float x) { - const float stop = 4 * d->emAdvance; + const float stop = 8 * d->emAdvance; return floorf(x / stop) * stop + stop; } @@ -1696,6 +1696,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { const float yAdvance = run->font->yScale * buf->glyphPos[i].y_advance; const iGlyph *glyph = glyphByIndex_Font_(run->font, glyphId); if (logicalText[logPos] == '\t') { +#if 0 if (mode & draw_RunMode) { /* Tab indicator. */ iColor tabColor = get_Color(uiTextAction_ColorId); @@ -1708,6 +1709,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { pad }); } +#endif xCursor = nextTabStop_Font_(d, xCursor) - xAdvance; } const float xf = xCursor + xOffset; -- cgit v1.2.3