[cairo] how to clear the freetype face cache?

Bill Spitzak spitzak at gmail.com
Mon Jun 10 09:22:02 PDT 2013

On 06/08/2013 07:26 AM, Cosmin Apreutesei wrote:
> Hi,
> When my app closes I need to FT_Done_Face on all used faces so I can
> FT_Done_Freetype, otherwise I get a crash. But cairo still holds
> multiple references to each cairo_font_face_t created with
> cairo_ft_font_face_create_for_ft_face (one for every seleted size as I
> can see) and the doc says I shouldn't FT_Done_Face until those
> references are gone.
> So my question is: is there any way to tell cairo to clear its font
> cache and release those cairo_font_face_t objects?
> Thanks,
> Cosmin.

How about just not call FT_Done_Freetype?

More information about the cairo mailing list