Tags: patch

The attached patch (against vte_0.16.6-1) fixes this problem for me. It reverts to the old behavior for line-drawing characters and shaded/solid rectangles (have the terminal draw the characters itself rather than using characters from the font), but shouldn't (I think) change the behavior for any other characters.

--Michael Vrable
--- vte-0.16.6.orig/src/vte.c	2007-06-18 14:29:44.000000000 -0700
+++ vte-0.16.6/src/vte.c	2007-07-26 10:15:59.000000000 -0700
@@ -8013,13 +8013,10 @@
 }
 
 /* Check if a unicode character is actually a graphic character we draw
- * ourselves to handle cases where fonts don't have glyphs for them. */
+ * ourselves if a font doesn't have glyphs for them. */
 static inline gboolean
 vte_unichar_is_local_graphic(gunichar c)
 {
-	if ((c >= 0x2500) && (c <= 0x257f)) {
-		return TRUE;
-	}
 	switch (c) {
 	case 0x00a3: /* british pound */
 	case 0x00b0: /* degree */
@@ -8033,18 +8030,12 @@
 	case 0x2260: /* != */
 	case 0x2264: /* <= */
 	case 0x2265: /* >= */
-	case 0x23ba: /* scanline 1/9 */
-	case 0x23bb: /* scanline 3/9 */
-	case 0x23bc: /* scanline 7/9 */
-	case 0x23bd: /* scanline 9/9 */
 	case 0x2409: /* HT symbol */
 	case 0x240a: /* LF symbol */
 	case 0x240b: /* VT symbol */
 	case 0x240c: /* FF symbol */
 	case 0x240d: /* CR symbol */
 	case 0x2424: /* NL symbol */
-	case 0x2592: /* checkerboard */
-	case 0x25ae: /* solid rectangle */
 	case 0x25c6: /* diamond */
 		return TRUE;
 		break;
@@ -8053,9 +8044,37 @@
 	}
 	return FALSE;
 }
+
+/* Check if a unicode character is actually a graphic character we always draw
+ * ourselves, even if a font does have glyphs for them. */
+static inline gboolean
+vte_unichar_is_forced_local_graphic(gunichar c)
+{
+	/* Line-drawing characters */
+	if ((c >= 0x2500) && (c <= 0x257f)) {
+		return TRUE;
+	}
+	switch (c) {
+	case 0x23ba: /* scanline 1/9 */
+	case 0x23bb: /* scanline 3/9 */
+	case 0x23bc: /* scanline 7/9 */
+	case 0x23bd: /* scanline 9/9 */
+	case 0x2592: /* checkerboard */
+	case 0x25ae: /* solid rectangle */
+		return TRUE;
+	default:
+		break;
+	}
+	return FALSE;
+}
+
 static inline gboolean
 vte_terminal_unichar_is_local_graphic(VteTerminal *terminal, gunichar c)
 {
+	if (vte_unichar_is_forced_local_graphic (c)) {
+		return TRUE;
+	}
+
 	return vte_unichar_is_local_graphic (c) &&
 		!_vte_draw_has_char (terminal->pvt->draw, c);
 }
@@ -8171,12 +8190,6 @@
 					    column_width * columns, row_height);
 	}
 
-	if (_vte_draw_char(terminal->pvt->draw, &request,
-			   &color, VTE_DRAW_OPAQUE)) {
-		/* We were able to draw with actual fonts. */
-		return TRUE;
-	}
-
 	ret = TRUE;
 
 	switch (c) {

Reply via email to