Index: hexchat-2.12.4/src/fe-gtk/xtext.c =================================================================== --- hexchat-2.12.4.orig/src/fe-gtk/xtext.c +++ hexchat-2.12.4/src/fe-gtk/xtext.c @@ -177,7 +177,6 @@ gtk_xtext_text_width_8bit (GtkXText *xte #define EMPH_BOLD 2 #define EMPH_HIDDEN 4 static PangoAttrList *attr_lists[4]; -static int fontwidths[4][128]; static PangoAttribute * xtext_pango_attr (PangoAttribute *attr) @@ -221,17 +220,12 @@ xtext_pango_init (GtkXText *xtext) xtext_pango_attr (pango_attr_weight_new (PANGO_WEIGHT_BOLD))); break; } - - /* Now initialize fontwidths[i] */ - pango_layout_set_attributes (xtext->layout, attr_lists[i]); - for (j = 0; j < 128; j++) - { - buf[0] = j; - pango_layout_set_text (xtext->layout, buf, 1); - pango_layout_get_pixel_size (xtext->layout, &fontwidths[i][j], NULL); - } } - xtext->space_width = fontwidths[0][' ']; + + pango_layout_set_attributes (xtext->layout, attr_lists[0]); + buf[0] = ' '; + pango_layout_set_text (xtext->layout, buf, 1); + pango_layout_get_pixel_size (xtext->layout, &(xtext->space_width), NULL); } static void