[cairo] [cairo-commit] 2 commits - src/cairo-os2.h src/cairo-os2-surface.c

Peter Weilbacher mozilla at weilbacher.org
Thu Feb 7 13:23:10 PST 2008


On 07.02.08 00:25, Behdad Esfahbod wrote:
> On Wed, 2008-02-06 at 15:07 -0800, Peter Weilbacher wrote:
>> +/**
>> + * cairo_os2_init:
>> + *
>> + * Initializes the Cairo library. This function is automatically called if
>> + * Cairo was compiled to be a DLL (however it's not a problem if it's called
>> + * multiple times). But if you link to Cairo statically, you have to call it
>> + * once to set up Cairo's internal structures and mutexes.
>> + *
>> + * Since: 1.4
>> + **/
>>   cairo_public void
>>   cairo_os2_init (void)
>>   {
>
> Why do you need this?  This function is not in the spirit of cairo.

The archive should be already full of reasons why we need that.

> Mutex initialization should happen automatically.  If you need this for
> FcInit(), we can make that automatic too.

How?

> BTW, the code in there
> assumes that freetype font backend is compiled in unconditionally.

Yes, we should indeed bracket the Fc*() calls with #if CAIRO_HAS_FT_FONT.
Even though it is highly unlikely that someone will compile the OS/2
backend without the FreeType stuff.

    Peter.


More information about the cairo mailing list