[ft-devel] Re: Reference count in FreeType2

2010-07-19 Thread Behdad Esfahbod
On 07/18/10 12:43, Werner LEMBERG wrote: I've now implemented FT_Reference_Face and FT_Reference_Library. Please test. Wow, thanks! What a timing... Last week I started working for Google, and I was in Mountain View. I finally met David Turner for the first time, and the first thing I

[ft-devel] Re: Reference count in FreeType2

2010-07-19 Thread Werner LEMBERG
I finally met David Turner for the first time, and the first thing I brought up about FreeType was refcounting, or lack thereof. Aah! Perhaps you can push David to invest more time into FreeType again... Werner, since you seem to have psychic powers, can you please fix the other things I

[ft-devel] Re: Reference count in FreeType2

2010-07-18 Thread Werner LEMBERG
FT_Reference_Face(). That increments the refcount. Then FT_Done_Face() should decrement the refcount and only destroy if it drops to zero. Refcount is initialized to 1 when face is constructed. And of course these should be done using atomic operators. Same about FT_Library and any

[ft-devel] Re: Reference count in FreeType2

2010-03-23 Thread Behdad Esfahbod
On 03/16/2010 02:05 AM, Werner LEMBERG wrote: Use case is very simple: with the FreeType stack, all of hb_face_t, PangoFont, and cairo_scaled_font_t all can use keeping a pointer to an FT_Face. But alas, one cannot do that safely since you never know when the face is going away. Again:

[ft-devel] Re: Reference count in FreeType2

2010-03-16 Thread Werner LEMBERG
# Werner, if the inexistence of reference counter was designed, # please let me know. Not that I'm aware of. David was probably thinking more in `embedded mode' where other issues are of greater importance. Werner ___ Freetype-devel mailing

[ft-devel] Re: Reference count in FreeType2

2010-03-16 Thread Werner LEMBERG
Use case is very simple: with the FreeType stack, all of hb_face_t, PangoFont, and cairo_scaled_font_t all can use keeping a pointer to an FT_Face. But alas, one cannot do that safely since you never know when the face is going away. Again: What would you like as an interface? Something

[ft-devel] Re: Reference count in FreeType2

2010-03-15 Thread Behdad Esfahbod
On 03/15/2010 11:43 PM, mpsuz...@hiroshima-u.ac.jp wrote: However, yet I've not figured out the detailed usecase for reference counter of FreeType2 (so I cannot write short testing code), thus I cannot start working just now. If you know any softwares showing the problem caused by the lack of