diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-08-08 06:04:01 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-08-08 06:09:23 -0400 |
commit | 1f854fcf32e6909e4c52779f093132d8c749c285 (patch) | |
tree | 1dbf7e8112f0c3911e69627353e1a8df23ff442c /src | |
parent | 2d483e0785b18a8bb51f5b1c1a0267029f68a64a (diff) |
Set antialiasing to gray in default font options for PS/PDF/SVG
This only affects the image fallback in those backends, and avoids getting
colored pixels there if user's fontconfig configuration turns subpixel on.
This doesn't quite fix that problem though, more changes are needed/coming.
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-pdf-surface.c | 1 | ||||
-rw-r--r-- | src/cairo-ps-surface.c | 1 | ||||
-rw-r--r-- | src/cairo-svg-surface.c | 7 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index b546fcf0..1749804b 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -1463,6 +1463,7 @@ _cairo_pdf_surface_get_font_options (void *abstract_surface, cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE); cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_OFF); + cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_GRAY); } static cairo_pdf_resource_t diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index fd58a9e8..10c9e6a1 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -1789,6 +1789,7 @@ _cairo_ps_surface_get_font_options (void *abstract_surface, cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE); cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_OFF); + cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_GRAY); } static cairo_int_status_t diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c index 448ddfed..988f98bb 100644 --- a/src/cairo-svg-surface.c +++ b/src/cairo-svg-surface.c @@ -1637,10 +1637,11 @@ static void _cairo_svg_surface_get_font_options (void *abstract_surface, cairo_font_options_t *options) { - _cairo_font_options_init_default (options); + _cairo_font_options_init_default (options); - cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE); - cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_OFF); + cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE); + cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_OFF); + cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_GRAY); } static const cairo_surface_backend_t cairo_svg_surface_backend = { |