summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstyle.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-01-16 11:33:12 +0100
committerTimm Bäder <mail@baedert.org>2020-01-18 08:49:52 +0100
commit119ebe1d7011e091db92b115178bd22bea372ac9 (patch)
tree2bee5085cd61b2396b122a395366865bcd619a0a /gtk/gtkcssstyle.c
parentdda54b2b8fcdee8a5b6b9f92e311215a6baa53bd (diff)
downloadgtk+-119ebe1d7011e091db92b115178bd22bea372ac9.tar.gz
cssstyle: set font variations in get_pango_font()
Doesn't make sense to set all the css values on the font description in there except for the font variations, so do these here as well.
Diffstat (limited to 'gtk/gtkcssstyle.c')
-rw-r--r--gtk/gtkcssstyle.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkcssstyle.c b/gtk/gtkcssstyle.c
index 7f840b0045..48c241d9ca 100644
--- a/gtk/gtkcssstyle.c
+++ b/gtk/gtkcssstyle.c
@@ -31,7 +31,7 @@
#include "gtkcsscolorvalueprivate.h"
#include "gtkcssshorthandpropertyprivate.h"
#include "gtkcssstringvalueprivate.h"
-#include "gtkcssfontsizevalueprivate.h"
+#include "gtkcssfontvariationsvalueprivate.h"
#include "gtkcssfontfeaturesvalueprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtkcsstransitionprivate.h"
@@ -429,6 +429,7 @@ gtk_css_style_get_pango_font (GtkCssStyle *style)
{
PangoFontDescription *description;
GtkCssValue *v;
+ char *str;
description = pango_font_description_new ();
@@ -466,5 +467,10 @@ gtk_css_style_get_pango_font (GtkCssStyle *style)
v = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_FONT_STRETCH);
pango_font_description_set_stretch (description, _gtk_css_font_stretch_value_get (v));
+ v = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_FONT_VARIATION_SETTINGS);
+ str = gtk_css_font_variations_value_get_variations (v);
+ pango_font_description_set_variations (description, str);
+ g_free (str);
+
return description;
}