summaryrefslogtreecommitdiff
path: root/gtk/gtkfontbutton.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2011-09-12 21:26:21 +0200
committerChristian Persch <chpe@gnome.org>2011-09-13 12:55:34 +0200
commit71c16bad3353202ca55fe15a092b3bcf7085097e (patch)
tree893e1a7f4dfec8c7cdb8a12e07d2aa6636d7a32c /gtk/gtkfontbutton.c
parentd82895127e5424589cbc68de279b36d1d3375823 (diff)
downloadgtk+-71c16bad3353202ca55fe15a092b3bcf7085097e.tar.gz
Take font size also from the font description
Diffstat (limited to 'gtk/gtkfontbutton.c')
-rw-r--r--gtk/gtkfontbutton.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index d10de4c0f2..5e65fb619a 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -354,6 +354,11 @@ gtk_font_button_take_font_desc (GtkFontButton *font_button,
else
priv->font_desc = pango_font_description_from_string (_("Sans 12"));
+ if (pango_font_description_get_size_is_absolute (priv->font_desc))
+ priv->font_size = pango_font_description_get_size (priv->font_desc);
+ else
+ priv->font_size = pango_font_description_get_size (priv->font_desc) / PANGO_SCALE;
+
gtk_font_button_update_font_data (font_button);
gtk_font_button_update_font_info (font_button);