summaryrefslogtreecommitdiffstats
path: root/src/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c6
1 files changed, 6 insertions, 0 deletions
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 *