Why Doesn’t Cairo Use FT_Reference_ Face?

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.lib.cairo
Organization Geek Central
Message-ID <[email protected]>
There is some really peculiar behaviour in the
cairo_ft_font_face_create_for_ft_face call
<http://cairographics.org/manual/cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-ft-face>.
Cairo wants to keep a reference to the FT_Face, but it seems unable to
use the FT_Reference_Face call which is provided specifically for that
purpose
<http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Reference_Face>!
So the caller is forced to go through some weird contortions to avoid
leaking FT_Face objects, or disposing of them prematurely.

Cairo should call FT_Reference_Face on FT_Face objects that are passed
to it, and balance these with FT_Done_Face calls when it no longer
needs these references.

This would be backward-compatible: the user_data shenanigans documented
on the Cairo API page would not become problematic, they would simply no
longer be necessary.
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.