From de936a72906d75ab24f818f0b9a9a11e4d23e428 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 17 Jul 2019 21:07:25 -0400 Subject: text_render(): Fill to end of each line --- diff --git a/src/text.c b/src/text.c index 10996c5..b9a0afb 100644 --- a/src/text.c +++ b/src/text.c @@ -116,6 +116,9 @@ text_render(struct text *text, struct font *font, png_bytepp rows) ++string; } } else if (*string == '\n') { + for (; col < text->width; ++col) { + font_render(font, &fg,&bg, ' ', rows, row, col); + } col = 0; ++row; ++string; @@ -125,6 +128,9 @@ text_render(struct text *text, struct font *font, png_bytepp rows) ++string; } } + for (; col < text->width; ++col) { + font_render(font, &fg, &bg, ' ', rows, row, col); + } } struct text * -- cgit v0.9.1