[cairo] [PATCH] fix text-zero-len failure
Jeff Muizelaar
jeff at infidigm.net
Fri Jul 25 09:00:02 PDT 2008
Attached patch fixes the text-zero-len failure.
-Jeff
-------------- next part --------------
Make cairo_scaled_font_glyph_extents() unconditionally zero the extents
From: Jeff Muizelaar <jmuizelaar at mozilla.com>
This makes cairo_scaled_font_glyph_extents() match a similar pattern of
initialization in cairo_glyph_extents(). It also fixes the 'text-zero-len' test
that was broken by 676b221326cacdd205c225bba8ac43378b4abb81.
---
src/cairo-scaled-font.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 3e5e252..3fe3332 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -1166,15 +1166,15 @@ cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
cairo_bool_t visible = FALSE;
cairo_scaled_glyph_t *scaled_glyph = NULL;
- if (scaled_font->status) {
- extents->x_bearing = 0.0;
- extents->y_bearing = 0.0;
- extents->width = 0.0;
- extents->height = 0.0;
- extents->x_advance = 0.0;
- extents->y_advance = 0.0;
+ extents->x_bearing = 0.0;
+ extents->y_bearing = 0.0;
+ extents->width = 0.0;
+ extents->height = 0.0;
+ extents->x_advance = 0.0;
+ extents->y_advance = 0.0;
+
+ if (scaled_font->status)
return;
- }
if (num_glyphs == 0)
return;
More information about the cairo
mailing list