+#ifdef __WXGTK__
+ int w, h;
+
+ PangoLayout *layout = pango_cairo_create_layout (m_context);
+ pango_layout_set_font_description( layout, ((wxCairoFontData*)m_font.GetRefData())->GetFont());
+ const wxCharBuffer data = str.utf8_str();
+ if ( !data )
+ {
+ return;
+ }
+ pango_layout_set_text( layout, data, strlen(data) );
+ pango_layout_get_pixel_size (layout, &w, &h);
+ if ( width )
+ *width = w;
+ if ( height )
+ *height = h;
+ if (descent)
+ {
+ PangoLayoutIter *iter = pango_layout_get_iter(layout);
+ int baseline = pango_layout_iter_get_baseline(iter);
+ pango_layout_iter_free(iter);
+ *descent = h - PANGO_PIXELS(baseline);
+ }
+ g_object_unref (layout);
+#else