emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xfont.c,v


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/xfont.c,v
Date: Tue, 27 May 2008 01:43:28 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   08/05/27 01:43:27

Index: xfont.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfont.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- xfont.c     23 May 2008 01:31:32 -0000      1.11
+++ xfont.c     27 May 2008 01:43:27 -0000      1.12
@@ -613,8 +613,14 @@
          for (char2b.byte2 = 33; char2b.byte2 <= 126; char2b.byte2++)
            if ((pcm = xfont_get_pcm (xfont, &char2b)) != NULL)
              width += pcm->width, n++;
+         if (n > 0)
          font->average_width = width / n;
        }
+      if (font->average_width == 0)
+       /* No easy way other than this to get a reasonable
+          average_width.  */
+       font->average_width
+         = (xfont->min_bounds.width + xfont->max_bounds.width) / 2;
     }
 
   BLOCK_INPUT;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]