void _cairo_font_reset_static_data (void) { _cairo_scaled_font_map_destroy (); _cairo_lock_global_image_glyph_cache(); _cairo_cache_destroy (_global_image_glyph_cache); _global_image_glyph_cache = NULL; _cairo_unlock_global_image_glyph_cache(); CAIRO_MUTEX_LOCK (cairo_toy_font_face_hash_table_mutex); _cairo_hash_table_destroy (cairo_toy_font_face_hash_table); cairo_toy_font_face_hash_table = NULL; CAIRO_MUTEX_UNLOCK (cairo_toy_font_face_hash_table_mutex); }
void _cairo_scaled_font_fini (cairo_scaled_font_t *scaled_font) { if (scaled_font->font_face != NULL) cairo_font_face_destroy (scaled_font->font_face); if (scaled_font->glyphs != NULL) _cairo_cache_destroy (scaled_font->glyphs); if (scaled_font->surface_backend != NULL && scaled_font->surface_backend->scaled_font_fini != NULL) scaled_font->surface_backend->scaled_font_fini (scaled_font); scaled_font->backend->fini (scaled_font); }