Source code

Revision control

Copy as Markdown

Other Tools

commit a7563a3fb5ca846d8487048e7ff5219f0ea0c069
Author: Jonathan Kew <jkew@mozilla.com>
Date: Tue May 5 16:24:23 2026 +0100
Bug 2036587 - Don't set the component-alpha flag when generating glyph surfaces.
Subsequent compositing doesn't work correctly when this is set,
and we end up with glyph images missing from print/pdf output.
diff --git a/src/win32/cairo-dwrite-font.cpp b/src/win32/cairo-dwrite-font.cpp
index ae3b012..f6853a3
--- a/src/win32/cairo-dwrite-font.cpp
+++ b/src/win32/cairo-dwrite-font.cpp
@@ -1614,12 +1614,6 @@ _cairo_dwrite_scaled_font_init_glyph_surface (cairo_dwrite_scaled_font_t *scaled
if (cairo_surface_status (surface))
return CAIRO_INT_STATUS_UNSUPPORTED;
- // Tell pixman that it should use component alpha blending when the surface is
- // used as a source
- pixman_image_set_component_alpha (((cairo_image_surface_t*)surface)->pixman_image, TRUE);
-
- // That's probably not needed right after creation
- cairo_surface_flush (surface);
unsigned char *surface_data = cairo_image_surface_get_data (surface);
int surface_stride = cairo_image_surface_get_stride (surface);
@@ -1829,9 +1823,6 @@ _cairo_dwrite_scaled_font_init_glyph_surface (cairo_dwrite_scaled_font_t *scaled
}
}
- // That's probably not needed. cairoft-font.c doesn't do that
- cairo_surface_mark_dirty (surface);
-
if (!render_is_direct) {
free (dwrite_data);
}