[fontconfig] Set FC_RGBA_NONE on the pattern if we don't want subpixel.

otherwise, it looks like "I don't care" and fontconfig configuration is
allowed to decide to turn subpixel on.  This fixes the bug that subpixel
colors where showing up in fallback images in PS/PDF/SVG backends, observed
in the test fallback-resolution.
This commit is contained in:
Behdad Esfahbod 2006-08-08 06:08:53 -04:00
parent 1f854fcf32
commit 89fc22de87

View file

@ -2187,6 +2187,8 @@ cairo_ft_font_options_substitute (const cairo_font_options_t *options,
if (FcPatternGet (pattern, FC_ANTIALIAS, 0, &v) == FcResultNoMatch)
{
FcPatternAddBool (pattern, FC_ANTIALIAS, options->antialias != CAIRO_ANTIALIAS_NONE);
if (options->antialias != CAIRO_ANTIALIAS_SUBPIXEL)
FcPatternAddInteger (pattern, FC_RGBA, FC_RGBA_NONE);
}
}