From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#12823: Invalid font name Date: Wed, 28 Nov 2012 18:20:02 +0900 Message-ID: <87pq2yxewt.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354094549 10893 80.91.229.3 (28 Nov 2012 09:22:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2012 09:22:29 +0000 (UTC) Cc: 12823@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 28 10:22:41 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tddqm-0001AF-Rs for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2012 10:22:36 +0100 Original-Received: from localhost ([::1]:51336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tddqb-00076y-JQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2012 04:22:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TddqV-00076I-E1 for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 04:22:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TddqL-0005Fk-BR for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 04:22:19 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TddqL-0005Ff-7t for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 04:22:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TddsA-0004O3-9y for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 04:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kenichi Handa Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Nov 2012 09:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12823 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12823-submit@debbugs.gnu.org id=B12823.135409462416836 (code B ref 12823); Wed, 28 Nov 2012 09:24:02 +0000 Original-Received: (at 12823) by debbugs.gnu.org; 28 Nov 2012 09:23:44 +0000 Original-Received: from localhost ([127.0.0.1]:42600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tddrr-0004NV-JR for submit@debbugs.gnu.org; Wed, 28 Nov 2012 04:23:43 -0500 Original-Received: from fencepost.gnu.org ([208.118.235.10]:56465) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tddrp-0004NO-Ky for 12823@debbugs.gnu.org; Wed, 28 Nov 2012 04:23:42 -0500 Original-Received: from 253.240.accsnet.ne.jp ([202.220.240.253]:55635 helo=mongkok) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Tddpz-0005gQ-Cp; Wed, 28 Nov 2012 04:21:48 -0500 In-Reply-To: (message from Stefan Monnier on Tue, 27 Nov 2012 10:10:36 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:67555 Archived-At: In article , Stefan Monnier writes: > > For fixing this bug, I've just installed this change to > > trunk (rev. 111019). > Thanks, that looks good. > > But, as the bug had caused crashing, > > it may be better to apply the change to emacs-24. > I didn't see any crashes, only assertion violations. > FWIW Debian's emacs23 and emacs24 binaries don't crash here, so > I suspect that the bug is luckily "solved" by accident somewhere. You wrote; > After letting xft use bitmap fonts on my system, Emacs started to crash, > which was tracked to an invalid font name that was used > without checking. > So I added > if (NILP (spec)) > signal_error ("Invalid font name", ascii_font); > to x_set_font in revno 110704, but this only prevents the crash, > replacing it with an error. Do you mean this workaround as "assertion violations"? I think it just hides the deeper bug. Here, SPEC is a return value of font_spec_from_name (fontset_ascii (fontset)), and font_spec_from_name should never fail with that kind of argument. > I'm still wondering about those names that include -, such as > "semi-condensed" that we have in font.c: > - IIUC, they can never be useful for XFLD font names. Are they useful > for other font name formats supported by Emacs? Examples? > - If they are useful sometimes, is it important to have the dashed > name first in the list? As I wrote before, the table is also used to get a face attribute value from a font spec, and, for instance, face attribute :width allows the symbol `semi-condensed'. If we don't have that name first in the list, we must have another index specifying which name is a valid face attribute value, or must have another tables that map numeric values of font spec to face attribute values. --- Kenichi Handa handa@gnu.org