diff lwlib/xlwtabs.c @ 3685:382b11fa8866

[xemacs-hg @ 2006-11-17 02:50:22 by stephent] Fix breakage in xftFont resource for tabs and menubar. <877ixuiy0n.fsf@uwakimon.sk.tsukuba.ac.jp>
author stephent
date Fri, 17 Nov 2006 02:50:32 +0000
parents 6aa26bef0527
children 03f6627a2e09
line wrap: on
line diff
--- a/lwlib/xlwtabs.c	Thu Nov 16 22:51:09 2006 +0000
+++ b/lwlib/xlwtabs.c	Fri Nov 17 02:50:32 2006 +0000
@@ -153,11 +153,11 @@
   /* #### Maybe use "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1" here?
      or XtDefaultFont? */
   {XtNfcFontName, XtCFcFontName, XtRString, sizeof(String),
-	offset(fcFontName), XtRString, (XtPointer) "AirCut-16" },
+	offset(fcFontName), XtRString, (XtPointer) NULL },
   /* #### This needs to be fixed to give a proper type and converter for
      XftFonts.  See also xlwmenu.c. */
-  {XtNxftFont, XtCXftFont, XtRPointer, sizeof(XtPointer),
-	offset(renderFont), XtRPointer, (XtPointer) NULL },
+  {XtNxftFont, XtCXftFont, XtRString, sizeof(String),
+	offset(xftFontName), XtRString, (XtPointer) "Helvetica-12" },
 #endif
   {XtNinternalWidth, XtCWidth, XtRDimension, sizeof(Dimension),
 	offset(internalWidth), XtRImmediate, (XtPointer)4 },
@@ -479,10 +479,12 @@
     newTw->tabs.tab_height = 2 * newTw->tabs.internalHeight + SHADWID ;
 
 #ifdef USE_XFT_TABS
+    /* #### kludge for name change */
+    if (!newTw->tabs.fcFontName)
+      newTw->tabs.fcFontName = newTw->tabs.xftFontName;
     /* must get font here
-       to do this right, we should add a new Xt Resource type +
-       conversion function
-    */
+       #### to do this right, we should add a new Xt Resource type +
+       conversion function */
     newTw->tabs.renderFont =
       xft_open_font_by_name (XtDisplay ((Widget) newTw),
 			     newTw->tabs.fcFontName);