Index: vte/src/vte.c
===================================================================
--- vte.orig/src/vte.c	2008-06-21 18:49:05.000000000 -0700
+++ vte/src/vte.c	2008-06-21 18:49:25.000000000 -0700
@@ -8282,7 +8282,7 @@
 	}
 
 	if (_vte_draw_char(terminal->pvt->draw, &request,
-			   &color, VTE_DRAW_OPAQUE)) {
+			   &color, VTE_DRAW_OPAQUE, FALSE)) {
 		/* We were able to draw with actual fonts. */
 		return TRUE;
 	}
@@ -9026,6 +9026,7 @@
 	gint columns = 0;
 	GdkColor color = {0,};
 	struct vte_palette_entry *fg, *bg, *defbg;
+	gboolean has_bold_font = FALSE;
 
 	g_assert(n > 0);
 	_VTE_DEBUG_IF(VTE_DEBUG_CELLS) {
@@ -9043,6 +9044,10 @@
 	}
 
 	bold = bold && terminal->pvt->allow_bold;
+	if (bold) {
+		has_bold_font = _vte_draw_has_bold_font (terminal->pvt->draw);
+	}
+	
 	fg = &terminal->pvt->palette[fore];
 	bg = &terminal->pvt->palette[back];
 	defbg = &terminal->pvt->palette[VTE_DEF_BG];
@@ -9075,15 +9080,18 @@
 	color.green = fg->green;
 	_vte_draw_text(terminal->pvt->draw,
 			items, n,
-			&color, VTE_DRAW_OPAQUE);
-	if (bold) {
+			&color, VTE_DRAW_OPAQUE,
+			bold ? has_bold_font : FALSE);
+	/* For backends that do not implement correct bolding, perform
+	   double-striking in an attempt to approximate it. */
+	if (bold && !has_bold_font) {
 		/* Take a step to the right. */
 		for (i = 0; i < n; i++) {
 			items[i].x++;
 		}
 		_vte_draw_text(terminal->pvt->draw,
 				items, n,
-				&color, VTE_DRAW_OPAQUE);
+				&color, VTE_DRAW_OPAQUE, FALSE);
 		/* Now take a step back. */
 		for (i = 0; i < n; i++) {
 			items[i].x--;
Index: vte/src/vtedraw.c
===================================================================
--- vte.orig/src/vtedraw.c	2008-06-21 18:49:05.000000000 -0700
+++ vte/src/vtedraw.c	2008-06-21 18:50:10.000000000 -0700
@@ -325,6 +325,14 @@
 }
 
 gboolean
+_vte_draw_has_bold_font (struct _vte_draw *draw)
+{
+	g_return_val_if_fail (draw->impl != NULL, 1);
+	g_return_val_if_fail (draw->impl->has_bold_font != NULL, FALSE);
+	return draw->impl->has_bold_font (draw);
+}
+
+gboolean
 _vte_draw_get_using_fontconfig (struct _vte_draw *draw)
 {
 	g_return_val_if_fail (draw->impl != NULL, TRUE);
@@ -335,7 +343,7 @@
 void
 _vte_draw_text (struct _vte_draw *draw,
 	       struct _vte_draw_text_request *requests, gsize n_requests,
-	       GdkColor *color, guchar alpha)
+	       GdkColor *color, guchar alpha, gboolean bold)
 {
 	g_return_if_fail (draw->started == TRUE);
 	g_return_if_fail (draw->impl != NULL);
@@ -348,31 +356,31 @@
 			g_string_append_unichar (string, requests[n].c);
 		}
 		str = g_string_free (string, FALSE);
-		g_printerr ("draw_text (\"%s\", len=%"G_GSIZE_FORMAT", color=(%d,%d,%d,%d))\n",
+		g_printerr ("draw_text (\"%s\", len=%"G_GSIZE_FORMAT", color=(%d,%d,%d,%d), %s)\n",
 				str, n_requests, color->red, color->green, color->blue,
-				alpha);
+				alpha, bold ? "bold" : "normal");
 		g_free (str);
 	}
-	draw->impl->draw_text (draw, requests, n_requests, color, alpha);
+	draw->impl->draw_text (draw, requests, n_requests, color, alpha, bold);
 }
 
 gboolean
 _vte_draw_char (struct _vte_draw *draw,
 	       struct _vte_draw_text_request *request,
-	       GdkColor *color, guchar alpha)
+	       GdkColor *color, guchar alpha, gboolean bold)
 {
 	g_return_val_if_fail (draw->started == TRUE, FALSE);
 	g_return_val_if_fail (draw->impl != NULL, FALSE);
 	_vte_debug_print (VTE_DEBUG_DRAW,
-			"draw_char ('%c', color=(%d,%d,%d,%d))\n",
+			"draw_char ('%c', color=(%d,%d,%d,%d), %s)\n",
 			request->c,
 			color->red, color->green, color->blue,
-			alpha);
+			alpha, bold ? "bold" : "normal");
 	if (draw->impl->draw_char == NULL) {
-		draw->impl->draw_text (draw, request, 1, color, alpha);
+		draw->impl->draw_text (draw, request, 1, color, alpha, bold);
 		return TRUE;
 	}
