[gnome-shell] st-private: Don't round-trip through a font-string
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-private: Don't round-trip through a font-string
- Date: Mon, 3 Dec 2012 21:01:16 +0000 (UTC)
commit ead0286ca6a9dc382e8a6da52f586661cdfecbfa
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Dec 3 14:06:50 2012 -0500
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
src/st/st-private.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/st/st-private.c b/src/st/st-private.c
index a8ec197..793202b 100644
--- a/src/st/st-private.c
+++ b/src/st/st-private.c
@@ -175,16 +175,13 @@ _st_set_text_from_style (ClutterText *text,
StTextDecoration decoration;
PangoAttrList *attribs = NULL;
const PangoFontDescription *font;
- gchar *font_string;
StTextAlign align;
st_theme_node_get_foreground_color (theme_node, &color);
clutter_text_set_color (text, &color);
font = st_theme_node_get_font (theme_node);
- font_string = pango_font_description_to_string (font);
- clutter_text_set_font_name (text, font_string);
- g_free (font_string);
+ clutter_text_set_font_description (text, (PangoFontDescription *) font);
decoration = st_theme_node_get_text_decoration (theme_node);
if (decoration)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]