示例#1
0
void blf_glyph_cache_clear(FontBLF *font)
{
	GlyphCacheBLF *gc;

	while ((gc = BLI_pophead(&font->cache))) {
		blf_glyph_cache_free(gc);
	}
}
示例#2
0
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);
}
示例#3
0
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);
}