emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set-fontset-font and preferred charset?


From: YAMAMOTO Mitsuharu
Subject: Re: set-fontset-font and preferred charset?
Date: Wed, 08 Jul 2009 17:48:34 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Wed, 08 Jul 2009 17:09:35 +0900, YAMAMOTO Mitsuharu <address@hidden> 
>>>>> said:

>>>>> On Wed, 08 Jul 2009 16:44:50 +0900, Kenichi Handa <address@hidden> 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
                                address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]