changeset 80740:038757cf9434

(x_load_font): Round average width to the nearest integer.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Wed, 20 Aug 2008 09:05:14 +0000
parents 4a7a1ee0a7ce
children 1f63840526a9
files src/macterm.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macterm.c	Mon Aug 18 19:09:23 2008 +0000
+++ b/src/macterm.c	Wed Aug 20 09:05:14 2008 +0000
@@ -8036,7 +8036,7 @@
 	    for (char2b.byte2 = 33; char2b.byte2 <= 126; char2b.byte2++)
 	      if ((pcm = mac_per_char_metric (font, &char2b, 0)) != NULL)
 		width += pcm->width;
-	    fontp->average_width = width / 95;
+	    fontp->average_width = width / 95.0 + 0.5;
 	  }
 	else
 	  fontp->average_width = FONT_WIDTH (font);