From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Non-ASCII in Lucid menus Date: Mon, 14 Mar 2005 21:56:35 +0100 Message-ID: References: <877jkce8lv.fsf-monnier+emacs@gnu.org> <42341EC4.3060405@swipnet.se> <87r7ijbray.fsf-monnier+emacs@gnu.org> <7b2c4ca190cea7657e31ed04f07d3377@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1110835366 29393 80.91.229.2 (14 Mar 2005 21:22:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2005 21:22:46 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 14 22:22:46 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DAwlg-0005ji-TW for ged-emacs-devel@m.gmane.org; Mon, 14 Mar 2005 22:06:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAx1R-0008IB-1p for ged-emacs-devel@m.gmane.org; Mon, 14 Mar 2005 16:22:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DAwwv-0006vj-MH for emacs-devel@gnu.org; Mon, 14 Mar 2005 16:18:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DAwwd-0006rj-6a for emacs-devel@gnu.org; Mon, 14 Mar 2005 16:17:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAwwb-0006q7-6Q for emacs-devel@gnu.org; Mon, 14 Mar 2005 16:17:45 -0500 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DAwcb-0007ga-W0 for emacs-devel@gnu.org; Mon, 14 Mar 2005 15:57:06 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20050314205704.GZDD4482.mxfep02.bredband.com@coolsville.localdomain>; Mon, 14 Mar 2005 21:57:04 +0100 In-Reply-To: Original-To: Stefan Monnier X-Mailer: Apple Mail (2.619.2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34592 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34592 > >> Basically you have to set the default to something else than the >> XtDdefaultFont(Set), and then check if either has been changed. > > But the default is specified as a string (the name of the default > font), > whereas in the code I only have access to mw->menu.font which is > an XFontStruct*. How can I tell if this XFontStruct* corresponds to > the > default or not? You can specify any default you wan't, including another type. So you can say that the default is a XtRFontStruct intead of a XtRString. Then you can set the default to NULL and check against that. When the code sees NULL, you extract the default font with XtConvert by giving it "XtDefaultFont"/"XtDefaultFontSet". > >> But better would be to just have one, as Motif has FontList. > > You mean I could just use ".font" instead of ".fontSet", ... Hmm ... > that's > an idea. I'll have to change the rest of the code that uses > font->max_bounds.asent and things like that, tho. > > BTW, is the HAVE_X_I18N test still necessary? It'd help if we could > just > assume that X_I18N is available. I'm not sure. It is possible some older VMS or other systems still have X11R3 or X11R4 (not exactly sure when I18N became available). X11R5 and X11R6 do have it, which probably accounts for the majority of system nowdays (for example all versions of XFree86 and xorg, and Solaris back to 2.5 at least). > >>>> Also, the default font used for lucid menus will most certainly be >>>> different now. >>> Why? What can I do about it? >> It is just that the default for font and fontset in Xt differs. > > How? It seems to be helvetica in both cases. It depends on your font path. XtDefaultFont, if no font is specified in .Xdefaults or any app-defaults file, is: f = XLoadFont(display, "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-*"); but XtDefaultFontSet is f = XCreateFontSet(display, "-*-*-*-R-*-*-*-120-*-*-*-*,*", (note no ISO8859 in the latter case). For me that gives different matches, for you it may give the same font. Since more locales specify UTF-8 nowdays I think a difference will not be uncommon. Jan D.