freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extensions in FreeType library


From: Werner LEMBERG
Subject: Re: Extensions in FreeType library
Date: Mon, 17 Jul 2000 13:02:12 +0200 (CEST)

> You have to initialize extension by making calls like
>
>       TT_Init_GSUB_Extension
>
> there you pass GSUB_Destroy function which deallocates memory
> associated with GSUB Tables.
> 
> Now if i have loaded some OpenTypeFont, i want to unload it
> (i.e. free the memory associated with it) -- how to deallocate
> memory associated with GSUB/GPOS/GDEF tables explicitly?

`GSUB_Destroy()' is called by `Extension_Destroy()' (after it has been
registered by `TT_Register_Extension()' which is itself called by
`TT_Init_GSUB_Extension()').

`Extension_Destroy()', which calls all registered extension destructor
functions, is called by `Face_Destroy()'.  This function is registered
as the destructor function for `Cache_Done()' (resp. the macro
`CACHE_Done()').  The topmost function which uses `CACHE_Done()' is
`TT_Close_Face()'.

With other words, a call to `TT_Close_Face()' will eventually call
`GSUB_Destroy()' and its sister functions -- since you have to unload
a font file with `TT_Close_Face()' anyway, there is no need to call
`GSUB_Destroy()' explicitly.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]