[cairo-commit] Changes to 'master'

Carl Worth cworth at kemper.freedesktop.org
Thu Feb 16 09:04:07 PST 2006


 src/cairo-ft-font.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

New commits:
diff-tree 0152bd3a562442853ab930eaea316c08b34f6ba6 (from f12aa15466844b67ec22544c4feee17389ba4aeb)
Author: Carl Worth <cworth at raht.cworth.org>
Date:   Thu Feb 16 09:02:29 2006 -0800

    Allow _get_bitmap_surface to work for 0x0 glyphs, (fix for bug #5734).
    
    Patch from: Behdad Esfahbod <freedesktop at behdad.org>
    Reviewed by: Carl Worth <cworth at cworth.org>

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index da1adaa..97b14b2 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -715,12 +715,7 @@ _get_bitmap_surface (FT_Bitmap		     *bi
     width = bitmap->width;
     height = bitmap->rows;
     
-    if (width * height == 0) {
-	if (own_buffer && bitmap->buffer)
-	    free (bitmap->buffer);
-	
-	*surface = NULL;
-    } else {
+    {
 	switch (bitmap->pixel_mode) {
 	case FT_PIXEL_MODE_MONO:
 	    stride = (((width + 31) & ~31) >> 3);
@@ -1074,7 +1069,9 @@ _render_glyph_bitmap (FT_Face		      fac
     if (error)
 	return CAIRO_STATUS_NO_MEMORY;
 
-    _get_bitmap_surface (&glyphslot->bitmap, FALSE, font_options, surface);
+    status = _get_bitmap_surface (&glyphslot->bitmap, FALSE, font_options, surface);
+    if (status)
+	return status;
     
     /*
      * Note: the font's coordinate system is upside down from ours, so the


More information about the cairo-commit mailing list