From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Non-ASCII in Lucid menus Date: Sun, 13 Mar 2005 08:44:32 -0500 Message-ID: <87r7ijbray.fsf-monnier+emacs@gnu.org> References: <877jkce8lv.fsf-monnier+emacs@gnu.org> <42341EC4.3060405@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110721711 17572 80.91.229.2 (13 Mar 2005 13:48:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2005 13:48:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 13 14:48:31 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DATSG-00081z-Rn for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2005 14:48:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAThl-0006zj-6s for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2005 09:04:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DAThV-0006vb-Q6 for emacs-devel@gnu.org; Sun, 13 Mar 2005 09:04:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DAThU-0006uo-Lv for emacs-devel@gnu.org; Sun, 13 Mar 2005 09:04:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAThU-0006tu-5a for emacs-devel@gnu.org; Sun, 13 Mar 2005 09:04:12 -0500 Original-Received: from [209.226.175.54] (helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DATOT-0004mT-A0 for emacs-devel@gnu.org; Sun, 13 Mar 2005 08:44:33 -0500 Original-Received: from alfajor ([65.92.241.52]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050313134432.QQJN19622.tomts10-srv.bellnexxia.net@alfajor>; Sun, 13 Mar 2005 08:44:32 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 60A53D74A3; Sun, 13 Mar 2005 08:44:32 -0500 (EST) Original-To: "Jan D." In-Reply-To: <42341EC4.3060405@swipnet.se> (Jan D.'s message of "Sun, 13 Mar 2005 12:06:44 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:34541 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34541 >> The patch below makes the Lucid menu use fontsets to draw its text, so that >> it's able to write non-ASCII (the set of chars supported is dependent on the >> locale, and of course on the fonts). >> >> I'm very much an idiot when it comes to X11 programming, xfaces.c, and >> lwlib, so this might be riddled with bugs and misunderstandings, but after >> some trial-and-error this not only works for me, but it even looks sensible >> to me. >> >> Any objection? > It is incompatible in the sense that settings in .Xresources that previously > used > ...*menu*font: ... > now must use > ...*menu*fontSet: > for the lucid menus. This should be mentioned in NEWS. Hmm... good point. Do you happen to know how I could get the expected behavior that "if `font' is set but `fontSet' isn't, use `font'"? > Also, the default font used for lucid menus will most certainly be > different now. Why? What can I do about it? >> PS: The use of XrmPutLineResource in xfaces.c seems amazingly brittle and >> hackish, but that's what the rest of the code uses. > It basically sets a default value. If the user overrides it (with an > X resource or -xrm on the command line) the user setting takes precedence. > Yes, it is a bit hackish. It also seems wrong: user settings on the `menu' face should take precedence, shouldn't they? Stefan PS: A part of the patch I sent was missing: --- src/xmenu.c 12 Mar 2005 23:29:04 -0000 1.281 +++ src/xmenu.c 13 Mar 2005 13:42:40 -0000 @@ -137,6 +137,8 @@ #ifdef USE_GTK /* gtk just uses utf-8. */ # define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str) +#elif defined HAVE_X_I18N +# define ENCODE_MENU_STRING(str) ENCODE_SYSTEM (str) #else # define ENCODE_MENU_STRING(str) string_make_unibyte (str) #endif