diff options
-rw-r--r-- | src/cairo-ft-font.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 3bba59e47..3d2ff2700 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -1182,7 +1182,9 @@ _get_bitmap_surface (FT_Bitmap *bitmap, case FT_PIXEL_MODE_LCD: case FT_PIXEL_MODE_LCD_V: case FT_PIXEL_MODE_GRAY: - if (font_options->antialias != CAIRO_ANTIALIAS_SUBPIXEL) { + if (font_options->antialias != CAIRO_ANTIALIAS_SUBPIXEL || + bitmap->pixel_mode == FT_PIXEL_MODE_GRAY) + { stride = bitmap->pitch; if (own_buffer) { data = bitmap->buffer; @@ -1196,12 +1198,6 @@ _get_bitmap_surface (FT_Bitmap *bitmap, format = CAIRO_FORMAT_A8; } else { - /* if we get there, the data from the source bitmap - * really comes from _fill_xrender_bitmap, and is - * made of 32-bit ARGB or ABGR values */ - assert (own_buffer != 0); - assert (bitmap->pixel_mode != FT_PIXEL_MODE_GRAY); - data = bitmap->buffer; stride = bitmap->pitch; format = CAIRO_FORMAT_ARGB32; |