summaryrefslogtreecommitdiffstats
path: root/src/font.c
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-18 14:40:08 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-18 14:40:08 (EDT)
commit16332bd57b86edebaefa83c6ca8fb3d04048e93d (patch)
tree283397d9d80cd261402933f3d536e33abe946baa /src/font.c
parenteb7115b77e55fb049edd5582b114eefb246edf40 (diff)
font_list(): New function
Diffstat (limited to 'src/font.c')
-rw-r--r--src/font.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/font.c b/src/font.c
index 30d51c9..719d7ff 100644
--- a/src/font.c
+++ b/src/font.c
@@ -22,6 +22,7 @@
#include "font.h"
#include <limits.h>
+#include <stdio.h>
#include <string.h>
#include <png.h>
@@ -47,6 +48,16 @@ static const struct font_desc *fonts[] = {
&font_mplus_1mn_regular_16x22,
};
+void
+font_list(FILE *stream)
+{
+ size_t i;
+
+ for (i = 0; i < *(&fonts + 1) - fonts; ++i) {
+ fprintf(stream, "%s\n", fonts[i]->name);
+ }
+}
+
struct font *
font_default(void)
{