Stephen,
Thanks for this patch. It will go into 21.1.12.
- vin
>>>>> On Wed, 2 Aug 2000 18:36:04 +0900 (JST), "Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> said:
Stephen> When configured with --with-xfs, XEmacs ignores *menubar*Font
Stephen> resources, and demands *menubar*FontSet resources. (There may be
Stephen> others like this but I didn't see any in a quick look.) This patch
Stephen> documents this and notes a possible fix in lwlib/xlwmenu.c.
Stephen> For 21.1 and 21.2. Generated against 21.2 (updated today); applies
Stephen> with some fuzz and offsets to 21.1 (also updated today).
Stephen> root ChangeLog:
Stephen> 2000-08-02 Stephen J. Turnbull <stephen(a)xemacs.org>
Stephen> * etc/Emacs.ad: Document usage of FontSet resource for menubar.
Stephen> lwlib/ChangeLog:
Stephen> 2000-08-02 Stephen J. Turnbull <stephen(a)xemacs.org>
Stephen> * xlwmenu.c: Comment suggesting treatment of X Font Set
Stephen> resources like Motif FontLists. Make comment on Motif
Stephen> algorithm for setting FontList match code.
Stephen> man/ChangeLog:
Stephen> 2000-08-02 Stephen J. Turnbull <stephen(a)xemacs.org>
Stephen> * xemacs/custom.texi: Document usage of FontSet resource for menubar.
Stephen> patch:
Stephen> Index: lwlib/xlwmenu.c
Stephen> ===================================================================
Stephen> RCS file: /usr/CVSroot/XEmacs/xemacs/lwlib/xlwmenu.c,v
Stephen> retrieving revision 1.25.2.11
Stephen> diff -u -r1.25.2.11 xlwmenu.c
Stephen> --- xlwmenu.c 2000/07/09 06:32:13 1.25.2.11
Stephen> +++ xlwmenu.c 2000/08/02 09:24:43
Stephen> @@ -88,6 +88,8 @@
Stephen> {XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
Stephen> offset(menu.font), XtRString, (XtPointer) "XtDefaultFont"},
Stephen> # ifdef USE_XFONTSET
Stephen> + /* #### Consider using the same method as for Motif; see the comment in
Stephen> + XlwMenuInitialize(). */
Stephen> {XtNfontSet, XtCFontSet, XtRFontSet, sizeof(XFontSet),
Stephen> offset(menu.font_set), XtRString, (XtPointer) "XtDefaultFontSet"},
Stephen> # endif
Stephen> @@ -3017,10 +3019,12 @@
Stephen> gray_width, gray_height, 1, 0, 1);
Stephen> #ifdef NEED_MOTIF
Stephen> + /* #### Even if it's a kludge!!!, we should consider doing the same for
Stephen> + X Font Sets. */
Stephen> /* The menu.font_list slot came from the *fontList resource (Motif standard.)
Stephen> The menu.font_list_2 slot came from the *font resource, for backward
Stephen> compatibility with older versions of this code, and consistency with the
Stephen> - rest of emacs. If both font and fontList are specified, we use font.
Stephen> + rest of emacs. If both font and fontList are specified, we use fontList.
Stephen> If only one is specified, we use that. If neither are specified, we
Stephen> use the "fallback" value. What a kludge!!!
Stephen> Index: etc/Emacs.ad
Stephen> ===================================================================
Stephen> RCS file: /usr/CVSroot/XEmacs/xemacs/etc/Emacs.ad,v
Stephen> retrieving revision 1.8.2.2
Stephen> diff -u -r1.8.2.2 Emacs.ad
Stephen> --- Emacs.ad 2000/05/03 14:46:58 1.8.2.2
Stephen> +++ Emacs.ad 2000/08/02 09:24:44
Stephen> @@ -188,6 +188,13 @@
Stephen> ! Note that the menubar resources do not use the `face' syntax, since they
Stephen> ! are X toolkit widgets and thus outside the domain of XEmacs proper.
Stephen> !
Stephen> +! When X Font Sets are enabled with ./configure --with-xfs (eg, for
Stephen> +! multilingual menubars and XIM), some .font resources are ignored in favor
Stephen> +! of .fontSet resources. This examples is for Japanese menubars):
Stephen> +!
Stephen> +! *menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
Stephen> +! -*-*-*-*-*-*-*-120-*-jisx0208.1983-0
Stephen> +!
Stephen> *menubar*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
Stephen> *popup*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
Stephen> Index: man/xemacs/custom.texi
Stephen> ===================================================================
Stephen> RCS file: /usr/CVSroot/XEmacs/xemacs/man/xemacs/custom.texi,v
Stephen> retrieving revision 1.7.2.10
Stephen> diff -u -r1.7.2.10 custom.texi
Stephen> --- custom.texi 2000/07/19 09:47:59 1.7.2.10
Stephen> +++ custom.texi 2000/08/02 09:24:45
Stephen> @@ -2493,12 +2493,26 @@
Stephen> colors: It uses whatever resources are appropriate to the type of widget
Stephen> which is used to implement it.
Stephen> -If Emacs was compiled to use only the Motif-lookalike menu widgets, then one
Stephen> -way to specify the font of the menubar would be
Stephen> +If Emacs was compiled to use only the Lucid Motif-lookalike menu widgets,
Stephen> +then one way to specify the font of the menubar would be
Stephen> @example
Stephen> Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
Stephen> @end example
Stephen> +
Stephen> +If both the Lucid Motif-lookalike menu widgets and X Font Sets are
Stephen> +configured to allow multilingual menubars, then one uses
Stephen> +
Stephen> +@example
Stephen> +*menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
Stephen> + -*-*-*-*-*-*-*-120-*-jisx0208.1983-0
Stephen> +@end example
Stephen> +
Stephen> +That would specify fonts for a Japanese menubar. Specifying only one
Stephen> +XLFD is acceptable; specifying more than one for a given registry
Stephen> +(language) is also allowed. When X Font Sets are configured, some .font
Stephen> +resources (eg, menubars) are ignored in favor of the corresponding
Stephen> +.fontSet resources.
Stephen> If the Motif library is being used, then one would have to use
Stephen> --
Stephen> University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Stephen> Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
Stephen> _________________ _________________ _________________ _________________
Stephen> What are those straight lines for? "XEmacs rules."