aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-15 17:40:00 +0800
committerChong Yidong2012-08-15 17:40:00 +0800
commit5bf192caba07684c4fda7a230e4d1afb5ed49664 (patch)
treecfd1e98ac44925f515fa7b236404b44ccb469c59 /src
parent8453bb55239f4cba3bbb37e2dba416382ce07db2 (diff)
downloademacs-5bf192caba07684c4fda7a230e4d1afb5ed49664.tar.gz
emacs-5bf192caba07684c4fda7a230e4d1afb5ed49664.zip
Fix last change to xg_get_font.
* gtkutil.c (xg_get_font): Use pango_units_to_double.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/gtkutil.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dc08d002021..e45b4de48d9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * gtkutil.c (xg_get_font): Use pango_units_to_double.
4
12012-08-15 Chong Yidong <cyd@gnu.org> 52012-08-15 Chong Yidong <cyd@gnu.org>
2 6
3 * gtkutil.c (xg_get_font): Rename from xg_get_font_name. When 7 * 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)
2101 { 2101 {
2102 Lisp_Object args[8]; 2102 Lisp_Object args[8];
2103 const char *name = pango_font_description_get_family (desc); 2103 const char *name = pango_font_description_get_family (desc);
2104 gint size = pango_font_description_get_size (desc);
2104 PangoWeight weight = pango_font_description_get_weight (desc); 2105 PangoWeight weight = pango_font_description_get_weight (desc);
2105 PangoStyle style = pango_font_description_get_style (desc); 2106 PangoStyle style = pango_font_description_get_style (desc);
2106 2107
2107 args[0] = QCname; 2108 args[0] = QCname;
2108 args[1] = build_string (name); 2109 args[1] = build_string (name);
2109 2110
2110 args[2] = QCsize; 2111 args[2] = QCsize;
2111 args[3] = make_float (((double) pango_font_description_get_size (desc)) 2112 args[3] = make_float (pango_units_to_double (size));
2112 / PANGO_SCALE);
2113 2113
2114 args[4] = QCweight; 2114 args[4] = QCweight;
2115 args[5] = XG_WEIGHT_TO_SYMBOL (weight); 2115 args[5] = XG_WEIGHT_TO_SYMBOL (weight);