summaryrefslogtreecommitdiff
path: root/gtk/gtkcssshorthandpropertyimpl.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-09-17 16:37:26 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-09-17 16:52:55 -0400
commit737cae8e10be162b6931e4ef34574290d574dabc (patch)
tree4485d822804e57e87c1c0dd2714d2fbd37b58297 /gtk/gtkcssshorthandpropertyimpl.c
parentf714500b8de913669da006e8b933a2ffe4e483e6 (diff)
downloadgtk+-737cae8e10be162b6931e4ef34574290d574dabc.tar.gz
Drop support for pango syntax in css
This has been deprecated for a while, so it should go away for GTK+ 4.
Diffstat (limited to 'gtk/gtkcssshorthandpropertyimpl.c')
-rw-r--r--gtk/gtkcssshorthandpropertyimpl.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c
index 252ed2fa4b..748fb8b1c5 100644
--- a/gtk/gtkcssshorthandpropertyimpl.c
+++ b/gtk/gtkcssshorthandpropertyimpl.c
@@ -417,54 +417,6 @@ parse_border (GtkCssShorthandProperty *shorthand,
}
static gboolean
-parse_font_with_pango (GtkCssShorthandProperty *shorthand,
- GtkCssValue **values,
- GtkCssParser *parser)
-{
- PangoFontDescription *desc;
- guint mask;
- char *str;
-
- str = _gtk_css_parser_read_value (parser);
- if (str == NULL)
- return FALSE;
-
- desc = pango_font_description_from_string (str);
- g_free (str);
-
- mask = pango_font_description_get_set_fields (desc);
-
- if (mask & PANGO_FONT_MASK_FAMILY)
- {
- values[0] = _gtk_css_array_value_new (_gtk_css_string_value_new (pango_font_description_get_family (desc)));
- }
- if (mask & PANGO_FONT_MASK_STYLE)
- {
- values[1] = _gtk_css_font_style_value_new (pango_font_description_get_style (desc));
- }
- if (mask & PANGO_FONT_MASK_VARIANT)
- {
- values[2] = _gtk_css_font_variant_value_new (pango_font_description_get_variant (desc));
- }
- if (mask & PANGO_FONT_MASK_WEIGHT)
- {
- values[3] = _gtk_css_font_weight_value_new (pango_font_description_get_weight (desc));
- }
- if (mask & PANGO_FONT_MASK_STRETCH)
- {
- values[4] = _gtk_css_font_stretch_value_new (pango_font_description_get_stretch (desc));
- }
- if (mask & PANGO_FONT_MASK_SIZE)
- {
- values[5] = _gtk_css_number_value_new ((double) pango_font_description_get_size (desc) / PANGO_SCALE, GTK_CSS_PX);
- }
-
- pango_font_description_free (desc);
-
- return TRUE;
-}
-
-static gboolean
parse_font (GtkCssShorthandProperty *shorthand,
GtkCssValue **values,
GtkCssParser *parser)
@@ -503,18 +455,6 @@ parse_font (GtkCssShorthandProperty *shorthand,
values[5] = gtk_css_font_size_value_parse (parser);
- if (values[1] == NULL && values[2] == NULL && values[3] == NULL &&
- values[4] == NULL && values[5] == NULL)
- {
- if (parse_font_with_pango (shorthand, values, parser))
- {
- _gtk_css_parser_error_full (parser,
- GTK_CSS_PROVIDER_ERROR_DEPRECATED,
- "Using Pango syntax for the font: style property is deprecated; please use CSS syntax");
- return TRUE;
- }
- }
-
values[0] = gtk_css_font_family_value_parse (parser);
return values[0] != NULL && values[5] != NULL;