-	return draw->impl->draw_char (draw, request, color, alpha);
+	return draw->impl->draw_char (draw, request, color, alpha, bold);
 }
 gboolean
 _vte_draw_has_char (struct _vte_draw *draw, gunichar c)
Index: vte/src/vtedraw.h
===================================================================
--- vte.orig/src/vtedraw.h	2008-06-21 18:49:05.000000000 -0700
+++ vte/src/vtedraw.h	2008-06-21 18:49:25.000000000 -0700
@@ -83,10 +83,10 @@
 	gboolean (*has_bold_font)(struct _vte_draw *);
 	void (*draw_text)(struct _vte_draw *,
 			  struct _vte_draw_text_request *, gsize,
-			  GdkColor *, guchar);
+			  GdkColor *, guchar, gboolean);
 	gboolean (*draw_char)(struct _vte_draw *,
 			      struct _vte_draw_text_request *,
-			      GdkColor *, guchar);
+			      GdkColor *, guchar, gboolean);
 	gboolean (*has_char)(struct _vte_draw *, gunichar);
 	void (*draw_rectangle)(struct _vte_draw *,
 			       gint, gint, gint, gint,
@@ -148,15 +148,16 @@
 int _vte_draw_get_text_height(struct _vte_draw *draw);
 int _vte_draw_get_text_ascent(struct _vte_draw *draw);
 int _vte_draw_get_char_width(struct _vte_draw *draw, gunichar c, int columns);
+gboolean _vte_draw_has_bold_font(struct _vte_draw *draw);
 gboolean _vte_draw_get_using_fontconfig(struct _vte_draw *draw);
 
 /* Draw text or rectangles. */
 void _vte_draw_text(struct _vte_draw *draw,
 		    struct _vte_draw_text_request *requests, gsize n_requests,
-		    GdkColor *color, guchar alpha);
+		    GdkColor *color, guchar alpha, gboolean bold);
 gboolean _vte_draw_char(struct _vte_draw *draw,
 			struct _vte_draw_text_request *request,
-			GdkColor *color, guchar alpha);
+			GdkColor *color, guchar alpha, gboolean bold);
 gboolean _vte_draw_has_char(struct _vte_draw *draw, gunichar c);
 void _vte_draw_fill_rectangle(struct _vte_draw *draw,
 			      gint x, gint y, gint width, gint height,
Index: vte/src/vteft2.c
===================================================================
--- vte.orig/src/vteft2.c	2008-06-21 18:49:05.000000000 -0700
+++ vte/src/vteft2.c	2008-06-21 18:49:25.000000000 -0700
@@ -286,7 +286,7 @@
 static void
 _vte_ft2_draw_text(struct _vte_draw *draw,
 		   struct _vte_draw_text_request *requests, gsize n_requests,
-		   GdkColor *color, guchar alpha)
+		   GdkColor *color, guchar alpha, gboolean bold)
 {
 	struct _vte_ft2_data *data;
 	gsize i, j;
@@ -323,7 +323,7 @@
 static gboolean
 _vte_ft2_draw_char(struct _vte_draw *draw,
 		   struct _vte_draw_text_request *request,
-		   GdkColor *color, guchar alpha)
+		   GdkColor *color, guchar alpha, gboolean bold)
 {
 	struct _vte_ft2_data *data;
 
@@ -331,7 +331,7 @@
 
 	if (data->cache != NULL) {
 		if (_vte_glyph_get(data->cache, request->c) != NULL) {
-			_vte_ft2_draw_text(draw, request, 1, color, alpha);
+			_vte_ft2_draw_text(draw, request, 1, color, alpha, bold);
 			return TRUE;
 		}
 	}
Index: vte/src/vtegl.c
===================================================================
--- vte.orig/src/vtegl.c	2008-06-21 18:49:05.000000000 -0700
+++ vte/src/vtegl.c	2008-06-21 18:49:25.000000000 -0700
@@ -433,7 +433,7 @@
 static void
 _vte_gl_draw_text(struct _vte_draw *draw,
 		  struct _vte_draw_text_request *requests, gsize n_requests,
-		  GdkColor *color, guchar alpha)
+		  GdkColor *color, guchar alpha, gboolean bold)
 {
 	struct _vte_gl_data *data;
 	const struct _vte_glyph *glyph;
@@ -509,7 +509,7 @@
 static gboolean
 _vte_gl_draw_char(struct _vte_draw *draw,
 		  struct _vte_draw_text_request *request,
-		  GdkColor *color, guchar alpha)
+		  GdkColor *color, guchar alpha, gboolean bold)
 {
 	struct _vte_gl_data *data;
 
@@ -517,7 +517,7 @@
 
 	if (data->cache != NULL) {
 		if (_vte_glyph_get(data->cache, request->c) != NULL) {
-			_vte_gl_draw_text(draw, request, 1, color, alpha);
+			_vte_gl_draw_text(draw, request, 1, color, alpha, bold);
 			return TRUE;
 		}
 	}
Index: vte/src/vtepango.c
===================================================================
--- vte.orig/src/vtepango.c	2008-06-21 18:49:05.000000000 -0700
+++ vte/src/vtepango.c	2008-06-21 18:49:25.000000000 -0700
@@ -341,7 +341,7 @@
 static void
 _vte_pango_draw_text(struct _vte_draw *draw,
 		     struct _vte_draw_text_request *requests, gsize n_requests,
-		     GdkColor *color, guchar alpha)
+		     GdkColor *color, guchar alpha, gboolean bold)
 {
 	struct _vte_pango_data *data = (struct _vte_pango_data*) draw->impl_data;
 	char buf[VTE_UTF8_BPC];
@@ -367,9 +367,9 @@
 static gboolean
 _vte_pango_draw_char(struct _vte_draw *draw,
 		     struct _vte_draw_text_request *request,
-		     GdkColor *color, guchar alpha)
+		     GdkColor *color, guchar alpha, gboolean bold)
 {
-	_vte_pango_draw_text(draw, request, 1, color, alpha);
+	_vte_pango_draw_text(draw, request, 1, color, alpha, bold);
 	return TRUE;
 }
 
