summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@home.(none)>2006-03-15 10:15:47 -0500
committerBehdad Esfahbod <behdad@home.(none)>2006-03-15 10:15:47 -0500
commitaf0cbe2aed0b19613b90e171a2c252e8c8327efd (patch)
tree1981e136a3037afffe1eb8a12f9691ed5bb920f8
parent6da5947efa6fbd0da85352974c2eb762bd42ffa7 (diff)
Allow _get_bitmap_surface to work for 0x0 glyphs, (fix for bug #5734).
Patch from: Behdad Esfahbod <freedesktop@behdad.org> Reviewed by: Carl Worth <cworth@cworth.org> (cherry picked from 0152bd3a562442853ab930eaea316c08b34f6ba6 commit)
-rw-r--r--src/cairo-ft-font.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index bc56dca03..ef8e55042 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -720,12 +720,7 @@ _get_bitmap_surface (cairo_image_glyph_cache_entry_t *val,
width = bitmap->width;
height = bitmap->rows;
- if (width * height == 0) {
- if (own_buffer && bitmap->buffer)
- free (bitmap->buffer);
-
- val->image = NULL;
- } else {
+ {
switch (bitmap->pixel_mode) {
case FT_PIXEL_MODE_MONO:
stride = (((width + 31) & ~31) >> 3);
@@ -1080,7 +1075,9 @@ _render_glyph_bitmap (FT_Face face,
if (error)
return CAIRO_STATUS_NO_MEMORY;
- _get_bitmap_surface (val, &glyphslot->bitmap, FALSE, FC_RGBA_NONE);
+ status = _get_bitmap_surface (val, &glyphslot->bitmap, FALSE, FC_RGBA_NONE);
+ if (status)
+ return status;
val->size.x = glyphslot->bitmap_left;
val->size.y = - glyphslot->bitmap_top;