if (width || height)
pango_layout_get_size (layout, &pango_width, &pango_height);
if (width)
*width = (double) pango_width / PANGO_SCALE;
if (height)
*height = (double) pango_height / PANGO_SCALE;
You can use pango_layout_get_pixel_size() to avoid the divisions. It
will return rounded integers though, but that's what you need most of
the time.