From 927657a432fadf219e7fdf057e4493658192a963 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 16 Aug 2006 02:01:17 +0000 Subject: Return if none of logical_rect or ink_rect is non-NULL. 2006-08-15 Behdad Esfahbod * pango/pango-layout.c (pango_layout_run_get_extents): * pango/glyphstring.c (pango_glyph_string_extents_range): Return if none of logical_rect or ink_rect is non-NULL. * pango/pango-item.h (PangoAnalysis): Add new member centered_baseline which if set, makes item rendered such that ascent == descent. * pango/pango-context.c (itemize_state_init), (itemize_state_add_character): * pango/pango-renderer.c (pango_renderer_draw_layout_line): Implement centered_baseline. * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics): When adjusting ascent/descent for vertical fonts, adjust strikethrough and underline position too. * docs/tmpl/main.sgml: Document new struct member. --- pango/glyphstring.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pango/glyphstring.c') diff --git a/pango/glyphstring.c b/pango/glyphstring.c index 353fa2a4..2247d034 100644 --- a/pango/glyphstring.c +++ b/pango/glyphstring.c @@ -166,6 +166,9 @@ pango_glyph_string_extents_range (PangoGlyphString *glyphs, */ g_return_if_fail (start <= end); + if (G_UNLIKELY (!ink_rect && !logical_rect)) + return; + if (ink_rect) { ink_rect->x = 0; -- cgit v1.2.1