mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 03:28:09 +02:00
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>
This commit is contained in:
parent
f12aa15466
commit
0152bd3a56
1 changed files with 4 additions and 7 deletions
|
|
@ -715,12 +715,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
|
|||
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 face,
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue