Re: cairo_font_face_t not freeing
Lawrence D'Oliveiro <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
On Mon, 22 May 2017 13:59:43 +0200, Fred Bca wrote: > hfonts are not reference counted, and as far as I remember, cairo > fonts created using this API will not destroy the hfont (and that's > the expected behavior), hence the lifecycle issue ... Couldn’t you use the same workaround as with FreeType fonts? In the early days of Cairo, these were not reference-counted either (they are now). But cairo_ft_font_face_create_for_ft_face cannot be changed to add a call FT_Reference_Face without introducing a backward-incompatible alteration in the semantics. So the caller has to resort to the user-data dance documented here <https://www.cairographics.org/manual/cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-ft-face>. -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo