freetype-devel
[Top][All Lists]
Advanced

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

Generic data/callback (was Re: [ft-devel] Cache subsystem question


From: Behdad Esfahbod
Subject: Generic data/callback (was Re: [ft-devel] Cache subsystem question
Date: Tue, 28 Sep 2010 14:52:03 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8

On 09/28/10 01:09, Werner LEMBERG wrote:
>>> >> You can register a callback by setting face->generic.
>> >
>> > perfekt solution for my problem. I was not aware of the finalizer
>> > callback.
> Could you suggest an addition to the documentation to improve it?

Actually let me hijack the thread.  While the face->generic is the perfect
solution for an application's needs, it's inadequate for use by other
libraries.  The problem is that there is only one generic slot per face.
What's needed instead is something like the cairo_set_user_data() or
g_object_set_data_full() APIs that allow multiple generic slots.  This can be
implemented as a hash-table internally.  I think it would be enough to just
add such API to FT_Face and perhaps FT_Library, but not other objects.

Anyone feel like cooking such API?  It probably needs a new type other than
FT_Generic since the callback to FT_Generic doesn't get passed the generic
itself, just the containing object.

Thanks,

behdad



reply via email to

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