changeset 110821:b3326b910a0c

xfont.c (xfont_open): Fix setting of font->average_width from :avgwidth property (Bug#7123).
author Kenichi Handa <handa@m17n.org>
date Wed, 29 Sep 2010 09:52:03 +0900
parents cdab39f69698
children bf3b8d29e992
files src/ChangeLog src/xfont.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Sep 27 14:00:46 2010 +0900
+++ b/src/ChangeLog	Wed Sep 29 09:52:03 2010 +0900
@@ -1,3 +1,8 @@
+2010-09-29  Kenichi Handa  <handa@m17n.org>
+
+	* xfont.c (xfont_open): Fix setting of font->average_width from
+	:avgwidth property (Bug#7123).
+
 2010-09-26  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xgselect.c (xg_select): Clear file descriptors not set from
--- a/src/xfont.c	Mon Sep 27 14:00:46 2010 +0900
+++ b/src/xfont.c	Wed Sep 29 09:52:03 2010 +0900
@@ -861,7 +861,7 @@
 
       val = Ffont_get (font_object, QCavgwidth);
       if (INTEGERP (val))
-	font->average_width = XINT (val);
+	font->average_width = XINT (val) / 10;
       if (font->average_width < 0)
 	font->average_width = - font->average_width;
       if (font->average_width == 0