PangoFontDescription *desc;
PangoRectangle logical_rect, ink_rect;
PangoRectangle pixel_logical_rect, pixel_ink_rect;
- PangoLayoutIter *iter;
PangoFont *font;
PangoFontMetrics *fontmetrics;
cairo_font_options_t *options;
}
layout = pango_layout_new(context);
+ pango_layout_set_spacing(layout,0);
pango_layout_set_text(layout,text,-1);
desc = pango_font_description_from_string(font_family);
pango_font_description_set_size (desc, (gint)(font_size * PANGO_SCALE));
/* draw baseline - red */
cairo_set_source_rgb(cr,1.0,0.0,0.0);
- iter = pango_layout_get_iter(layout);
- baseline = pango_layout_iter_get_baseline (iter);
-
+ baseline = pango_layout_get_baseline (layout);
cairo_move_to(cr,logical_rect.x / PANGO_SCALE, baseline / PANGO_SCALE);
cairo_rel_line_to(cr,logical_rect.width / PANGO_SCALE, 0);
cairo_stroke(cr);
char *fnt, *psfnt = NULL;
PangoLayout *layout;
PangoRectangle logical_rect;
- PangoLayoutIter* iter;
cairo_font_options_t* options;
PangoFont *font;
#ifdef ENABLE_PANGO_MARKUP
para->height = (int)(logical_rect.height * textlayout_scale + 1);
/* The y offset from baseline to 0,0 of the bitmap representation */
- iter = pango_layout_get_iter (layout);
- para->yoffset_layout = pango_layout_iter_get_baseline (iter) * textlayout_scale;
+ para->yoffset_layout = pango_layout_get_baseline (layout) * textlayout_scale;
/* The distance below midline for y centering of text strings */
para->yoffset_centerline = 0.10 * para->fontsize;
- pango_layout_iter_free (iter);
if (logical_rect.width == 0)
return FALSE;
return TRUE;