void blf_glyph_cache_clear(FontBLF *font) { GlyphCacheBLF *gc; while ((gc = BLI_pophead(&font->cache))) { blf_glyph_cache_free(gc); } }
void blf_font_free(FontBLF *font) { GlyphCacheBLF *gc; font->glyph_cache = NULL; while ((gc = BLI_pophead(&font->cache))) { blf_glyph_cache_free(gc); } FT_Done_Face(font->face); if (font->filename) MEM_freeN(font->filename); if (font->name) MEM_freeN(font->name); MEM_freeN(font); }
void blf_font_free(FontBLF *font) { GlyphCacheBLF *gc; font->glyph_cache = NULL; while (font->cache.first) { gc = font->cache.first; BLI_remlink(&font->cache, gc); blf_glyph_cache_free(gc); } FT_Done_Face(font->face); if (font->filename) MEM_freeN(font->filename); if (font->name) MEM_freeN(font->name); MEM_freeN(font); }