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: Fri, 2 May 2003 08:53:17 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305012353.IAA15973@etlken.m17n.org> References: <87he8kutns.fsf@ID-87814.user.dfncis.de> <200305010810.RAA15007@etlken.m17n.org> <87u1cezhlu.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=US-ASCII X-Trace: main.gmane.org 1051833445 27179 80.91.224.249 (1 May 2003 23:57:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 1 May 2003 23:57:25 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 02 01:57: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 19BNvY-00074F-00 for ; Fri, 02 May 2003 01:57:24 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19BNwp-0003xR-00 for ; Fri, 02 May 2003 01:58:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19BNuL-0005v0-05 for emacs-devel@quimby.gnus.org; Thu, 01 May 2003 19:56:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19BNsI-0004qK-00 for emacs-devel@gnu.org; Thu, 01 May 2003 19:54:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19BNs2-0004mR-00 for emacs-devel@gnu.org; Thu, 01 May 2003 19:53:49 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19BNrf-0004SA-00 for emacs-devel@gnu.org; Thu, 01 May 2003 19:53:23 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h41NrIo13444; Fri, 2 May 2003 08:53:18 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h41NrIA09575; Fri, 2 May 2003 08:53:18 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id IAA15973; Fri, 2 May 2003 08:53:17 +0900 (JST) Original-To: alkibiades@gmx.de In-reply-to: (message from Oliver Scholz on Thu, 01 May 2003 22:01:14 +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:13604 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13604 In article , Oliver Scholz writes: > Uh, sorry, I was confused. Upon further reading I realize now that it > is wrong to include xterm.h. Somehow I thought that xterm.c contains > only generic functions. > Currently fontset.c applies the function x_set_font by means of the > variable set_frame_fontset_func, which is set in xfns.c, macfns.c and > w32fns.c to x_set_font. So, would it be a proper way to use > x_new_font_set_force by doing something similar with a new variable, > say force_frame_fontset_func? Yes. I tried to make fontset.c independent on a window system. By the way, I re-consider the problem of chaning the fontset of the default face. You wrote: > Now, if an ASCII font was changed, Fset_fontset_font checks all frames > whether FONTSET is their frame fontset and forces a resizing of all > frames that have. This is done by the new function > x_new_fontset_force, which is like x_new_fontset, except that it does > its works even if new fontset = old fontset. (This is done by > factoring out a new function x_set_fontset_internal out of x_set_fontset.) Isn't it easier to call Finternal_set_lisp_face_attribute on all faces that has FONTSET? That function handles the default face correctly. Vface_new_frame_defaults holds all named faces, the format is ((FACE . LFACE) ...). LFACE[LFACE_FONT] gives the font or fontset name of FACE. This may work also in the case of changing non-ASCII font. If this method works, the resulting code becomes simpler. We can get rid of these functions: clear_fontset_elements, free_realized_multibyte_face --- Ken'ichi HANDA handa@m17n.org