From 0ce6fc409c482b41e5716c002b97968e63c2d492 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 4 Dec 2011 01:10:19 +0000 Subject: Global list for diskfont.library fontengine cache svn path=/trunk/netsurf/; revision=13225 --- amiga/font.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'amiga/font.c') diff --git a/amiga/font.c b/amiga/font.c index 3accd6650..c7aae0edc 100644 --- a/amiga/font.c +++ b/amiga/font.c @@ -70,6 +70,7 @@ struct ami_font_node }; struct MinList *ami_font_list = NULL; +struct List ami_diskfontlib_list; ULONG ami_devicedpi; ULONG ami_xdpi; @@ -338,7 +339,7 @@ struct ami_font_node *ami_font_open(const char *font) node->objstruct = nodedata; node->dtz_Node.ln_Name = strdup(font); - nodedata->font = OpenOutlineFont(font, NULL, OFF_OPEN); + nodedata->font = OpenOutlineFont(font, &ami_diskfontlib_list, OFF_OPEN); if(!nodedata->font) { LOG(("Requested font not found: %s", font)); @@ -605,6 +606,7 @@ ULONG ami_unicode_text(struct RastPort *rp,const char *string,ULONG length,const void ami_init_fonts(void) { ami_font_list = NewObjList(); + NewList(&ami_diskfontlib_list); /* run first cleanup in ten minutes */ schedule(60000, (schedule_callback_fn)ami_font_cleanup, ami_font_list); @@ -621,7 +623,7 @@ void ami_font_close(struct ami_font_node *node) { /* Called from FreeObjList if node type is AMINS_FONT */ - CloseOutlineFont(node->font, NULL); + CloseOutlineFont(node->font, &ami_diskfontlib_list); } static void ami_font_cleanup(struct MinList *ami_font_list) -- cgit v1.2.3