diff options
Diffstat (limited to 'src/ftcrfont.c')
-rw-r--r-- | src/ftcrfont.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ftcrfont.c b/src/ftcrfont.c index d60c1202b9d..fc4e6dae873 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -246,6 +246,7 @@ ftcrfont_draw (struct glyph_string *s, cairo_t *cr; cairo_glyph_t *glyphs; cairo_surface_t *surface; + cairo_surface_type_t surface_type; int len = to - from; int i; @@ -282,7 +283,12 @@ ftcrfont_draw (struct glyph_string *s, FT_Activate_Size (ftcrfont_info->ft_size_draw); cairo_show_glyphs (cr, glyphs, len); surface = cairo_get_target (cr); - if (cairo_surface_get_type (surface) != CAIRO_SURFACE_TYPE_XLIB) + /* XXX: It used to be necessary to flush when exporting. It might + be the case that this is no longer necessary. */ + surface_type = cairo_surface_get_type (surface); + if (surface_type != CAIRO_SURFACE_TYPE_XLIB + && (surface_type != CAIRO_SURFACE_TYPE_IMAGE + || cairo_image_surface_get_format (surface) != CAIRO_FORMAT_ARGB32)) cairo_surface_flush (surface); x_end_cr_clip (f); |