--- rxvt-unicode/src/rxvtfont.C 2021/07/03 04:47:08 1.220 +++ rxvt-unicode/src/rxvtfont.C 2023/08/19 17:44:35 1.223 @@ -519,7 +519,8 @@ bool load (const rxvt_fontprop &prop, bool force_prop) { width = 1; height = 1; - ascent = 1; descent = 0; + ascent = 1; + descent = (*fs)[2]->descent; set_name (strdup ("built-in rendition overflow font")); @@ -1265,6 +1266,16 @@ FT_Face face = XftLockFace (f); + // fuck me plenty: XftLockFace can actually return 0. try not to crash. + // we also assume blindly that if the first lock succeeds, then subsequent + // locks will also succeed. + if (!face) + { + XftFontClose (disp, f); + success = false; + break; + } + ascent = (face->size->metrics.ascender + 63) >> 6; descent = (-face->size->metrics.descender + 63) >> 6; height = max (ascent + descent, (face->size->metrics.height + 63) >> 6);