From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#688: Arithmetic error at 'About Emacs' when --with-xft=no Date: Mon, 11 Aug 2008 14:55:54 -0400 Message-ID: <87r68vfkjp.fsf@stupidchicken.com> Reply-To: Chong Yidong , 688@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218482397 20971 80.91.229.12 (11 Aug 2008 19:19:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2008 19:19:57 +0000 (UTC) Cc: Peter Tury , 688@emacsbugs.donarmstrong.com To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 11 21:20:48 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KScwX-0000u6-ND for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 21:20:37 +0200 Original-Received: from localhost ([127.0.0.1]:33401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KScvb-0007f3-GQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 15:19:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KScjp-00018Z-CI for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 15:07:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KScjn-00016I-MK for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 15:07:28 -0400 Original-Received: from [199.232.76.173] (port=47987 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KScjn-00015y-Dn for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 15:07:27 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53426) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KScjn-0003Tn-2q for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 15:07:27 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BJ7O4n002578; Mon, 11 Aug 2008 12:07:24 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7BJ582Q001507; Mon, 11 Aug 2008 12:05:08 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 11 Aug 2008 19:05:08 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 688 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 688-submit@emacsbugs.donarmstrong.com id=B688.121848093331246 (code B ref 688); Mon, 11 Aug 2008 19:05:08 +0000 Original-Received: (at 688) by emacsbugs.donarmstrong.com; 11 Aug 2008 18:55:33 +0000 Original-Received: from cyd (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BItTDk031177 for <688@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 11:55:31 -0700 Original-Received: by cyd (Postfix, from userid 1000) id C771857E2B5; Mon, 11 Aug 2008 14:55:54 -0400 (EDT) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Mon, 11 Aug 2008 15:07:28 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19296 Archived-At: > $ ./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?