From 7058e8c18135eddcb10fbb9fc9784c87f61f6953 Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Fri, 6 Jan 2012 16:55:06 +0100 Subject: [PATCH] quartz: Make glyph antialiasing consistent with quartz-font CAIRO_ANTIALIAS_{FAST,GOOD,BEST} were introduced and used in cairo-quartz-font.c by commit 70cd3b473d09e9ad3d803014a904a22639db1a24. Fixes the warnings: cairo-quartz-surface.c: In function '_cairo_quartz_cg_glyphs': cairo-quartz-surface.c:1976: warning: enumeration value 'CAIRO_ANTIALIAS_FAST' not handled in switch cairo-quartz-surface.c:1976: warning: enumeration value 'CAIRO_ANTIALIAS_GOOD' not handled in switch cairo-quartz-surface.c:1976: warning: enumeration value 'CAIRO_ANTIALIAS_BEST' not handled in switch --- src/cairo-quartz-surface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c index 464361865..4a9b851ce 100644 --- a/src/cairo-quartz-surface.c +++ b/src/cairo-quartz-surface.c @@ -1980,6 +1980,7 @@ _cairo_quartz_cg_glyphs (const cairo_compositor_t *compositor, switch (scaled_font->options.antialias) { case CAIRO_ANTIALIAS_SUBPIXEL: + case CAIRO_ANTIALIAS_BEST: CGContextSetShouldAntialias (state.cgMaskContext, TRUE); CGContextSetShouldSmoothFonts (state.cgMaskContext, TRUE); if (CGContextSetAllowsFontSmoothingPtr && @@ -1993,6 +1994,8 @@ _cairo_quartz_cg_glyphs (const cairo_compositor_t *compositor, CGContextSetShouldAntialias (state.cgMaskContext, FALSE); break; case CAIRO_ANTIALIAS_GRAY: + case CAIRO_ANTIALIAS_GOOD: + case CAIRO_ANTIALIAS_FAST: CGContextSetShouldAntialias (state.cgMaskContext, TRUE); CGContextSetShouldSmoothFonts (state.cgMaskContext, FALSE); break;