Index: src/vtexft.c
===================================================================
--- src/vtexft.c	(revision 1602)
+++ src/vtexft.c	(working copy)
@@ -502,7 +502,7 @@
 		       VteTerminalAntiAlias antialias)
 {
 	struct _vte_xft_font *ft;
-	XftFont *font;
+	XftFont *font, *prev_font;
 	XGlyphInfo extents;
 	struct _vte_xft_data *data;
 	gunichar wide_chars[] = {VTE_DRAW_DOUBLE_WIDE_CHARACTERS};
@@ -553,21 +553,36 @@
 	/* Estimate a typical cell width by looking at double-width
 	 * characters, and if it's the same as the single width, assume the
 	 * single-width stuff is broken. */
-	n = 0;
+	n = width = 0;
+	prev_font = NULL;
 	for (i = 0; i < G_N_ELEMENTS(wide_chars); i++) {
 		c = wide_chars[i];
 		font = _vte_xft_font_for_char(data->font, c);
 		if ((font != NULL) &&
 		    (_vte_xft_char_exists(data->font, font, c))) {
+			if (n && prev_font != font) {/* font change */
+				width = howmany(width, n);
+				if (width >= draw->width -1 &&
+						width <= draw->width + 1){
+					/* add 1 to round up when dividing by 2 */
+					draw->width = (draw->width + 1) / 2;
+					break;
+				}
+				n = width =0;
+			}
 			memset(&extents, 0, sizeof(extents));
 			_vte_xft_text_extents(data->font, font, c, &extents);
 			n++;
 			width += extents.xOff;
+			prev_font = font;
 		}
 	}
 	if (n > 0) {
-		if (howmany(width, n) == draw->width) {
-			draw->width /= 2;
+		width = howmany(width, n);
+		if (width >= draw->width -1 &&
+				width <= draw->width + 1){
+			/* add 1 to round up when dividing by 2 */
+			draw->width = (draw->width + 1) / 2;
 		}
 	}
 
Index: src/vteglyph.c
===================================================================
--- src/vteglyph.c	(revision 1602)
+++ src/vteglyph.c	(working copy)
@@ -127,7 +127,7 @@
 	GList *iter;
 	FcPattern *pattern;
 	GPtrArray *patterns;
-	FT_Face face;
+	FT_Face face, prev_face;
 	gunichar double_wide_characters[] = {VTE_DRAW_DOUBLE_WIDE_CHARACTERS};
 
 	g_return_if_fail(cache != NULL);
@@ -327,7 +327,9 @@
 		cache->height = 1;
 		cache->ascent = 1;
 	}
-	width = 0;
+	/* detect if font measured above has the fixed-width property */
+	width = count = 0;
+	prev_face = NULL;
 	for (i = 0; i < G_N_ELEMENTS(double_wide_characters); i++) {
 		face = _vte_glyph_cache_face_for_char(cache,
 						      double_wide_characters[i]);
@@ -342,13 +344,27 @@
 						cache->ft_render_flags);
 		}
 		if (error == 0) {
+			if (count && prev_face != face) {
+				width /= 64 * count;
+				if (cache->width >= width - 1 &&
+						cache->width <= width + 1) {
+					/* add 1 to round up when dividing by 2 */
+					cache->width = (cache->width + 1) / 2;
+					break;
+				}
+				count = width =0;
+			}
 			width += face->glyph->metrics.horiAdvance;
 			count++;
+			prev_face = face;
 		}
 	}
 	if (count > 0) {
-		if (cache->width == width / 64 / count) {
-			cache->width /= 2;
+		width /= 64 * count;
+		if (cache->width >= width - 1 &&
+				cache->width <= width + 1) {
+			/* add 1 to round up when dividing by 2 */
+			cache->width = (cache->width + 1) / 2;
 		}
 	}
 }
Index: src/vtedraw.h
===================================================================
--- src/vtedraw.h	(revision 1602)
+++ src/vtedraw.h	(working copy)
@@ -32,7 +32,12 @@
 #define VTE_DRAW_SINGLE_WIDE_CHARACTERS	"ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
 					"abcdefgjijklmnopqrstuvwxyz" \
 					"0123456789./+@&"
-#define VTE_DRAW_DOUBLE_WIDE_CHARACTERS	0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94
+#define VTE_DRAW_DOUBLE_WIDE_CHARACTERS 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94,\
+					0xac00, 0xac01, 0xac04, 0xac08, 0xac10
+/* For Pango, we have to use CJK Ideographs alone. Otherwise, 'width'
+   returned by pango_layout would be screwed up for Chinese and Japanese
+   fonts without Hangul */
+#define VTE_DRAW_DOUBLE_WIDE_IDEOGRAPHS 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94
 #define VTE_DRAW_OPAQUE 0xff
 #define VTE_DRAW_MAX_LENGTH 540
 
Index: src/vtepangox.c
===================================================================
--- src/vtepangox.c	(revision 1602)
+++ src/vtepangox.c	(working copy)
@@ -279,7 +279,7 @@
 	PangoLayout *layout;
 	PangoLayoutIter *iter;
 	PangoRectangle ink, logical;
-	gunichar full_codepoints[] = {VTE_DRAW_DOUBLE_WIDE_CHARACTERS};
+	gunichar full_codepoints[] = {VTE_DRAW_DOUBLE_WIDE_IDEOGRAPHS};
 	GString *full_string;
 	gint full_width;
 	guint i;
@@ -325,7 +325,8 @@
 
 	/* If they're the same, then we have a screwy font. */
 	if (full_width == draw->width) {
-		draw->width /= 2;
+		/* add 1 to round up when dividing by 2 */
+		draw->width = (draw->width + 1) / 2;
 	}
 
 	draw->width = PANGO_PIXELS(draw->width);
Index: src/vtepango.c
===================================================================
--- src/vtepango.c	(revision 1602)
+++ src/vtepango.c	(working copy)
@@ -245,7 +245,7 @@
 	PangoLayout *layout;
 	PangoLayoutIter *iter;
 	PangoRectangle ink, logical;
-	gunichar full_codepoints[] = {VTE_DRAW_DOUBLE_WIDE_CHARACTERS};
+	gunichar full_codepoints[] = {VTE_DRAW_DOUBLE_WIDE_IDEOGRAPHS};
 	GString *full_string;
 	gint full_width;
 	guint i;
@@ -287,7 +287,8 @@
 
 	/* If they're the same, then we have a screwy font. */
 	if (full_width == draw->width) {
-		draw->width /= 2;
+		/* add 1 to round up when dividing by 2 */
+		draw->width = (draw->width + 1) / 2;
 	}
 
 	draw->width = PANGO_PIXELS(draw->width);
