diff options
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | src/cairo-ft-font.c | 10 | ||||
-rw-r--r-- | test/Makefile.am | 1 | ||||
-rw-r--r-- | test/text-antialias-gray-ref.png | bin | 723 -> 727 bytes | |||
-rw-r--r-- | test/text-antialias-gray.c | 1 | ||||
-rw-r--r-- | test/text-antialias-none-ref.png | bin | 277 -> 278 bytes | |||
-rw-r--r-- | test/text-antialias-none.c | 1 | ||||
-rw-r--r-- | test/text-antialias-subpixel-ref.png | bin | 1079 -> 1081 bytes | |||
-rw-r--r-- | test/text-antialias-subpixel.c | 4 |
9 files changed, 22 insertions, 10 deletions
@@ -1,3 +1,18 @@ +2005-08-23 Owen Taylor <otaylor@redhat.com> + + * src/cairo-ft-font.c (_cairo_ft_scaled_font_show_glyphs): + when creating the temporary mask, do glyph ADD mask, not + (glyph IN source) ADD mask. Set the mask as having component + alpha when it's 4-channel. + + * test/text-antialias-subpixel.c test/Makefile.am: No longer XFAIL. + + * test/text-antialias-gray.c test/text-antialias-subpixel.c + * test/text-antialias-none.c (draw): Don't turn off metrics + hinting, it doesn't make sense. + + * test/text-antialias-*-ref.png: Update. + 2005-08-23 Carl Worth <cworth@cworth.org> * CODING_STYLE: Revise the description of indentation and tabs to diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 8db223ed..45322e7e 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -2024,11 +2024,10 @@ _cairo_ft_scaled_font_show_glyphs (void *abstract_font, _cairo_pattern_init_for_surface (&glyph_pattern, &(entries[i]->image->base)); - status = _cairo_surface_composite (CAIRO_OPERATOR_ADD, pattern, - &glyph_pattern.base, + status = _cairo_surface_composite (CAIRO_OPERATOR_ADD, &glyph_pattern.base, + NULL, mask, - x + entries[i]->size.x, - y + entries[i]->size.y, + 0, 0, 0, 0, x + entries[i]->size.x - dest_x, y + entries[i]->size.y - dest_y, @@ -2041,6 +2040,9 @@ _cairo_ft_scaled_font_show_glyphs (void *abstract_font, goto CLEANUP_MASK; } + if (mask_format == CAIRO_FORMAT_ARGB32) + pixman_image_set_component_alpha (((cairo_image_surface_t *)mask)->pixman_image, TRUE); + _cairo_pattern_init_for_surface (&mask_pattern, mask); status = _cairo_surface_composite (operator, pattern, &mask_pattern.base, diff --git a/test/Makefile.am b/test/Makefile.am index 7ceb6385..bc75894e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -141,7 +141,6 @@ a8-mask \ filter-nearest-offset \ pixman-rotate \ self-intersecting \ -text-antialias-subpixel \ text-rotate check_PROGRAMS = $(TESTS) diff --git a/test/text-antialias-gray-ref.png b/test/text-antialias-gray-ref.png Binary files differindex 1367ea9e..1cab79a9 100644 --- a/test/text-antialias-gray-ref.png +++ b/test/text-antialias-gray-ref.png diff --git a/test/text-antialias-gray.c b/test/text-antialias-gray.c index caa260ad..96044f50 100644 --- a/test/text-antialias-gray.c +++ b/test/text-antialias-gray.c @@ -50,7 +50,6 @@ draw (cairo_t *cr, int width, int height) font_options = cairo_font_options_create (); cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE); - cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_OFF); cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_GRAY); cairo_set_font_options (cr, font_options); diff --git a/test/text-antialias-none-ref.png b/test/text-antialias-none-ref.png Binary files differindex c0281938..141a9727 100644 --- a/test/text-antialias-none-ref.png +++ b/test/text-antialias-none-ref.png diff --git a/test/text-antialias-none.c b/test/text-antialias-none.c index 411de0d9..50b48262 100644 --- a/test/text-antialias-none.c +++ b/test/text-antialias-none.c @@ -50,7 +50,6 @@ draw (cairo_t *cr, int width, int height) font_options = cairo_font_options_create (); cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE); - cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_OFF); cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_NONE); cairo_set_font_options (cr, font_options); diff --git a/test/text-antialias-subpixel-ref.png b/test/text-antialias-subpixel-ref.png Binary files differindex eb02b896..88c6e062 100644 --- a/test/text-antialias-subpixel-ref.png +++ b/test/text-antialias-subpixel-ref.png diff --git a/test/text-antialias-subpixel.c b/test/text-antialias-subpixel.c index 7c151a5c..ead958d1 100644 --- a/test/text-antialias-subpixel.c +++ b/test/text-antialias-subpixel.c @@ -57,7 +57,6 @@ draw (cairo_t *cr, int width, int height) font_options = cairo_font_options_create (); cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE); - cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_OFF); cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_SUBPIXEL); cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_RGB); cairo_set_font_options (cr, font_options); @@ -80,6 +79,5 @@ draw (cairo_t *cr, int width, int height) int main (void) { - return cairo_test_expect_failure (&test, draw, - "Subpixel-antialiased text is not working with the image backend."); + return cairo_test (&test, draw); } |