summaryrefslogtreecommitdiff
path: root/src/cairo-win32-font.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-win32-font.c')
-rw-r--r--src/cairo-win32-font.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 216c7513..7a86cc8c 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -1437,10 +1437,6 @@ _cairo_win32_scaled_font_show_glyphs (void *abstract_font,
_invert_argb32_mask (tmp_surface);
mask_surface = &tmp_surface->base;
-
- /* XXX: Hacky, should expose this in cairo_image_surface */
- pixman_image_set_component_alpha (((cairo_image_surface_t *)tmp_surface->image)->pixman_image, TRUE);
-
} else {
mask_surface = _compute_a8_mask (tmp_surface);
cairo_surface_destroy (&tmp_surface->base);
@@ -1454,6 +1450,10 @@ _cairo_win32_scaled_font_show_glyphs (void *abstract_font,
* destination
*/
_cairo_pattern_init_for_surface (&mask, mask_surface);
+ cairo_surface_destroy (mask_surface);
+
+ if (scaled_font->quality == CLEARTYPE_QUALITY)
+ mask.base.has_component_alpha = TRUE;
status = _cairo_surface_composite (op, pattern,
&mask.base,
@@ -1466,8 +1466,6 @@ _cairo_win32_scaled_font_show_glyphs (void *abstract_font,
_cairo_pattern_fini (&mask.base);
- cairo_surface_destroy (mask_surface);
-
return status;
}
}