From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: TUTORIAL.bg and windows-1251 Date: Mon, 19 Jan 2004 09:34:05 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200401190034.JAA24455@etlken.m17n.org> References: <3FB52552.6090302@fmi.uni-sofia.bg> <200311170721.QAA11735@etlken.m17n.org> <3FBA3F81.4010602@fmi.uni-sofia.bg> <200311242355.IAA24563@etlken.m17n.org> <3FC45367.6070504@fmi.uni-sofia.bg> <200311260747.QAA27236@etlken.m17n.org> <3FC464C2.7010504@fmi.uni-sofia.bg> <200311261317.WAA27673@etlken.m17n.org> <200312030834.RAA03004@etlken.m17n.org> <3FCF60C9.8060009@fmi.uni-sofia.bg> <200312042328.IAA06933@etlken.m17n.org> <3FF2E5DF.4090906@fmi.uni-sofia.bg> <200401050414.NAA00014@etlken.m17n.org> <3FFC3249.3010501@fmi.uni-sofia.bg> <200401072358.IAA05239@etlken.m17n.org> <3FFED268.3020908@fmi.uni-sofia.bg> <200401130407.NAA13705@etlken.m17n.org> <40052B24.2030803@fmi.uni-sofia.bg> <200401141210.VAA16210@etlken.m17n.org> <40098D96.90205@fmi.uni-sofia.bg> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1074473192 27897 80.91.224.253 (19 Jan 2004 00:46:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Jan 2004 00:46:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jan 19 01:46:21 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AiNYb-0005W6-00 for ; Mon, 19 Jan 2004 01:46:21 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AiNYb-00019e-00 for ; Mon, 19 Jan 2004 01:46:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiNXi-0008SI-AG for emacs-devel@quimby.gnus.org; Sun, 18 Jan 2004 19:45:26 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AiNV9-000700-MH for emacs-devel@gnu.org; Sun, 18 Jan 2004 19:42:47 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AiNUA-0006UC-0X for emacs-devel@gnu.org; Sun, 18 Jan 2004 19:42:18 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiNU8-0006Sb-Pk for emacs-devel@gnu.org; Sun, 18 Jan 2004 19:41:45 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/3.7W-20010518204228) with ESMTP id i0J0Y6h24258; Mon, 19 Jan 2004 09:34:06 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/3.7W-20010823150639) with ESMTP id i0J0Y6c22839; Mon, 19 Jan 2004 09:34:06 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA24455; Mon, 19 Jan 2004 09:34:05 +0900 (JST) Original-To: ogi@fmi.uni-sofia.bg In-reply-to: <40098D96.90205@fmi.uni-sofia.bg> (message from Ognyan Kulev on Sat, 17 Jan 2004 21:31:34 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19257 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19257 In article <40098D96.90205@fmi.uni-sofia.bg>, Ognyan Kulev writes: > The patch I've send you raises priority in two functions. Actually, > only raising it in fontset_font_pattern gives effect. So when run with > "emacs -q" and cyrillic character is being displayed, is it expected > that "FONTSET (fontset, c)" fails in function fontset_font_pattern, or > "fontset_id_valid_p (id)" is false? One of these must fail somewhat in > order lookup_overriding_fontspec to be used. Thank you!! That question makes me realize what was wrong in my previous code. As I installed a fix, please try again with the latest CVS code. In my environment, X resource "Font" is set. Thus, Emacs creates a fontset "fontset-startup" from that font which doesn't specify any font for Cyrillic. Thus, FONTSET_REF (fontset, c) returns nil in my case. But, if X resource "Font" is not set (I think it's your case), Emacs uses the default fontset. So, FONTSET_REF (fontset, c) returns ISO10646-1 font for Cyrillic. The fix is apperant as below. It makes the logic for font finding the same as fontset_ref_via_base. --- Ken'ichi HANDA handa@m17n.org Index: fontset.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/fontset.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -c -r1.83 -r1.84 cvs server: conflicting specifications of output style *** fontset.c 7 Jan 2004 00:21:53 -0000 1.83 --- fontset.c 19 Jan 2004 00:22:03 -0000 1.84 *************** *** 598,604 **** fontset = FONTSET_FROM_ID (id); xassert (!BASE_FONTSET_P (fontset)); fontset = FONTSET_BASE (fontset); ! elt = FONTSET_REF (fontset, c); } if (NILP (elt)) { --- 598,605 ---- fontset = FONTSET_FROM_ID (id); xassert (!BASE_FONTSET_P (fontset)); fontset = FONTSET_BASE (fontset); ! if (! EQ (fontset, Vdefault_fontset)) ! elt = FONTSET_REF (fontset, c); } if (NILP (elt)) {