From 1037c5dcb51cd0865360533da7e97638dda35f7f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 3 Jan 2013 20:06:23 -0600 Subject: Update docs to reflect per-thread default fontmap --- pango/pangocairo-fontmap.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c index 461de9f9..946ef41d 100644 --- a/pango/pangocairo-fontmap.c +++ b/pango/pangocairo-fontmap.c @@ -135,8 +135,12 @@ static GPrivate default_font_map = G_PRIVATE_INIT (g_object_unref); /* MT-safe * * change the Cairo font backend that the default fontmap * uses for example. * - * Return value: (transfer none): the default Cairo fontmap - * for Pango. This object is owned by Pango and must not be freed. + * Note that since Pango 1.32.6, the default fontmap is per-thread. + * Each thread gets its own default fontmap. In this way, + * PangoCairo can be used safely from multiple threads. + * + * Return value: (transfer none): the default PangoCairo fontmap + * for the current thread. This object is owned by Pango and must not be freed. * * Since: 1.10 **/ @@ -164,6 +168,12 @@ pango_cairo_font_map_get_default (void) * default fontmap uses for example. The old default font map * is unreffed and the new font map referenced. * + * Note that since Pango 1.32.6, the default fontmap is per-thread. + * This function only changes the default fontmap for + * the current thread. Default fontmaps of exisiting threads + * are not changed. Default fontmaps of any new threads will + * still be created using pango_cairo_font_map_new(). + * * A value of %NULL for @fontmap will cause the current default * font map to be released and a new default font * map to be created on demand, using pango_cairo_font_map_new(). -- cgit v1.2.1