From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: mituharu@math.s.chiba-u.ac.jp Newsgroups: gmane.emacs.devel Subject: Re: Cairo font selection for Ethiopic Date: Sat, 22 Jun 2019 18:32:46 +0900 Message-ID: <1a8cc6af2800282718fd8a56459fe98f.squirrel@weber.math.s.chiba-u.ac.jp> References: <87pnn8cawu.fsf@rub.de> <87zhmbicrk.fsf@gmx.net> <7b3affad6a618d027a13322a7c9f0a51.squirrel@weber.math.s.chiba-u.ac.jp> <87v9wzi3de.fsf@gmx.net> <87a7earntw.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-2022-jp Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="106476"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: SquirrelMail/1.4.22-5.el6 Cc: emacs-devel@gnu.org To: "Stephen Berman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 22 11:34:04 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hecPL-000RVq-Kh for ged-emacs-devel@m.gmane.org; Sat, 22 Jun 2019 11:34:03 +0200 Original-Received: from localhost ([::1]:39632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hecPK-0005Kv-0K for ged-emacs-devel@m.gmane.org; Sat, 22 Jun 2019 05:34:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59175) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hecOA-0005Kg-Lz for emacs-devel@gnu.org; Sat, 22 Jun 2019 05:32:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hecO9-0002eG-NG for emacs-devel@gnu.org; Sat, 22 Jun 2019 05:32:50 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:55090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hecO7-0002ZV-Kh for emacs-devel@gnu.org; Sat, 22 Jun 2019 05:32:48 -0400 Original-Received: from weber.math.s.chiba-u.ac.jp (weber [192.168.32.4]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 0118DF08E1; Sat, 22 Jun 2019 18:32:45 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Original-Received: from 223.219.8.219 (SquirrelMail authenticated user mituharu) by weber.math.s.chiba-u.ac.jp with HTTP; Sat, 22 Jun 2019 18:32:46 +0900 In-Reply-To: <87a7earntw.fsf@gmx.net> X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238030 Archived-At: >> Thanks. Please get the latest master and show the results of the >> following on both builds: >> >> 1. $ emacs -Q -D & >> 2. (setq font-log nil) C-j >> 3. (insert 4768) C-j >> 4. M-x font-show-log RET > > Attached. Thanks. Could you try the patch below? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 0cc40b4c944..f15e79334ac 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -25,6 +25,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "xterm.h" #include "blockinput.h" +#include "charset.h" #include "composite.h" #include "font.h" #include "ftfont.h" @@ -308,6 +309,17 @@ ftcrfont_has_char (Lisp_Object font, int c) if (FONT_ENTITY_P (font)) return ftfont_has_char (font, c); + struct charset *cs =3D NULL; + + if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qja) + && charset_jisx0208 >=3D 0) + cs =3D CHARSET_FROM_ID (charset_jisx0208); + else if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qko) + && charset_ksc5601 >=3D 0) + cs =3D CHARSET_FROM_ID (charset_ksc5601); + if (cs) + return (ENCODE_CHAR (cs, c) !=3D CHARSET_INVALID_CODE (cs)); + return -1; }