diff lwlib/xlwmenu.c @ 3397:6aa26bef0527

[xemacs-hg @ 2006-05-12 19:25:28 by stephent] Stop trashing xftFont resources. <87mzdnxd1j.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Fri, 12 May 2006 19:25:29 +0000
parents 174eb4da74fb
children 6c7605dfcf07
line wrap: on
line diff
--- a/lwlib/xlwmenu.c	Thu May 11 21:50:58 2006 +0000
+++ b/lwlib/xlwmenu.c	Fri May 12 19:25:29 2006 +0000
@@ -93,9 +93,13 @@
   {XtNfont,  XtCFont, XtRFontStruct, sizeof(XFontStruct *),
      offset(menu.font), XtRString, (XtPointer) "XtDefaultFont"},
 #ifdef USE_XFT_MENUBARS
-  {XtNxftFont,  XtCXftFont, XtRString, sizeof (String),
-   offset(menu.renderFontSpec), 
+  {XtNfcFontName,  XtCFcFontName, XtRString, sizeof (String),
+   offset(menu.fcFontName), 
    XtRString, (XtPointer) "Helvetica-12:bold"},
+  /* #### This needs to be fixed to give a proper type and converter for
+     XftFonts.  See also xlwtabs.c. */
+  {XtNxftFont, XtCXftFont, XtRPointer, sizeof(XtPointer),
+	offset(menu.renderFont), XtRPointer, (XtPointer) NULL },
 #endif
 # ifdef USE_XFONTSET
   /* #### Consider using the same method as for Motif; see the comment in
@@ -3241,7 +3245,7 @@
      conversion function
   */
   mw->menu.renderFont =
-    xft_open_font_by_name (XtDisplay (mw), mw->menu.renderFontSpec);
+    xft_open_font_by_name (XtDisplay (mw), mw->menu.fcFontName);
 #endif
 
   make_drawing_gcs     (mw);