comparison 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
comparison
equal deleted inserted replaced
2479:29baf8d5a579 2480:369a52e302e2
207 } else { 207 } else {
208 return utf16be_to_utf8(name_table + full_off, name_length/2); 208 return utf16be_to_utf8(name_table + full_off, name_length/2);
209 } 209 }
210 } 210 }
211 211
212 uint8_t sfnt_has_truetype_glyphs(sfnt_table *sfnt)
213 {
214 uint32_t table_size;
215 uint8_t *table = sfnt_find_table(sfnt, "glyf", &table_size);
216 if (!table) {
217 return 0;
218 }
219 table = sfnt_find_table(sfnt, "loca", &table_size);
220 return table != NULL;
221
222 }
223
212 uint8_t *sfnt_flatten(sfnt_table *sfnt, uint32_t *size_out) 224 uint8_t *sfnt_flatten(sfnt_table *sfnt, uint32_t *size_out)
213 { 225 {
214 uint8_t *ret = NULL;; 226 uint8_t *ret = NULL;;
215 sfnt_container *cont = sfnt->container; 227 sfnt_container *cont = sfnt->container;
216 switch(cont->container_type) 228 switch(cont->container_type)