GFont simply_res_auto_font(SimplyRes *self, uint32_t id) { if (!id) { return NULL; } SimplyFont *font = (SimplyFont*) list1_find(self->fonts, id_filter, (void*)(uintptr_t) id); if (font) { return font->font; } if (id <= ARRAY_LENGTH(resource_crc_table)) { return simply_res_add_custom_font(self, id); } return NULL; }
GFont simply_res_auto_font(SimplyRes *self, uint32_t id) { if (!id) { return NULL; } SimplyFont *font = (SimplyFont*) list1_find(self->fonts, id_filter, (void*)(uintptr_t) id); if (font) { return font->font; } if (id <= self->num_bundled_res) { return simply_res_add_custom_font(self, id); } return NULL; }