{
Fndat *fd;
- while (fonts_zero)
+ EINA_LIST_FREE(fonts_zero, fd)
+ {
+ if (fd->name) eina_stringshare_del(fd->name);
+ if (fd->source) eina_stringshare_del(fd->source);
+ evas->engine.func->font_free(evas->engine.data.output, fd->font);
+ free(fd);
+ }
+}
+
+void
+evas_fonts_zero_presure(Evas *evas)
+{
+ Fndat *fd;
+
+ while (fonts_zero
+ && eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */
{
fd = eina_list_data_get(fonts_zero);
+ if (fd->ref != 0) break;
+ fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
+
if (fd->name) eina_stringshare_del(fd->name);
if (fd->source) eina_stringshare_del(fd->source);
evas->engine.func->font_free(evas->engine.data.output, fd->font);
free(fd);
- fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
+ if (eina_list_count(fonts_zero) < 5) break;
}
}
break;
}
}
- while ((fonts_zero) &&
- (eina_list_count(fonts_zero) > 4)) /* 4 is arbitrary */
+ while (fonts_zero
+ && eina_list_count(fonts_zero) > 42) /* 42 is arbitrary */
{
fd = eina_list_data_get(fonts_zero);
+
if (fd->ref != 0) break;
fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
+
if (fd->name) eina_stringshare_del(fd->name);
if (fd->source) eina_stringshare_del(fd->source);
evas->engine.func->font_free(evas->engine.data.output, fd->font);
free(fd);
+
+ if (eina_list_count(fonts_zero) < 43) break;
}
}
void evas_font_dir_available_list_free(Eina_List *available);
void evas_font_free(Evas *evas, void *font);
void evas_fonts_zero_free(Evas *evas);
+void evas_fonts_zero_presure(Evas *evas);
void *evas_font_load(Evas *evas, const char *name, const char *source, int size);
void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);
void evas_object_smart_member_cache_invalidate(Evas_Object *obj);