From fe61e6b3fe5776af3e86f7e4f976205ebc67a449 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 1 Dec 2012 00:18:01 +0100 Subject: [PATCH] settings: Never override some font properties According to the CSS specification, everything but font-size and font-family are defined by CSS. So we don't override them anymore. --- gtk/gtksettings.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 2ba95ad670..819966b6b9 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -1428,23 +1428,12 @@ settings_ensure_style (GtkSettings *settings) font_desc = pango_font_description_from_string (font_name); - /* Unset normal attributes from this description, + /* Unset attributes from this description, * so they do not override theme values */ - if (pango_font_description_get_weight (font_desc) == PANGO_WEIGHT_NORMAL) - pango_font_description_unset_fields (font_desc, - PANGO_FONT_MASK_WEIGHT); - - if (pango_font_description_get_stretch (font_desc) == PANGO_STRETCH_NORMAL) - pango_font_description_unset_fields (font_desc, - PANGO_FONT_MASK_STRETCH); - - if (pango_font_description_get_variant (font_desc) == PANGO_VARIANT_NORMAL) - pango_font_description_unset_fields (font_desc, - PANGO_FONT_MASK_VARIANT); - - if (pango_font_description_get_style (font_desc) == PANGO_STYLE_NORMAL) - pango_font_description_unset_fields (font_desc, - PANGO_FONT_MASK_STYLE); + pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_WEIGHT); + pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_STRETCH); + pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_VARIANT); + pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_STYLE); gtk_style_properties_set (priv->style, 0, "font", font_desc,