cairo/bugzilla-104365.patch

64 lines
1.8 KiB
Diff

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.10/src/cairo-ft-font.c
+++ cairo-1.4.10/src/cairo-ft-font.c
@@ -2321,20 +2321,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) {
@@ -2358,19 +2354,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;
@@ -2391,6 +2385,7 @@
break;
}
+ FcPatternDel (pattern, FC_HINT_STYLE);
FcPatternAddInteger (pattern, FC_HINT_STYLE, hint_style);
}
#endif