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: thai font problem Date: Mon, 1 Sep 2003 20:19:33 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200309011119.UAA06650@etlken.m17n.org> References: <20030827.110253.39152163.wl@gnu.org> <200308291240.VAA29414@etlken.m17n.org> <20030831.091915.59468909.wl@gnu.org> 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 1062447640 17806 80.91.224.253 (1 Sep 2003 20:20:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Sep 2003 20:20:40 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Sep 01 22:20:38 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19tvAE-0000jO-00 for ; Mon, 01 Sep 2003 22:20:38 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19tvJ4-0004uH-00 for ; Mon, 01 Sep 2003 22:29:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19tv0V-0002qk-4N for emacs-devel@quimby.gnus.org; Mon, 01 Sep 2003 16:10:35 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19tmqd-0004PF-9N for emacs-devel@gnu.org; Mon, 01 Sep 2003 07:27:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19tmkH-0002ok-8k for emacs-devel@gnu.org; Mon, 01 Sep 2003 07:21:18 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19tmig-0002I3-69; Mon, 01 Sep 2003 07:19:38 -0400 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 h81BJXu06799; Mon, 1 Sep 2003 20:19:33 +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.6/3.7W-20010823150639) with ESMTP id h81BJX922600; Mon, 1 Sep 2003 20:19:33 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id UAA06650; Mon, 1 Sep 2003 20:19:33 +0900 (JST) Original-To: wl@gnu.org In-reply-to: <20030831.091915.59468909.wl@gnu.org> (message from Werner LEMBERG on Sun, 31 Aug 2003 09:19:15 +0200 (CEST)) 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.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:16218 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16218 In article <20030831.091915.59468909.wl@gnu.org>, Werner LEMBERG writes: >> Could you try this? >> >> (set-fontset-font "fontset-default" 'thai-tis620 '("*" . "TIS620")) >> (clear-face-cache t) > This works, thanks. Will a similar fix be applied to the CVS? Here we have a fundamental problem of the current font selection mechanism. If a font family is specified (by face or by fontset), Emacs prefers a font of the specifed family even if the font size is worse than the other font of different family. And a family specification of fontset has higher priority than that of face. Before my change, the default fontset specifies the family "*" for most non-ASCII characters. So, Emacs finds the best matching font while ignoring face family for non-ASCII characters (because any family matches "*"). This setting was good until a while ago because we didn't have that many family variations for non-ASCII characters. But, such a setting is just to cheat the font-selection routine. And, in these days, for instance, we have many families of Japanese fonts. In this environment, people want to control font-selection by face family even for Japanese. So I changed the default fontset not to specify a family for non-ASCII characters. Now what happend to you is this. As your default font is -etl-fixed-..., the default face has family "etl-fixed". And you surely have a Thai font of that family. So, that font is selected even if the size is worse than that 24-dot Thai font of family "misc-fixed". For a workaround, I installed the above change. But, I think it's basically not the right thing to set "*" family in the default fontset. To solve the Thai font problem, we need fine-tuning mechanism in font selection. For instance, if the size of a selected font is very different from the requested size, try to select another font by ignoring a family. But, how to decide that the font size is "very different"? Don't we have to suppress such a mechanism for ASCII font? I'm not sure. Unfortunetely, I don't have a time to design a better font selection mechanism for the moment. --- Ken'ichi HANDA handa@m17n.org