From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12823: Invalid font name Date: Wed, 28 Nov 2012 09:57:16 -0500 Message-ID: References: <87pq2yxewt.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354114706 32012 80.91.229.3 (28 Nov 2012 14:58:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2012 14:58:26 +0000 (UTC) Cc: 12823@debbugs.gnu.org To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 28 15:58:37 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 1Tdj5s-0004tk-Tw for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2012 15:58:33 +0100 Original-Received: from localhost ([::1]:53794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tdj5h-00031M-TW for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2012 09:58:21 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tdj5Z-000319-SI for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 09:58:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tdj5V-0001kI-3C for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 09:58:13 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tdj5U-0001jh-W5 for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 09:58:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tdj7K-0006RK-Qg for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 10:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Nov 2012 15:00: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.135411475624677 (code B ref 12823); Wed, 28 Nov 2012 15:00:02 +0000 Original-Received: (at 12823) by debbugs.gnu.org; 28 Nov 2012 14:59:16 +0000 Original-Received: from localhost ([127.0.0.1]:43700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tdj6Z-0006Px-NX for submit@debbugs.gnu.org; Wed, 28 Nov 2012 09:59:16 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:47923) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tdj6W-0006Po-OA for 12823@debbugs.gnu.org; Wed, 28 Nov 2012 09:59:13 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id qASEvGsa018616; Wed, 28 Nov 2012 09:57:16 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 6A4A8B4278; Wed, 28 Nov 2012 09:57:16 -0500 (EST) In-Reply-To: <87pq2yxewt.fsf@gnu.org> (Kenichi Handa's message of "Wed, 28 Nov 2012 18:20:02 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4416=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4416> : streams <867347> : uri <1279727> 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:67560 Archived-At: >> 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"? No, I mean that without this NILP check, subsequent code "crashed" with an assertion violation (due to assuming that `spec' is a string, IIRC). > 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. Right. >> 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'. Sorry, I must have missed that message. So we can't just remove those dashed names. Fine. > 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. My understanding is that this issue is only related to whether or not `semi-condensed' is in the list, but is unrelated to whether it comes before or after `semicondensed' in the list. Stefan