all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#688: Arithmetic error at 'About Emacs' when --with-xft=no
@ 2008-08-11 18:55 Chong Yidong
  2008-08-11 21:02 ` Peter Tury
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chong Yidong @ 2008-08-11 18:55 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: Peter Tury, 688

> $ ./configure --with-gif=no --with-tiff=no --with-xft=no
> $ make bootstrap
>
> Now it seems I could get rid of antialiasing, but `about-emacs' fails:
> I get "Arithmetic error" after the copyright line drawn:

The arithmetic error was due to a failure of the redisplay engine to
calculate tab widths correctly when the current font's space character
has a width of zero.  I've fixed this, but the issue of why the font has
zero space width remains unsolved.

As a result, the tab widths in `M-x about-emacs' are now zero, which is
an obvious regression from Emacs 22.

The problem at hand is the following code in ftfont_open
(ftfont.c:1077):

    {
      int n;

      font->min_width = font->average_width = font->space_width = 0;
      for (i = 32, n = 0; i < 127; i++)
	if (FT_Load_Char (ft_face, i, FT_LOAD_DEFAULT) != 0)
	  {
	    int this_width = ft_face->glyph->metrics.horiAdvance >> 6;

	    if (this_width > 0
		&& (! font->min_width || font->min_width > this_width))
	      font->min_width = this_width;
	    if (i == 32)
	      font->space_width = this_width;
	    font->average_width += this_width;
	    n++;
	  }

      if (n > 0)
	font->average_width /= n;
    }

For some reason, this gives zero.  Handa-san, do you have any insight?






^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <b5accf970808101354x3921689dnc204016d563ebd4f@mail.gmail.com>]

end of thread, other threads:[~2008-09-03 20:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-11 18:55 bug#688: Arithmetic error at 'About Emacs' when --with-xft=no Chong Yidong
2008-08-11 21:02 ` Peter Tury
2008-08-11 21:04 ` Peter Tury
2008-08-11 21:05 ` Peter Tury
2008-09-03 20:23   ` Peter Tury
     [not found] <b5accf970808101354x3921689dnc204016d563ebd4f@mail.gmail.com>
2008-08-10 21:00 ` Peter Tury
2008-08-11  1:05   ` OFFICE ZERO

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.