Mercurial > repos > blastem
comparison nuklear_ui/font.c @ 1976:3dd9c68472fb
Specify desired language when invoking fc-match to find an appropriate font on Linux
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 09 May 2020 13:15:49 -0700 |
parents | 253c62b7144e |
children | 369a52e302e2 |
comparison
equal
deleted
inserted
replaced
1975:3701517d852c | 1976:3dd9c68472fb |
---|---|
12 if (f) { | 12 if (f) { |
13 fclose(f); | 13 fclose(f); |
14 return strdup(FONT_PATH); | 14 return strdup(FONT_PATH); |
15 } | 15 } |
16 #endif | 16 #endif |
17 FILE *fc_pipe = popen("fc-match -f '%{file}'", "r"); | 17 //TODO: specify language dynamically once BlastEm is localized |
18 FILE *fc_pipe = popen("fc-match :lang=en -f '%{file}'", "r"); | |
18 if (!fc_pipe) { | 19 if (!fc_pipe) { |
19 return NULL; | 20 return NULL; |
20 } | 21 } |
21 size_t buf_size = 128; | 22 size_t buf_size = 128; |
22 char *buffer = NULL; | 23 char *buffer = NULL; |