Fri Apr 28 18:46:08 CEST 2006 - mfabian@suse.de - Bugzilla #104365: delete fontconfig pattern elements before trying to add them if the intention is to override default settings. https://bugs.freedesktop.org/show_bug.cgi?id=10413 ================================================================================ --- cairo-1.4.0/src/cairo-ft-font.c +++ cairo-1.4.0/src/cairo-ft-font.c @@ -2232,20 +2232,16 @@ if (options->antialias != CAIRO_ANTIALIAS_DEFAULT) { - if (FcPatternGet (pattern, FC_ANTIALIAS, 0, &v) == FcResultNoMatch) - { + FcPatternDel (pattern, FC_ANTIALIAS); FcPatternAddBool (pattern, FC_ANTIALIAS, options->antialias != CAIRO_ANTIALIAS_NONE); if (options->antialias != CAIRO_ANTIALIAS_SUBPIXEL) { FcPatternDel (pattern, FC_RGBA); FcPatternAddInteger (pattern, FC_RGBA, FC_RGBA_NONE); } - } } if (options->antialias != CAIRO_ANTIALIAS_DEFAULT) { - if (FcPatternGet (pattern, FC_RGBA, 0, &v) == FcResultNoMatch) - { int rgba; if (options->antialias == CAIRO_ANTIALIAS_SUBPIXEL) { @@ -2269,19 +2265,17 @@ rgba = FC_RGBA_NONE; } + FcPatternDel (pattern, FC_RGBA); FcPatternAddInteger (pattern, FC_RGBA, rgba); - } } if (options->hint_style != CAIRO_HINT_STYLE_DEFAULT) { - if (FcPatternGet (pattern, FC_HINTING, 0, &v) == FcResultNoMatch) - { + + FcPatternDel (pattern, FC_HINTING); FcPatternAddBool (pattern, FC_HINTING, options->hint_style != CAIRO_HINT_STYLE_NONE); - } #ifdef FC_HINT_STYLE - if (FcPatternGet (pattern, FC_HINT_STYLE, 0, &v) == FcResultNoMatch) { int hint_style; @@ -2302,6 +2296,7 @@ break; } + FcPatternDel (pattern, FC_HINT_STYLE); FcPatternAddInteger (pattern, FC_HINT_STYLE, hint_style); } #endif