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: `set-fontset-font' and ascii characters Date: Tue, 10 Jun 2003 11:16:18 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200306100216.LAA10449@etlken.m17n.org> References: <87he8kutns.fsf@ID-87814.user.dfncis.de> <200305010810.RAA15007@etlken.m17n.org> <87u1cezhlu.fsf@ID-87814.user.dfncis.de> <200305012353.IAA15973@etlken.m17n.org> <200305020105.KAA16075@etlken.m17n.org> <87isstx7le.fsf@ID-87814.user.dfncis.de> <200305030248.LAA17558@etlken.m17n.org> <87bryj8y94.fsf@ID-87814.user.dfncis.de> <200305050833.RAA20149@etlken.m17n.org> <200305070112.KAA22618@etlken.m17n.org> <87isrzb4pt.fsf@ID-87814.user.dfncis.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1055211387 30884 80.91.224.249 (10 Jun 2003 02:16:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 10 Jun 2003 02:16:27 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jun 10 04:16:24 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19PYgI-00081h-00 for ; Tue, 10 Jun 2003 04:16:14 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19PZ0a-0005kM-00 for ; Tue, 10 Jun 2003 04:37:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19PYib-0004kF-Az for emacs-devel@quimby.gnus.org; Mon, 09 Jun 2003 22:18:37 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19PYhw-0004dH-Fb for emacs-devel@gnu.org; Mon, 09 Jun 2003 22:17:56 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19PYhL-00040d-Ql for emacs-devel@gnu.org; Mon, 09 Jun 2003 22:17:20 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19PYgU-0003q5-Em for emacs-devel@gnu.org; Mon, 09 Jun 2003 22:16:26 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h5A2GJu11068; Tue, 10 Jun 2003 11:16:19 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h5A2GI929151; Tue, 10 Jun 2003 11:16:18 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id LAA10449; Tue, 10 Jun 2003 11:16:18 +0900 (JST) Original-To: alkibiades@gmx.de In-reply-to: <87isrzb4pt.fsf@ID-87814.user.dfncis.de> (message from Oliver Scholz on Sun, 25 May 2003 14:17:34 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14982 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14982 I'm very sorry for this late response. In article <87isrzb4pt.fsf@ID-87814.user.dfncis.de>, Oliver Scholz writes: > I changed my mind, while working on the customization > stuff. I started to implement it according to your > previous suggestions. But I realized that specifying a > cons cell as FONTNAME argument to `set-fontset-font' does > not seem to work with non-ASCII charsets either. I tested > it with an Emacs without my modifications: > (create-fontset-from-fontset-spec > "-b&h-lucidatypewriter-medium-r-*-*-14-*-*-*-*-*-fontset-test") > (set-face-font 'default "fontset-test") > (set-fontset-font "fontset-test" 'latin-iso8859-1 > '("misc-fixed" . "iso8859-1")) > Now when I type some umlauts like "=E4=F6=FC" Emacs still > displays them in b&h-lucidatypewriter. > But it works, when I specify a fontname: > (set-fontset-font "fontset-test" 'latin-iso8859-1 > "-misc-fixed-*-iso8859-1") > Am I missing something? If a font name that doesn't conforms to full XLFD is specified, the font name is used as is, otherwise, the family field and registry field are extracted from the font name. In the latter case, we faces the problem of which family to prefer, a face family (b&h-lucidatypewriter) or a fontset family (misc-fixed). Currently, for a character of ASCII and Latin-1, emacs prefers a face family, and for the other chars, emacs prefers a fontset family. It's a very kludgy way, and should be fixed somehow, but currently I don't have a time to think about it and I don't remember now why the code is like that. :-( Please see the code of choose_face_font and try_font_list. In choose_face_font, if you change the call of try_font_list as this: nfonts =3D try_font_list (f, attrs, XCAR (pattern), XCDR (pattern), &font= s, SINGLE_BYTE_CHAR_P (c)); the fontset family should be prefered. Could you please try it? --- Ken'ichi HANDA handa@m17n.org