Index: vte/src/vtepangox.c
===================================================================
--- vte.orig/src/vtepangox.c	2008-06-21 18:49:05.000000000 -0700
+++ vte/src/vtepangox.c	2008-06-21 18:49:25.000000000 -0700
@@ -389,7 +389,7 @@
 _vte_pango_x_draw_text(struct _vte_draw *draw,
 		       struct _vte_draw_text_request *requests,
 		       gsize n_requests,
-		       GdkColor *color, guchar alpha)
+		       GdkColor *color, guchar alpha, gboolean bold)
 {
 	Display *display;
 	GC gc;
@@ -422,9 +422,9 @@
 static gboolean
 _vte_pango_x_draw_char(struct _vte_draw *draw,
 		       struct _vte_draw_text_request *request,
-		       GdkColor *color, guchar alpha)
+		       GdkColor *color, guchar alpha, gboolean bold)
 {
-	_vte_pango_x_draw_text(draw, request, 1, color, alpha);
+	_vte_pango_x_draw_text(draw, request, 1, color, alpha, bold);
 	return TRUE;
 }
 
Index: vte/src/vtexft.c
===================================================================
--- vte.orig/src/vtexft.c	2008-06-21 18:49:05.000000000 -0700
+++ vte/src/vtexft.c	2008-06-21 18:49:25.000000000 -0700
@@ -780,7 +780,6 @@
 	draw->width = MAX(data->font->width, data->font_bold->width);
 	draw->height = MAX(data->font->height, data->font_bold->height);
 	draw->ascent = MAX(data->font->ascent, data->font_bold->ascent);
-	//draw->has_bold = TRUE;
 
 	return;
 
@@ -789,7 +788,6 @@
 	draw->width = data->font->width;
 	draw->height = data->font->height;
 	draw->ascent = data->font->ascent;
-	//draw->has_bold = FALSE;
 }
 
 static inline int
@@ -848,7 +846,7 @@
 static void
 _vte_xft_draw_text (struct _vte_draw *draw,
 		   struct _vte_draw_text_request *requests, gsize n_requests,
-		   GdkColor *color, guchar alpha)
+		   GdkColor *color, guchar alpha, gboolean bold)
 {
 	XftGlyphSpec glyphs[MAX_RUN_LENGTH];
 	XRenderColor rcolor;
@@ -957,7 +955,7 @@
 static gboolean
 _vte_xft_draw_char (struct _vte_draw *draw,
 		   struct _vte_draw_text_request *request,
-		   GdkColor *color, guchar alpha)
+		   GdkColor *color, guchar alpha, gboolean bold)
 {
 	struct _vte_xft_data *data;
 
@@ -965,7 +963,7 @@
 	if (data->font != NULL &&
 			_vte_xft_font_for_char (data->font, request->c)
 				!= NULL) {
-		_vte_xft_draw_text (draw, request, 1, color, alpha);
+		_vte_xft_draw_text (draw, request, 1, color, alpha, bold);
 		return TRUE;
 	}
 	return FALSE;
@@ -1072,6 +1070,7 @@
 	_vte_xft_get_text_ascent,
 	_vte_xft_get_char_width,
 	_vte_xft_get_using_fontconfig,
+	_vte_xft_has_bold_font,
 	_vte_xft_draw_text,
 	_vte_xft_draw_char,
 	_vte_xft_draw_has_char,
