summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2013-03-15 06:03:52 -0400
committerBehdad Esfahbod <behdad@behdad.org>2013-03-15 06:25:33 -0400
commit71006c534a5599f0a69f4bd9b6677b2a6ad5adb3 (patch)
tree8dbbf01f6f19cd7d6a47a8c68e64f667a04f6063 /pango/pangocairo-fontmap.c
parenteaf18c76ac132c488a274b0ecd1206c4097aedd9 (diff)
downloadpango-71006c534a5599f0a69f4bd9b6677b2a6ad5adb3.tar.gz
Call g_type_init if necessary
Diffstat (limited to 'pango/pangocairo-fontmap.c')
-rw-r--r--pango/pangocairo-fontmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c
index 8f3cc532..a1431902 100644
--- a/pango/pangocairo-fontmap.c
+++ b/pango/pangocairo-fontmap.c
@@ -66,6 +66,10 @@ pango_cairo_font_map_default_init (PangoCairoFontMapIface *iface)
PangoFontMap *
pango_cairo_font_map_new (void)
{
+#if !GLIB_CHECK_VERSION (2, 35, 3)
+ /* Make sure that the type system is initialized */
+ g_type_init ();
+#endif
#if defined(HAVE_CORE_TEXT) && defined (HAVE_CAIRO_QUARTZ)
return g_object_new (PANGO_TYPE_CAIRO_CORE_TEXT_FONT_MAP, NULL);
#elif defined(HAVE_CAIRO_WIN32)
@@ -99,6 +103,10 @@ pango_cairo_font_map_new (void)
PangoFontMap *
pango_cairo_font_map_new_for_font_type (cairo_font_type_t fonttype)
{
+#if !GLIB_CHECK_VERSION (2, 35, 3)
+ /* Make sure that the type system is initialized */
+ g_type_init ();
+#endif
switch ((int) fonttype)
{
#if defined(HAVE_CORE_TEXT) && defined (HAVE_CAIRO_QUARTZ)