diff options
Diffstat (limited to 'nuklear_ui/font.c')
-rw-r--r-- | nuklear_ui/font.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nuklear_ui/font.c b/nuklear_ui/font.c index ff86847..8dde3d0 100644 --- a/nuklear_ui/font.c +++ b/nuklear_ui/font.c @@ -1,11 +1,19 @@ #include <stdio.h> #include <stdlib.h> #include <stdint.h> +#include <string.h> #include "../util.h" #include "sfnt.h" char *default_font_path(void) { +#ifdef FONT_PATH + FILE *f = fopen(FONT_PATH, "rb"); + if (f) { + fclose(f); + return strdup(FONT_PATH); + } +#endif FILE *fc_pipe = popen("fc-match -f '%{file}'", "r"); if (!fc_pipe) { return NULL; |