diff -pruN rox-1.2.2/ROX-Filer/src/Makefile.in rox-1.2.2-xft-20060514/ROX-Filer/src/Makefile.in
--- rox-1.2.2/ROX-Filer/src/Makefile.in	2002-02-12 21:49:46.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/Makefile.in	2006-04-28 23:28:58.000000000 +0900
@@ -12,8 +12,8 @@ LIBS = @LIBS@ @GDK_PIXBUF_LIBS@ `${XML_C
 
 CC = @CC@
 
-CFLAGS = @CFLAGS@ @LFS_CFLAGS@ `${GTK_CFLAGS}` `${XML_CONFIG} --cflags`
-LDFLAGS = @LDFLAGS@ @LFS_LDFLAGS@ `${GTK_LIBS}` ${LIBS} @LFS_LIBS@
+CFLAGS = @CFLAGS@ @LFS_CFLAGS@ `${GTK_CFLAGS}` @XFT_CFLAGS@ `${XML_CONFIG} --cflags`
+LDFLAGS = @LDFLAGS@ @LFS_LDFLAGS@ `${GTK_LIBS}` @XFT_LIBS@ ${LIBS} @LFS_LIBS@
 EXEC = ${PLATFORM_DIR}/${PROG}
 
 ############ Things to change for different programs
diff -pruN rox-1.2.2/ROX-Filer/src/config.h.in rox-1.2.2-xft-20060514/ROX-Filer/src/config.h.in
--- rox-1.2.2/ROX-Filer/src/config.h.in	2002-01-21 01:42:29.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/config.h.in	2006-04-28 23:35:28.000000000 +0900
@@ -19,6 +19,8 @@
 #undef GTK2
 #undef LARGE_FILE_SUPPORT
 
+#undef ENABLE_XFT
+
 #undef HAVE_REGEX_H
 
 #include "my_vfs.h"
diff -pruN rox-1.2.2/ROX-Filer/src/configure.in rox-1.2.2-xft-20060514/ROX-Filer/src/configure.in
--- rox-1.2.2/ROX-Filer/src/configure.in	2002-07-16 20:42:37.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/configure.in	2006-04-28 23:34:51.000000000 +0900
@@ -110,6 +110,26 @@ AC_SUBST(GTK_LIBS)
 AC_SUBST(GDK_PIXBUF_CFLAGS)
 AC_SUBST(GDK_PIXBUF_LIBS)
 
+dnl Check Xft
+rox_CHECK_EXISTS([$PKG_CONFIG],
+		   [You need to install the pkgconfig package before compiling])
+AC_MSG_CHECKING(for Xft library)
+XFT_CFLAGS="`$PKG_CONFIG xft --cflags`"
+XFT_LIBS="`$PKG_CONFIG xft --libs`"
+[
+if [ -n "$XFT_LIBS" ]; then
+]
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(ENABLE_XFT)    
+else
+  XFT_CFLAGS=
+  XFT_LIBS=
+dnl  AC_MSG_ERROR(can't run '$PKG_CONFIG xft --libs' - make sure it is in your PATH)
+fi
+
+AC_SUBST(XFT_CFLAGS)
+AC_SUBST(XFT_LIBS)
+
 rox_CHECK_EXISTS([$XML_CONFIG],
 	   [You need to install the xml-devel package before compiling:
 	    http://xmlsoft.org/])
diff -pruN rox-1.2.2/ROX-Filer/src/display.c rox-1.2.2-xft-20060514/ROX-Filer/src/display.c
--- rox-1.2.2/ROX-Filer/src/display.c	2002-01-20 01:47:26.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/display.c	2006-04-30 22:43:55.000000000 +0900
@@ -37,6 +37,10 @@
 #include <gdk/gdkx.h>
 #include <gdk/gdkkeysyms.h>
 
+#ifdef ENABLE_XFT
+#include <X11/Xft/Xft.h>
+#endif
+
 #include "global.h"
 
 #include "main.h"
@@ -73,6 +77,11 @@ static gboolean o_dirs_first = FALSE;
 static gint	o_small_truncate = 250;
 static gint	o_large_truncate = 89;
 
+#ifdef ENABLE_XFT
+static XftDraw  *draw = NULL;
+static XftColor type_color;
+#endif
+
 /* GC for drawing colour filenames */
 static GdkGC	*type_gc = NULL;
 
@@ -93,6 +102,10 @@ struct _Template {
 		(template)->icon.x, (template)->icon.y)
 
 /* Static prototypes */
+#ifdef ENABLE_XFT
+static int string_width(XftFont *font, guchar *string, int len);
+#endif
+static size_t strlenfix(const char *s, size_t len);
 static void fill_template(GdkRectangle *area, CollectionItem *item,
 			FilerWindow *filer_window, Template *template);
 static void huge_template(GdkRectangle *area, CollectionItem *colitem,
@@ -125,7 +138,11 @@ static void draw_string(GtkWidget *widge
 #ifdef GTK2
 		PangoLayout *layout,
 #else
+#ifdef ENABLE_XFT
+        XftFont *font,
+#else
 		GdkFont	*font,
+#endif
 		char	*string,
 		int	len,		/* -1 for whole string */
 #endif
@@ -718,6 +735,46 @@ void display_free_colitem(Collection *co
  *			INTERNAL FUNCTIONS			*
  ****************************************************************/
 
+static size_t strlenfix(const char *s, size_t len)
+{
+    GdkWChar *wc_str;
+    guchar  *buf;
+    guint   wc_len;
+
+    if (!s || len <= 0) return 0;
+    wc_str = g_new0(GdkWChar, len);
+    buf = g_strndup(s, len);
+    wc_len = gdk_mbstowcs(wc_str, buf, len);
+    if (wc_len == -1)
+        len = strlenfix(s, len - 1);
+    g_free(buf);
+    g_free(wc_str);
+    return len;
+}
+
+#ifdef ENABLE_XFT
+static int string_width(XftFont *font, guchar *string, int len)
+{
+    GdkWChar *wc_str;
+    XGlyphInfo info;
+    guchar *buf;
+    if (!string || !font) return 0;
+    wc_str = g_new0(GdkWChar, len);
+    buf = g_strndup(string, len);
+    len = gdk_mbstowcs(wc_str, buf, len);
+    g_free(buf);
+    if (len == -1)
+    {   /* recovery string */
+        buf = gdk_wcstombs(wc_str);
+        len = gdk_mbstowcs(wc_str, buf, strlen(buf));
+        g_free(buf);
+    }
+    if (len == -1) return 0;
+    XftTextExtents32(GDK_DISPLAY(), font, wc_str, len, &info);    
+    return info.xOff;
+}
+#endif
+
 static void options_changed(void)
 {
 	gboolean	old_case = o_sort_nocase;
@@ -1182,6 +1239,10 @@ static void draw_item(GtkWidget *widget,
 	gboolean	selected = colitem->selected;
 	Template	template;
 	ViewData *view = (ViewData *) colitem->view_data;
+#ifdef ENABLE_XFT
+    GdkColor *color;
+    static gboolean color_alloced = FALSE;
+#endif
 
 	g_return_if_fail(view != NULL);
 
@@ -1193,6 +1254,21 @@ static void draw_item(GtkWidget *widget,
 
 	gdk_gc_set_foreground(type_gc, type_get_colour(item,
 					&widget->style->fg[GTK_STATE_NORMAL]));
+#ifdef ENABLE_XFT
+    if (!color_alloced)
+    {
+        XftColorAllocName (GDK_DISPLAY(),
+                DefaultVisual(GDK_DISPLAY(), DefaultScreen(GDK_DISPLAY())),
+                DefaultColormap(GDK_DISPLAY(), DefaultScreen(GDK_DISPLAY())),
+                "BLACK", &type_color);
+        color_alloced = TRUE;
+    }
+    color = type_get_colour(item, &widget->style->fg[GTK_STATE_NORMAL]);
+    type_color.pixel = color->pixel;
+    type_color.color.red = color->red;
+    type_color.color.green = color->green;
+    type_color.color.blue = color->blue;
+#endif
 
 	if (template.icon.width <= SMALL_WIDTH &&
 			template.icon.height <= SMALL_HEIGHT)
@@ -1231,7 +1307,7 @@ static void draw_item(GtkWidget *widget,
 		guchar	*bot = item->leafname + view->split_pos;
 		int	w;
 
-		w = gdk_string_measure(item_font, bot);
+		w = string_width(item_font, bot, strlen(bot));
 
 		rec.x = template.leafname.x;
 		rec.y = template.leafname.y;
@@ -1427,7 +1503,7 @@ void display_update_view(FilerWindow *fi
 	view->name_width = w / PANGO_SCALE;
 	view->name_height = h / PANGO_SCALE;
 #else
-	w = gdk_string_measure(item_font, item->leafname);
+	w = string_width(item_font, item->leafname, strlen(item->leafname));
 	h = item_font->ascent + item_font->descent;
 			
 	view->name_width = w;
@@ -1452,11 +1528,11 @@ void display_update_view(FilerWindow *fi
 	{
 		int	top_len, bot_len, sp;
 
-		sp = strlen(item->leafname) / 2;
+		sp = strlenfix(item->leafname, strlen(item->leafname) / 2);
 		view->split_pos = sp;
 
-		top_len = gdk_text_measure(item_font, item->leafname, sp);
-		bot_len = gdk_string_measure(item_font, item->leafname + sp);
+		top_len = string_width(item_font, item->leafname, sp);
+		bot_len = string_width(item_font, item->leafname + sp, strlen(item->leafname + sp));
 
 		view->split_width = MAX(top_len, bot_len);
 		view->split_height = font_height * 2;
@@ -1469,7 +1545,11 @@ static void draw_string(GtkWidget *widge
 #ifdef GTK2
 		PangoLayout *layout,
 #else
+#ifdef ENABLE_XFT
+        XftFont *font,
+#else
 		GdkFont	*font,
+#endif
 		char	*string,
 		int	len,		/* -1 for whole string */
 #endif
@@ -1482,6 +1562,13 @@ static void draw_string(GtkWidget *widge
 	GdkGC		*gc = selected
 			? widget->style->fg_gc[selection_state]
 			: type_gc;
+#ifdef ENABLE_XFT
+    static XftColor xftcolor;   
+    static gboolean color_alloced = FALSE;   
+    GdkWChar *wc_str;
+    guchar *buf;
+    XRectangle rect;
+#endif
 	
 	if (selected && box)
 		gtk_paint_flat_box(widget->style, widget->window, 
@@ -1490,6 +1577,24 @@ static void draw_string(GtkWidget *widge
 				area->x, area->y,
 				MIN(width, area->width),
 				area->height);
+#ifdef ENABLE_XFT
+    else
+        gtk_paint_flat_box(widget->style, widget->window, 
+            GTK_STATE_NORMAL, GTK_SHADOW_NONE,
+            NULL, widget, "text",
+            area->x, area->y,
+            MIN(width, area->width),
+            area->height);
+	if (width > area->width)
+	{
+        rect.x = area->x;
+        rect.y = area->y;
+        rect.width = area->width;
+        rect.height = area->height;
+        XftDrawSetClipRectangles(draw,
+                0, 0, &rect, 1);
+	}
+#endif
 
 	if (width > area->width)
 	{
@@ -1502,12 +1607,54 @@ static void draw_string(GtkWidget *widge
 #else
 	if (len == -1)
 		len = strlen(string);
+#ifdef ENABLE_XFT
+    if (!draw || XftDrawDrawable(draw) != GDK_WINDOW_XWINDOW(widget->window))
+        draw = XftDrawCreate(GDK_DISPLAY(),
+            GDK_WINDOW_XWINDOW(widget->window),
+            DefaultVisual(GDK_DISPLAY(), DefaultScreen(GDK_DISPLAY())),
+            DefaultColormap(GDK_DISPLAY(), DefaultScreen(GDK_DISPLAY())));
+    if (!color_alloced)
+    {
+        XftColorAllocName (GDK_DISPLAY(),
+                DefaultVisual(GDK_DISPLAY(),
+                    DefaultScreen(GDK_DISPLAY())),
+                DefaultColormap(GDK_DISPLAY(),
+                    DefaultScreen(GDK_DISPLAY())),
+                "BLACK", &xftcolor);
+    }
+    if (selected)
+    {
+        xftcolor.pixel = widget->style->fg[selection_state].pixel;
+        xftcolor.color.red = widget->style->fg[selection_state].red;
+        xftcolor.color.green = widget->style->fg[selection_state].green;
+        xftcolor.color.blue = widget->style->fg[selection_state].blue;
+    } else
+        xftcolor = type_color;
+    wc_str = g_new0(GdkWChar, len);
+    buf = g_strndup(string, len);
+    len = gdk_mbstowcs(wc_str, buf, len);
+    if (len == -1)
+    {   /* recovery string */
+        g_free(buf);
+        buf = gdk_wcstombs(wc_str);
+        len = gdk_mbstowcs(wc_str, buf, strlen(buf));
+    }
+    g_free(buf);
+    XftDrawString32(draw, &xftcolor, font,
+            area->x, area->y + font->ascent,
+            wc_str, len);
+    g_free(wc_str);
+	if (width > area->width)
+        XftDrawSetClip(draw, NULL);
+
+#else
 	gdk_draw_text(widget->window,
 			font,
 			gc,
 			area->x, area->y + font->ascent,
 			string, len);
 #endif
+#endif
 
 	if (width > area->width)
 	{
diff -pruN rox-1.2.2/ROX-Filer/src/filer.c rox-1.2.2-xft-20060514/ROX-Filer/src/filer.c
--- rox-1.2.2/ROX-Filer/src/filer.c	2002-02-13 00:54:08.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/filer.c	2003-12-07 23:50:53.000000000 +0900
@@ -1513,6 +1513,7 @@ static void filer_add_widgets(FilerWindo
 	/* If there's a message that should be displayed in each window (eg
 	 * 'Running as root'), add it here.
 	 */
+ /* BK take out for Puppy...
 	if (show_user_message)
 	{
 		filer_window->message = gtk_label_new(show_user_message);
@@ -1520,6 +1521,13 @@ static void filer_add_widgets(FilerWindo
 				   FALSE, TRUE, 0);
 		gtk_widget_show(filer_window->message);
 	}
+ */
+/*BK try this, to display path... no good, doesn't update...
+ filer_window->message = gtk_label_new(filer_window->path);
+ gtk_box_pack_start(GTK_BOX(vbox), filer_window->message, FALSE, TRUE, 0);
+ gtk_widget_show(filer_window->message);
+*/
+
 
 	/* Now add the area for displaying the files.
 	 * If we've got Gtk+-2.0 then the collection is one huge window
diff -pruN rox-1.2.2/ROX-Filer/src/gui_support.c rox-1.2.2-xft-20060514/ROX-Filer/src/gui_support.c
--- rox-1.2.2/ROX-Filer/src/gui_support.c	2002-02-13 22:24:26.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/gui_support.c	2006-04-30 22:21:07.000000000 +0900
@@ -32,6 +32,9 @@
 
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
+#ifdef ENABLE_XFT
+#include <X11/Xft/Xft.h>
+#endif
 #include <gdk/gdkx.h>
 #include <gdk/gdk.h>
 #include <gdk/gdkkeysyms.h>
@@ -45,8 +48,13 @@
 #include "choices.h"
 
 #ifndef GTK2
+#ifdef ENABLE_XFT
+XftFont	   	*item_font = NULL;
+XftFont	   	*fixed_font = NULL;
+#else
 GdkFont	   	*item_font = NULL;
 GdkFont	   	*fixed_font = NULL;
+#endif
 GtkStyle   	*fixed_style = NULL;
 gint		fixed_width;
 #endif
@@ -61,6 +69,9 @@ static GtkWidget *current_dialog = NULL;
 void gui_support_init()
 {
 #ifndef GTK2
+#ifdef ENABLE_XFT
+    XGlyphInfo info;
+#endif
 	GtkWidget *tmp;
 
 	/* Create a window and get its font rather than using
@@ -68,17 +79,34 @@ void gui_support_init()
 	 */
 	tmp = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 	gtk_widget_realize(tmp);
+#ifdef ENABLE_XFT
+    item_font = XftFontOpenName(GDK_DISPLAY(),
+               DefaultScreen(GDK_DISPLAY()),
+               "Sans-serif");
+#else
 	item_font = gtk_widget_get_style(tmp)->font;
 	gdk_font_ref(item_font);
+#endif
 	gtk_widget_destroy(tmp);
 
+#ifdef ENABLE_XFT
+    fixed_font = XftFontOpenName(GDK_DISPLAY(),
+               DefaultScreen(GDK_DISPLAY()),
+               "monospace");
+#else
 	fixed_font = gdk_font_load("fixed");
+#endif
 
 	fixed_style = gtk_style_copy(gtk_widget_get_default_style());
-	fixed_style->font = fixed_font;
+	fixed_style->font = gdk_font_load("fixed");;
 
+#ifdef ENABLE_XFT
+    XftTextExtentsUtf8(GDK_DISPLAY(), fixed_font, "m", 1, &info);    
+    fixed_width = info.xOff;
+#else
 	fixed_width = gdk_string_width(fixed_font, "m");
 #endif
+#endif
 
 	gdk_color_alloc(gtk_widget_get_default_colormap(), &red);
 
diff -pruN rox-1.2.2/ROX-Filer/src/gui_support.h rox-1.2.2-xft-20060514/ROX-Filer/src/gui_support.h
--- rox-1.2.2/ROX-Filer/src/gui_support.h	2001-12-24 21:13:04.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/gui_support.h	2006-04-29 15:29:06.000000000 +0900
@@ -9,15 +9,26 @@
 #define _GUI_SUPPORT_H
 
 #include <gtk/gtk.h>
+#ifdef ENABLE_XFT
+#include <X11/Xft/Xft.h>
+#endif
 
 #define WIN_STATE_STICKY          (1<<0) /* Fixed relative to screen */
 #define WIN_STATE_HIDDEN          (1<<4) /* Not on taskbar but window visible */
 #define WIN_STATE_FIXED_POSITION  (1<<8) /* Window is fixed in position even */
 #define WIN_STATE_ARRANGE_IGNORE  (1<<9) /* Ignore for auto arranging */
 
+#ifdef ENABLE_XFT
+extern XftFont	   	*fixed_font;
+#else
 extern GdkFont	   	*fixed_font;
+#endif
 #ifndef GTK2
+#ifdef ENABLE_XFT
+extern XftFont	   	*item_font;
+#else
 extern GdkFont	   	*item_font;
+#endif
 extern GtkStyle   	*fixed_style;
 extern gint		fixed_width;
 #endif
diff -pruN rox-1.2.2/ROX-Filer/src/menu.c rox-1.2.2-xft-20060514/ROX-Filer/src/menu.c
--- rox-1.2.2/ROX-Filer/src/menu.c	2002-07-03 06:38:02.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/menu.c	2005-11-20 19:56:50.000000000 +0900
@@ -184,6 +184,8 @@ static gboolean	(*current_savebox_callba
 #undef N_
 #define N_(x) x
 
+/*BK changed Send To... to Open With... */
+
 static GtkItemFactoryEntry filer_menu_def[] = {
 {N_("Display"),			NULL, NULL, 0, "<Branch>"},
 {">" N_("Huge Icons"),   	NULL, huge_with, DETAILS_NONE, NULL},
@@ -235,7 +237,7 @@ static GtkItemFactoryEntry filer_menu_de
 {">" N_("Open AVFS"),		NULL, file_op, FILE_OPEN_VFS_AVFS, NULL},
 #endif
 {">",				NULL, NULL, 0, "<Separator>"},
-{">" N_("Send To..."),		NULL, file_op, FILE_SEND_TO, NULL},
+{">" N_("Open With..."),		NULL, file_op, FILE_SEND_TO, NULL},
 {">" N_("Delete"),	    	NULL, file_op, FILE_DELETE, NULL},
 {">" N_("Disk Usage"),		NULL, file_op, FILE_USAGE, NULL},
 {">" N_("Permissions"),		NULL, file_op, FILE_CHMOD_ITEMS, NULL},
diff -pruN rox-1.2.2/ROX-Filer/src/pinboard.c rox-1.2.2-xft-20060514/ROX-Filer/src/pinboard.c
--- rox-1.2.2/ROX-Filer/src/pinboard.c	2002-07-03 06:38:02.000000000 +0900
+++ rox-1.2.2-xft-20060514/ROX-Filer/src/pinboard.c	2006-05-14 01:10:35.000000000 +0900
@@ -32,6 +32,10 @@
 #include <gdk/gdkx.h>
 #include <gtk/gtkinvisible.h>
 #include <stdlib.h>
+#ifdef ENABLE_XFT
+#include <X11/Xft/Xft.h>
+#include <X11/Xatom.h>
+#endif
 
 #include "global.h"
 
@@ -49,6 +53,9 @@
 #include "icon.h"
 #include "run.h"
 
+/* #undef ENABLE_XFT */
+/* #define ENABLE_XFT_MORE */
+
 /* The number of pixels between the bottom of the image and the top
  * of the text.
  */
@@ -77,6 +84,10 @@ static gint	loading_pinboard = 0;		/* No
 static GdkColor	mask_solid = {1, 1, 1, 1};
 static GdkColor	mask_transp = {0, 0, 0, 0};
 static GdkGC	*mask_gc = NULL;
+#ifdef ENABLE_XFT
+static XftDraw  *draw = NULL;
+static Pixmap bg_img = None;
+#endif
 
 /* Proxy window for DnD and clicks on the desktop */
 static GtkWidget *proxy_invisible;
@@ -521,10 +532,62 @@ static void mask_wink_border(Icon *icon,
 	gtk_widget_draw(icon->widget, NULL);
 }
 
+#ifdef ENABLE_XFT
+static int string_width(XftFont *font, guchar *string, int len)
+{
+    GdkWChar *wc_str;
+    XGlyphInfo info;
+    guchar *buf;
+    if (!string || !font) return 0;
+    wc_str = g_new0(GdkWChar, len);
+    buf = g_strndup(string, len);
+    len = gdk_mbstowcs(wc_str, buf, len);
+    g_free(buf);
+    if (len == -1)
+    {   /* recovery string */
+        buf = gdk_wcstombs(wc_str);
+        len = gdk_mbstowcs(wc_str, buf, strlen(buf));
+        g_free(buf);
+    }
+    if (len == -1) return 0;
+    XftTextExtents32(GDK_DISPLAY(), font, wc_str, len, &info);    
+    return info.xOff;
+}
+
+static Pixmap get_root_pixmap()
+{
+    Atom id;
+    int act_format;
+    u_long  nitems, bytes_after;
+    u_char *prop;
+
+    id = XInternAtom(GDK_DISPLAY(), "_XROOTPMAP_ID", True);
+    if (!id)
+        return None;
+
+    if (XGetWindowProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), id, 0, 1,
+                FALSE, XA_PIXMAP, &id, &act_format,
+                &nitems, &bytes_after, &prop) == Success && prop)
+    {
+        Pixmap root = *((Drawable *)prop);
+        XFree(prop);
+        return root;
+    }
+    return None;
+}
+#endif
+
+#ifdef ENABLE_XFT
+#define TEXT_AT(dx, dy)		\
+        XftDrawString32(maskdraw, &xftcolor, item_font, \
+                text_x + dx, y + dy,  \
+                wc_str, len);
+#else
 #define TEXT_AT(dx, dy)		\
 		gdk_draw_string(icon->mask, font, mask_gc,	\
 				text_x + dx, y + dy,		\
 				item->leafname);
+#endif
 		
 /* Updates the name_width and layout fields, and resizes and masks the window.
  * Also sets the style to pinicon_style, generating it if needed.
@@ -540,8 +603,12 @@ static void set_size_and_shape(Icon *ico
 	DirItem		*item = icon->item;
 	int		text_x, text_y;
 #ifndef GTK2
+#ifdef ENABLE_XFT
+    XftFont     *font;
+#else
 	GdkFont		*font;
 #endif
+#endif
 
 	if (!pinicon_style)
 	{
@@ -554,9 +621,15 @@ static void set_size_and_shape(Icon *ico
 	gtk_widget_set_style(icon->widget, pinicon_style);
 
 #ifndef GTK2
+#ifdef ENABLE_XFT
+    font = item_font;
+    font_height = item_font->ascent + item_font->descent;
+	icon->name_width = string_width(item_font, item->leafname, strlen(item->leafname));
+#else
 	font = pinicon_style->font;
 	font_height = font->ascent + font->descent;
 	icon->name_width = gdk_string_measure(font, item->leafname);
+#endif
 #else
 	{
 		PangoRectangle logical;
@@ -583,6 +656,40 @@ static void set_size_and_shape(Icon *ico
 	/* Clear the mask to transparent */
 	gdk_gc_set_foreground(mask_gc, &mask_transp);
 	gdk_draw_rectangle(icon->mask, mask_gc, TRUE, 0, 0, width, height);
+#ifdef ENABLE_XFT
+    if (bg_img == None)
+        bg_img = get_root_pixmap();
+#ifdef ENABLE_XFT_MORE
+    if (bg_img == None)
+    {
+        int root_x, root_y, root_width, root_height;
+        GC  gc;
+        gc = XCreateGC(GDK_DISPLAY(),GDK_ROOT_WINDOW(),
+                0, NULL);
+        root_x = icon->x - icon->name_width/2 - 1;
+        root_y = icon->y - iheight/2 + WINK_FRAME
+            + iheight + GAP + 1 - item_font->ascent;
+        root_width = icon->name_width + 2;
+        root_height = item_font->ascent + item_font->descent + 2;
+        if (root_x < 0)
+            root_x = 0;
+        if (root_y < 0)
+            root_y = 0;
+        if (root_x + root_width > gdk_screen_width())
+            root_x = gdk_screen_width() - root_width - 2;
+        if (root_y + root_height> gdk_screen_height())
+            root_y = gdk_screen_height() - root_height - 2;
+        gtk_widget_shape_combine_mask(icon->win, icon->mask, 0, 0);
+        icon->trans_bg = XCreatePixmap(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
+                root_width, root_height,
+                DefaultDepth(GDK_DISPLAY(), DefaultScreen(GDK_DISPLAY())));
+        XCopyArea(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
+                icon->trans_bg, gc,
+                root_x, root_y, root_width, root_height,
+                0, 0);
+    }
+#endif
+#endif
 
 	gdk_gc_set_foreground(mask_gc, &mask_solid);
 	/* Make the icon area solid */
@@ -630,22 +737,24 @@ static void set_size_and_shape(Icon *ico
 	text_y = WINK_FRAME + iheight + GAP + 1;
 
 #ifndef GTK2
+#ifndef ENABLE_XFT
 	if (o_text_bg == TEXT_BG_SOLID)
 	{
 #endif
+#endif
 		gdk_draw_rectangle(icon->mask, mask_gc, TRUE,
 				(width - (icon->name_width + 2)) >> 1,
 				WINK_FRAME + iheight + GAP,
 				icon->name_width + 2, font_height + 2);
 #ifndef GTK2
+#ifndef ENABLE_XFT
 	}
 	else
 	{
 		int	y = text_y + font->ascent;
-
 		TEXT_AT(0, 0);
 
-		if (o_text_bg == TEXT_BG_OUTLINE)
+        if (o_text_bg == TEXT_BG_OUTLINE)
 		{
 			TEXT_AT(1, 0);
 			TEXT_AT(1, 1);
@@ -658,6 +767,7 @@ static void set_size_and_shape(Icon *ico
 		}
 	}
 #endif
+#endif
 	
 	gtk_widget_shape_combine_mask(icon->win, icon->mask, 0, 0);
 
@@ -668,8 +778,12 @@ static void set_size_and_shape(Icon *ico
 static gint draw_icon(GtkWidget *widget, GdkEventExpose *event, Icon *icon)
 {
 #ifndef GTK2
+#ifdef ENABLE_XFT
+	XftFont		*font = item_font;
+#else
 	GdkFont		*font = icon->widget->style->font;
 #endif
+#endif
 	int		text_x, text_y;
 	DirItem		*item = icon->item;
 	MaskedPixmap	*image = item->image;
@@ -685,8 +799,9 @@ static gint draw_icon(GtkWidget *widget,
 	/* TODO: If the shape extension is missing we might need to set
 	 * the clip mask here...
 	 */
-	gdk_draw_pixmap(widget->window, gc,
-			image->pixmap,
+
+    gdk_draw_pixmap(widget->window, gc,
+            image->pixmap,
 			0, 0,
 			image_x,
 			WINK_FRAME,
@@ -725,7 +840,7 @@ static gint draw_icon(GtkWidget *widget,
 	text_x = (icon->width - icon->name_width) >> 1;
 	text_y = WINK_FRAME + iheight + GAP + 1;
 
-	if (o_text_bg != TEXT_BG_NONE)
+	if (o_text_bg == TEXT_BG_SOLID)
 	{
 #ifdef GTK2
 		PangoRectangle logical;
@@ -746,6 +861,49 @@ static gint draw_icon(GtkWidget *widget,
 				icon->name_width + 2,
 				font_height + 2);
 	}
+#ifdef ENABLE_XFT
+    else
+    {
+        GC gc;
+        int root_x, root_y, root_width, root_height;
+
+        gc = XCreateGC(GDK_DISPLAY(),GDK_ROOT_WINDOW(),
+                0, NULL);
+        root_x = icon->x - icon->name_width/2 - 1;
+        root_y = icon->y - iheight/2 + text_y - font->ascent;
+        root_width = icon->name_width + 2;
+        root_height = font->ascent + font->descent + 2;
+        if (root_x < 0)
+            root_x = 0;
+        if (root_y < 0)
+            root_y = 0;
+        if (root_x + root_width > gdk_screen_width())
+            root_x = gdk_screen_width() - root_width - 2;
+        if (root_y + root_height> gdk_screen_height())
+            root_y = gdk_screen_height() - root_height - 2;
+        if (bg_img == None)
+            bg_img = get_root_pixmap();
+        if (bg_img != None)
+        {
+            XCopyArea(GDK_DISPLAY(), bg_img,
+                    GDK_WINDOW_XWINDOW(widget->window),
+                    gc, root_x, root_y,
+                    root_width, root_height,
+                    text_x - 1, text_y - 1);
+        }
+#ifdef ENABLE_XFT_MORE
+        else
+        {
+            XCopyArea(GDK_DISPLAY(), icon->trans_bg,
+                    GDK_WINDOW_XWINDOW(widget->window),
+                    gc, 0, 0,
+                    root_width, root_height,
+                    text_x - 1, text_y - 1);
+            //XFreePixmap(GDK_DISPLAY(), icon->trans_bg);
+        }
+#endif
+    }
+#endif
 
 #ifdef GTK2
 	gtk_paint_layout(widget->style, widget->window,
@@ -754,6 +912,42 @@ static gint draw_icon(GtkWidget *widget,
 			text_x,
 			text_y,
 			icon->layout);
+#elif ENABLE_XFT
+    {
+        static gboolean color_alloced = FALSE;
+        XftColor xftcolor;
+        GdkWChar *wc_str;
+        int len;
+
+        if (!draw || XftDrawDrawable(draw)
+                != GDK_WINDOW_XWINDOW(widget->window))
+            draw = XftDrawCreate(GDK_DISPLAY(),
+                    GDK_WINDOW_XWINDOW(widget->window),
+                    DefaultVisual(GDK_DISPLAY(),
+                        DefaultScreen(GDK_DISPLAY())),
+                    DefaultColormap(GDK_DISPLAY(),
+                        DefaultScreen(GDK_DISPLAY())));        
+        if (!color_alloced)
+        {
+            XftColorAllocName (GDK_DISPLAY(),
+                    DefaultVisual(GDK_DISPLAY(),
+                        DefaultScreen(GDK_DISPLAY())),
+                    DefaultColormap(GDK_DISPLAY(),
+                        DefaultScreen(GDK_DISPLAY())),
+                    "BLACK", &xftcolor);
+        }
+        xftcolor.pixel = widget->style->fg[state].pixel;
+        xftcolor.color.red = widget->style->fg[state].red;
+        xftcolor.color.green = widget->style->fg[state].green;
+        xftcolor.color.blue = widget->style->fg[state].blue;
+        len = strlen(item->leafname);
+        wc_str = g_new0(GdkWChar, len);
+        len = gdk_mbstowcs(wc_str, item->leafname, len);
+        XftDrawString32(draw, &xftcolor, item_font,
+                text_x, text_y + item_font->ascent,
+                wc_str, len);
+        g_free(wc_str);
+    }
 #else
 	gtk_paint_string(widget->style, widget->window,
 			state,

