Mercurial > repos > blastem
diff nuklear_ui/sfnt.c @ 2480:369a52e302e2
Try multiple results from fc-match on Linux rather than assuming the first choice font will be suitable
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 30 Mar 2024 14:26:48 -0700 |
parents | 098c11aaf8f0 |
children |
line wrap: on
line diff
--- a/nuklear_ui/sfnt.c Fri Mar 08 23:14:08 2024 -0800 +++ b/nuklear_ui/sfnt.c Sat Mar 30 14:26:48 2024 -0700 @@ -209,6 +209,18 @@ } } +uint8_t sfnt_has_truetype_glyphs(sfnt_table *sfnt) +{ + uint32_t table_size; + uint8_t *table = sfnt_find_table(sfnt, "glyf", &table_size); + if (!table) { + return 0; + } + table = sfnt_find_table(sfnt, "loca", &table_size); + return table != NULL; + +} + uint8_t *sfnt_flatten(sfnt_table *sfnt, uint32_t *size_out) { uint8_t *ret = NULL;;