diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-09-18 11:28:05 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-09-18 14:27:06 -0400 |
commit | 92398bb1bbae85ead39e9579b09f86649df7aeb1 (patch) | |
tree | c49708ad993b11439ea38b9979f42c0a284a5a58 /gtk/gtkcssstylepropertyimpl.c | |
parent | b91f3ce3312ba23041ee8844b446599bbf62f5e4 (diff) | |
download | gtk+-92398bb1bbae85ead39e9579b09f86649df7aeb1.tar.gz |
css: implement font-variant as a shorthand
Drop the current css2-style font-variant property and
replace it with a shorthand as specified in the css3 fonts
module. Currently, we fully support the font-variant-ligatures,
font-variant-position, font-variant-caps, font-variant-numeric
and font-variant-east-asian subproperties. font-variant-alternatives
is only partially supported.
Diffstat (limited to 'gtk/gtkcssstylepropertyimpl.c')
-rw-r--r-- | gtk/gtkcssstylepropertyimpl.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c index a81a5a2507..adc7ea35ef 100644 --- a/gtk/gtkcssstylepropertyimpl.c +++ b/gtk/gtkcssstylepropertyimpl.c @@ -260,27 +260,6 @@ font_weight_query (GtkCssStyleProperty *property, } static GtkCssValue * -font_variant_parse (GtkCssStyleProperty *property, - GtkCssParser *parser) -{ - GtkCssValue *value = _gtk_css_font_variant_value_try_parse (parser); - - if (value == NULL) - _gtk_css_parser_error (parser, "unknown value for property"); - - return value; -} - -static void -font_variant_query (GtkCssStyleProperty *property, - const GtkCssValue *css_value, - GValue *value) -{ - g_value_init (value, PANGO_TYPE_VARIANT); - g_value_set_enum (value, _gtk_css_font_variant_value_get (css_value)); -} - -static GtkCssValue * font_stretch_parse (GtkCssStyleProperty *property, GtkCssParser *parser) { @@ -1238,14 +1217,6 @@ _gtk_css_style_property_init_properties (void) font_style_parse, font_style_query, _gtk_css_font_style_value_new (PANGO_STYLE_NORMAL)); - gtk_css_style_property_register ("font-variant", - GTK_CSS_PROPERTY_FONT_VARIANT, - PANGO_TYPE_VARIANT, - GTK_STYLE_PROPERTY_INHERIT, - GTK_CSS_AFFECTS_FONT | GTK_CSS_AFFECTS_TEXT, - font_variant_parse, - font_variant_query, - _gtk_css_font_variant_value_new (PANGO_VARIANT_NORMAL)); gtk_css_style_property_register ("font-weight", GTK_CSS_PROPERTY_FONT_WEIGHT, PANGO_TYPE_WEIGHT, |