From: Dmitry Antipov Date: Wed, 15 Aug 2012 09:40:00 +0000 (+0800) Subject: Fix last change to xg_get_font. X-Git-Tag: emacs-24.2.90~661 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5bf192caba07684c4fda7a230e4d1afb5ed49664;p=emacs.git Fix last change to xg_get_font. * gtkutil.c (xg_get_font): Use pango_units_to_double. --- diff --git a/src/ChangeLog b/src/ChangeLog index dc08d002021..e45b4de48d9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-08-15 Dmitry Antipov + + * gtkutil.c (xg_get_font): Use pango_units_to_double. + 2012-08-15 Chong Yidong * gtkutil.c (xg_get_font): Rename from xg_get_font_name. When diff --git a/src/gtkutil.c b/src/gtkutil.c index 2c9a1377dca..194a1044952 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2101,15 +2101,15 @@ xg_get_font (FRAME_PTR f, const char *default_name) { Lisp_Object args[8]; const char *name = pango_font_description_get_family (desc); + gint size = pango_font_description_get_size (desc); PangoWeight weight = pango_font_description_get_weight (desc); - PangoStyle style = pango_font_description_get_style (desc); + PangoStyle style = pango_font_description_get_style (desc); args[0] = QCname; args[1] = build_string (name); args[2] = QCsize; - args[3] = make_float (((double) pango_font_description_get_size (desc)) - / PANGO_SCALE); + args[3] = make_float (pango_units_to_double (size)); args[4] = QCweight; args[5] = XG_WEIGHT_TO_SYMBOL (weight);