From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: set-fontset-font and preferred charset? Date: Wed, 08 Jul 2009 17:48:34 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <20090703.082403.252821682.wl@gnu.org> <20090703.180535.61736917731643487.kasahara@nc.kyushu-u.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1247042936 15687 80.91.229.12 (8 Jul 2009 08:48:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2009 08:48:56 +0000 (UTC) Cc: Yoshiaki Kasahara , emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 08 10:48:49 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MOSpc-0004GO-Ah for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2009 10:48:49 +0200 Original-Received: from localhost ([127.0.0.1]:37436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOSpb-0000yB-Oi for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2009 04:48:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOSpW-0000y3-Gb for emacs-devel@gnu.org; Wed, 08 Jul 2009 04:48:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOSpQ-0000wq-OX for emacs-devel@gnu.org; Wed, 08 Jul 2009 04:48:40 -0400 Original-Received: from [199.232.76.173] (port=59536 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOSpQ-0000wm-Ku for emacs-devel@gnu.org; Wed, 08 Jul 2009 04:48:36 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:51189) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MOSpP-0003YD-OR for emacs-devel@gnu.org; Wed, 08 Jul 2009 04:48:36 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 3444D2C40; Wed, 8 Jul 2009 17:48:34 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by monty-python.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112165 Archived-At: >>>>> On Wed, 08 Jul 2009 17:09:35 +0900, YAMAMOTO Mitsuharu said: >>>>> On Wed, 08 Jul 2009 16:44:50 +0900, Kenichi Handa said: >>> 3. When I open "HELLO" file, some (not all) Japanese characters in >>> other buffers start to be rendered using xft backend. When I open >>> another X frame, the font suddenly change to X font (both old and >>> new frames). >> There was a silly bug in handling a preferred charset in >> fontset_find_font. I've installed a fix for the trunk. > Could you try compiling it with -DENABLE_CHECKING? I got > .../src/fontset.c:618: Emacs fatal error: assertion failed: > VECTORLIKEP((rfont_def)) > with the current trunk code when I tried C-h h. It doesn't happen > with the EMACS_23_1_RC branch. When the assertion failure happened, found_index == -1, charset_matched == -1, and i == 0. The negative found_index is problematic because it is used as an index for AREF. Perhaps the following condition was missing? Index: src/fontset.c =================================================================== RCS file: /sources/emacs/emacs/src/fontset.c,v retrieving revision 1.177 diff -c -p -r1.177 fontset.c *** src/fontset.c 8 Jul 2009 03:49:12 -0000 1.177 --- src/fontset.c 8 Jul 2009 08:41:15 -0000 *************** fontset_find_font (fontset, c, face, id, *** 575,581 **** Lisp_Object font_def; Lisp_Object font_entity, font_object; ! if (i == 0) { /* Try the element matching with the charset ID at first. */ found_index = charset_matched; --- 575,581 ---- Lisp_Object font_def; Lisp_Object font_entity, font_object; ! if (i == 0 && charset_matched >= 0) { /* Try the element matching with the charset ID at first. */ found_index = charset_matched; YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp