diff options
author | Alberto Ruiz <aruiz@gnome.org> | 2011-07-28 00:21:40 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-08-15 18:57:56 -0400 |
commit | e79842ce94a9f0b5d42e4420f414908681fcba63 (patch) | |
tree | fac1b58868a95a28131927590ad93b732a594152 /gtk/gtkfontchooser.c | |
parent | d33088a8051e18838f20a74d6041e5e1e886fe30 (diff) | |
download | gtk+-e79842ce94a9f0b5d42e4420f414908681fcba63.tar.gz |
GtkFontChooser: get_font_name did not return the font size
Diffstat (limited to 'gtk/gtkfontchooser.c')
-rw-r--r-- | gtk/gtkfontchooser.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkfontchooser.c b/gtk/gtkfontchooser.c index 1442b67471..3a6eab1233 100644 --- a/gtk/gtkfontchooser.c +++ b/gtk/gtkfontchooser.c @@ -1045,14 +1045,20 @@ gchar * gtk_font_chooser_get_font_name (GtkFontChooser *fontchooser) { gchar *font_name; + gchar *font_desc_name; PangoFontDescription *desc; if (!fontchooser->priv->face) return NULL; + + desc = pango_font_face_describe (fontchooser->priv->face); - font_name = pango_font_description_to_string (desc); + font_desc_name = pango_font_description_to_string (desc); pango_font_description_free (desc); + + font_name = g_strdup_printf ("%s %d", font_desc_name, fontchooser->priv->size / PANGO_SCALE); + g_free (font_desc_name); return font_name; } |