[cairo-commit] src/cairo-scaled-font.c

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Wed Jul 30 13:05:23 PDT 2008


 src/cairo-scaled-font.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit e1132d434e329c625667f6aff30634522108241e
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Wed Jul 30 13:05:01 2008 -0700

    Make cairo_scaled_font_glyph_extents() unconditionally zero the extents
    
    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.

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-commit mailing list