free the freetype handle after we're done with it.

SVN revision: 8356
This commit is contained in:
tsauerbeck 2004-01-12 18:12:41 +00:00 committed by tsauerbeck
parent aa22ce4442
commit 9c22413aa8
8 changed files with 26 additions and 1 deletions

View File

@ -296,6 +296,8 @@ evas_engine_buffer_output_free(void *data)
evas_common_tilebuf_free(re->tb);
if (re->rects) evas_common_tilebuf_free_render_rects(re->rects);
free(re);
evas_common_font_shutdown();
}
static void

View File

@ -1,11 +1,11 @@
#include "evas_common.h"
FT_Library ft_lib;
static int initialised = 0;
void
evas_common_font_init(void)
{
static int initialised = 0;
int error;
if (initialised) return;
@ -14,6 +14,18 @@ evas_common_font_init(void)
initialised = 1;
}
void
evas_common_font_shutdown(void)
{
int error;
if (!initialised) return;
error = FT_Done_FreeType(ft_lib);
if (error) return;
initialised = 0;
}
int
evas_common_font_ascent_get(RGBA_Font *fn)
{

View File

@ -208,6 +208,8 @@ evas_engine_directfb_output_free(void *data)
re->backbuf->Release(re->backbuf);
evas_common_image_free(re->rgba_image);
free(re);
evas_common_font_shutdown();
}
void

View File

@ -242,6 +242,8 @@ evas_engine_fb_output_free(void *data)
evas_common_tilebuf_free(re->tb);
if (re->rects) evas_common_tilebuf_free_render_rects(re->rects);
free(re);
evas_common_font_shutdown();
}
static void

View File

@ -257,6 +257,8 @@ evas_engine_gl_x11_output_free(void *data)
re = (Render_Engine *)data;
free(re);
evas_common_font_shutdown();
}
static void

View File

@ -258,6 +258,8 @@ evas_engine_software_qtopia_output_free(void *data)
evas_common_tilebuf_free(re->tb);
if (re->rects) evas_common_tilebuf_free_render_rects(re->rects);
free(re);
evas_common_font_shutdown();
}
static void

View File

@ -301,6 +301,8 @@ evas_engine_software_x11_output_free(void *data)
evas_common_tilebuf_free(re->tb);
if (re->rects) evas_common_tilebuf_free_render_rects(re->rects);
free(re);
evas_common_font_shutdown();
}
static void

View File

@ -803,6 +803,7 @@ void evas_common_blit_rectangle (RGBA_Image *src, RGBA_Image *
/****/
void evas_common_font_init (void);
void evas_common_font_shutdown (void);
RGBA_Font *evas_common_font_load (const char *name, int size);
void evas_common_font_free (RGBA_Font *fn);