From: YAMAMOTO Mitsuharu Date: Wed, 20 Aug 2008 09:05:14 +0000 (+0000) Subject: (x_load_font): Round average width to the nearest integer. X-Git-Tag: emacs-pretest-22.2.91~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0169e2e18a401a5be744a452f102ae2790efa99d;p=emacs.git (x_load_font): Round average width to the nearest integer. --- diff --git a/src/macterm.c b/src/macterm.c index 8a0b2d61846..dee084065a1 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -8036,7 +8036,7 @@ x_load_font (f, fontname, size) 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);