[gtk+/font-chooser] GtkFontChooser: get_font_name did not return the font size
- From: Alberto Ruiz <aruiz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/font-chooser] GtkFontChooser: get_font_name did not return the font size
- Date: Wed, 27 Jul 2011 23:22:39 +0000 (UTC)
commit 6eb2f4e693f8db4f0c8c1d79c167704ebcda4f80
Author: Alberto Ruiz <aruiz gnome org>
Date: Thu Jul 28 00:21:40 2011 +0100
GtkFontChooser: get_font_name did not return the font size
gtk/gtkfontchooser.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfontchooser.c b/gtk/gtkfontchooser.c
index 1442b67..3a6eab1 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]