changeset 110825:069bd354cdbb

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:56:45 +0900
parents 56cf47a21830 (current diff) bf3b8d29e992 (diff)
children 57882cb996a9
files
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Sep 28 15:39:22 2010 +0200
+++ b/src/ChangeLog	Wed Sep 29 09:56:45 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-28  Michael Albinus  <michael.albinus@gmx.de>
 
 	* dbusbind.c (syms_of_dbusbind): Use putenv instead of setenv, it
--- a/src/xfont.c	Tue Sep 28 15:39:22 2010 +0200
+++ b/src/xfont.c	Wed Sep 29 09:56:45 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