--- rxvt-unicode/src/rxvtfont.C 2005/06/18 10:59:21 1.72 +++ rxvt-unicode/src/rxvtfont.C 2005/12/06 15:41:26 1.74 @@ -1185,6 +1185,17 @@ if (glheight < g.height - g.y) glheight = g.height - g.y; } + if (!width) + { + rxvt_warn ("unable to calculate font width for '%s', ignoring.\n", name); + + XftFontClose (disp, f); + f = 0; + + success = false; + break; + } + if (prop.height == rxvt_fontprop::unset || (height <= prop.height && glheight <= prop.height) || height <= 2 @@ -1203,9 +1214,9 @@ else ftheight = prop.height - 1; - XftFontClose (disp, f); - FcPatternDel (match, FC_PIXEL_SIZE); - FcPatternAddInteger (match, FC_PIXEL_SIZE, ftheight); + XftFontClose (disp, f); + FcPatternDel (match, FC_PIXEL_SIZE); + FcPatternAddInteger (match, FC_PIXEL_SIZE, ftheight); } FcPatternDestroy (match); @@ -1314,7 +1325,7 @@ ///////////////////////////////////////////////////////////////////////////// rxvt_fontset::rxvt_fontset (rxvt_t r) -: r (r), fontdesc (0) +: fontdesc (0), r (r) { clear (); }