st-private: Don't round-trip through a font-string

ClutterText can support a PangoFontDescription directly.

https://bugzilla.gnome.org/show_bug.cgi?id=689568
This commit is contained in:
Jasper St. Pierre 2012-12-03 14:06:50 -05:00
parent 6eb05af306
commit ead0286ca6

View File

@ -175,16 +175,13 @@ _st_set_text_from_style (ClutterText *text,
StTextDecoration decoration; StTextDecoration decoration;
PangoAttrList *attribs = NULL; PangoAttrList *attribs = NULL;
const PangoFontDescription *font; const PangoFontDescription *font;
gchar *font_string;
StTextAlign align; StTextAlign align;
st_theme_node_get_foreground_color (theme_node, &color); st_theme_node_get_foreground_color (theme_node, &color);
clutter_text_set_color (text, &color); clutter_text_set_color (text, &color);
font = st_theme_node_get_font (theme_node); font = st_theme_node_get_font (theme_node);
font_string = pango_font_description_to_string (font); clutter_text_set_font_description (text, (PangoFontDescription *) font);
clutter_text_set_font_name (text, font_string);
g_free (font_string);
decoration = st_theme_node_get_text_decoration (theme_node); decoration = st_theme_node_get_text_decoration (theme_node);
if (decoration) if (decoration)