From 8892236ff9be1c132191049ffabab818689b8d89 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 6 Dec 2005 15:41:26 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 5 ++++- src/rxvtfont.C | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index e996960e..372bc318 100644 --- a/Changes +++ b/Changes @@ -17,6 +17,9 @@ WISH: just for fun, do shade and tint with XRender. - fix a bug in the menu code of unknown impact, found by darix. - clean up signal handling to be global, not per terminal (matters only for rxvtd). + - don't crash when broken xft/fontconfig/freetype versions return + bogus data, ignore the xft font instead (experienced on a suse 10.1 + alpha). 5.8 Tue Oct 25 22:21:45 CEST 2005 - INCOMPATIBLE CHANGE: many configure options are now on by default. @@ -83,7 +86,7 @@ WISH: just for fun, do shade and tint with XRender. - cursor blinking now depends on frills. - underline cursor mode (frills, -uc). - implement special value (*g*) for pointerBlankDelay - to disble it. + to disable it. 5.3 Sun Mar 13 00:20:44 CET 2005 - fix a bug that allowed to overflow a buffer via a long diff --git a/src/rxvtfont.C b/src/rxvtfont.C index 52d334d4..2d931bad 100644 --- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -1185,6 +1185,17 @@ rxvt_font_xft::load (const rxvt_fontprop &prop) 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 @@ rxvt_font_xft::load (const rxvt_fontprop &prop) 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); -- 2.34.1