From 6d39d31c2c681b03109f9207602b08c3cd0f5542 Mon Sep 17 00:00:00 2001 From: tater Date: Sun, 24 Jun 2018 03:27:18 -0500 Subject: [PATCH] fixed spacing --- tdfiglet.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tdfiglet.c b/tdfiglet.c index 64d7d97..8f47e14 100644 --- a/tdfiglet.c +++ b/tdfiglet.c @@ -331,22 +331,20 @@ readchar(int i, glyph_t *glyph, font_t *font) glyph->cell[i].color = 0; } - /* unsure why tbqh */ - p += 2; - while (*p) { ch = *p; p++; - color = *p; - p++; if (ch == '\r') { + ch = ' '; row++; col = 0; - p++; + color = 0; } else { + color = *p; + p++; #ifdef DEBUG if (ch == 0x09) ch = 'T'; @@ -480,7 +478,12 @@ printstr(const char *str, font_t *font) } else { printf("\x03"); } + + for (int s = 0; s < font->spacing; s++) { + printf(" "); + } } + if (opt.color == COLOR_ANSI) { printf("\x1b[0m\n"); } else {