summaryrefslogtreecommitdiffstats
path: root/src/base/ftobjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/ftobjs.c')
-rw-r--r--src/base/ftobjs.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 64575af..36ee797 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (body). */
/* */
-/* Copyright 1996-2011 by */
+/* Copyright 1996-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -445,6 +445,10 @@
else
prev->next = cur->next;
+ /* finalize client-specific data */
+ if ( slot->generic.finalizer )
+ slot->generic.finalizer( slot );
+
ft_glyphslot_done( slot );
FT_FREE( slot );
break;
@@ -1187,7 +1191,7 @@
/* there's a Mac-specific extended implementation of FT_New_Face() */
/* in src/base/ftmac.c */
-#if !defined( FT_MACINTOSH ) || defined( DARWIN_NO_CARBON )
+#ifndef FT_MACINTOSH
/* documentation is in freetype.h */
@@ -1211,7 +1215,7 @@
return FT_Open_Face( library, &args, face_index, aface );
}
-#endif /* defined( FT_MACINTOSH ) && !defined( DARWIN_NO_CARBON ) */
+#endif
/* documentation is in freetype.h */
@@ -1520,7 +1524,7 @@
}
-#if !defined( FT_MACINTOSH ) || defined( DARWIN_NO_CARBON )
+#ifndef FT_MACINTOSH
/* The resource header says we've got resource_cnt `POST' (type1) */
/* resources in this file. They all need to be coalesced into */
@@ -1875,7 +1879,7 @@
for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
{
- is_darwin_vfs = raccess_rule_by_darwin_vfs( i );
+ is_darwin_vfs = ft_raccess_rule_by_darwin_vfs( library, i );
if ( is_darwin_vfs && vfs_rfork_has_no_font )
{
FT_TRACE3(( "Skip rule %d: darwin vfs resource fork"
@@ -4085,10 +4089,10 @@
/* all child faces. */
/* */
/* <InOut> */
- /* module :: A handle to the target driver object. */
+ /* module :: A handle to the target driver object. */
/* */
/* <Note> */
- /* The driver _must_ be LOCKED! */
+ /* The driver _must_ be LOCKED! */
/* */
static void
Destroy_Module( FT_Module module )
@@ -4098,10 +4102,6 @@
FT_Library library = module->library;
- /* finalize client-data - before anything else */
- if ( module->generic.finalizer )
- module->generic.finalizer( module );
-
if ( library && library->auto_hinter == module )
library->auto_hinter = 0;
@@ -4318,6 +4318,7 @@
FT_Module* cur = library->modules;
FT_Module* limit = cur + library->num_modules;
+
for ( ; cur < limit; cur++ )
{
if ( cur[0] != module )
@@ -4511,10 +4512,6 @@
memory = library->memory;
- /* Discard client-data */
- if ( library->generic.finalizer )
- library->generic.finalizer( library );
-
/*
* Close all faces in the library. If we don't do this, we can have
* some subtle memory leaks.