[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#318162: xterm: boldMode enabled even if bold font is used



The problem is font name stored in normal is being overwritten by a
bold font name and then normal is used in comparison with a
myfonts.f_b to decide whether they are the same and whether to turn on
overstriking. The attached patch fixes it.

Index: xorg-x11-6.8.2.dfsg.1/programs/xterm/fontutils.c
===================================================================
--- xorg-x11-6.8.2.dfsg.1.orig/programs/xterm/fontutils.c	2005-07-16 22:03:19.000000000 +0800
+++ xorg-x11-6.8.2.dfsg.1/programs/xterm/fontutils.c	2005-07-16 22:06:26.000000000 +0800
@@ -647,7 +647,7 @@
     Pixel new_normal;
     Pixel new_revers;
     char *tmpname = NULL;
-    char normal[MAX_FONTNAME];
+    char normal[MAX_FONTNAME], bold[MAX_FONTNAME];
     Bool proportional = False;
 
     memset(&myfonts, 0, sizeof(myfonts));
@@ -721,7 +721,7 @@
 	}
 
 	if (myfonts.f_wb == 0 && !is_double_width_font(bfs)) {
-	    fp = get_font_name_props(screen->display, bfs, normal);
+	    fp = get_font_name_props(screen->display, bfs, bold);
 	    if (fp != 0) {
 		myfonts.f_wb = widebold_font_name(fp);
 		TRACE(("...derived wide/bold %s\n", myfonts.f_wb));

Reply to: