diff libass/ass_cache.c @ 19846:bcc792bfa431

Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer. This is required for various bitmap modifications (like blur, outline and shadow).
author eugeni
date Sat, 16 Sep 2006 13:08:17 +0000
parents 8f46b547db39
children 07be98a5dd5f
line wrap: on
line diff
--- a/libass/ass_cache.c	Sat Sep 16 10:15:42 2006 +0000
+++ b/libass/ass_cache.c	Sat Sep 16 13:08:17 2006 +0000
@@ -2,11 +2,13 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
+#include FT_GLYPH_H
 
 #include <assert.h>
 
 #include "mp_msg.h"
 #include "ass_fontconfig.h"
+#include "ass_bitmap.h"
 #include "ass_cache.h"
 
 
@@ -197,8 +199,8 @@
 		glyph_hash_item_t* item = glyph_hash_root[i];
 		while (item) {
 			glyph_hash_item_t* next = item->next;
-			if (item->val.glyph) FT_Done_Glyph(item->val.glyph);
-			if (item->val.outline_glyph) FT_Done_Glyph(item->val.outline_glyph);
+			if (item->val.bm) ass_free_bitmap(item->val.bm);
+			if (item->val.bm_o) ass_free_bitmap(item->val.bm_o);
 			free(item);
 			item = next;
 		}