para->height = (int)(para->fontsize * 1.1 + .5);
/* The y offset from baseline to 0,0 of the bitmap representation */
+#if defined PANGO_VERSION_MAJOR && (PANGO_VERSION_MAJOR >= 1)
para->yoffset_layout = pango_layout_get_baseline (layout) * textlayout_scale;
+#else
+ {
+ /* do it the hard way on rhel5/centos5 */
+ PangoLayoutIter *iter = pango_layout_get_iter (layout);
+ para->yoffset_layout = pango_layout_iter_get_baseline (iter) * textlayout_scale;
+ }
+#endif
/* The distance below midline for y centering of text strings */
para->yoffset_centerline = 0.2 * para->fontsize;