[Fontconfig] about FcFini

Behdad Esfahbod behdad at behdad.org
Mon Mar 30 09:20:40 PDT 2009


On 03/30/2009 04:56 AM, Vincent Torri wrote:
> hey,
>
> if i have understood correctly the code, it is possible to call several
> time FcInit, but FcFini can be called only once. That's a problem when
> several libraries use fontconfig (like poppler + qt)

Hi,

My understanding is that:

   * Calling FcInit() is optional.  All fontconfig entry points check and 
initialize the library if needed.

   * FcFini() is designed to only be called by debugging code from 
applications, not for normal use by other libraries.

> Would it be possible to use a ref count for the initialisation /
> finalization of fontconfig ?

It would be feasible if FcInit() was mandatory.  But when it's optional, I'm 
not sure how to define the semantics.  What will the implicit initialization 
do?  Increase the ref count or not?

behdad


> thank you
>
> Vincent Torri


More information about the Fontconfig mailing list