*** empty log message ***
authorroot <root>
Tue, 6 Dec 2005 15:41:26 +0000 (15:41 +0000)
committerroot <root>
Tue, 6 Dec 2005 15:41:26 +0000 (15:41 +0000)
Changes
src/rxvtfont.C

diff --git a/Changes b/Changes
index e996960e6ca27caebac504e4edc7e799fa30da07..372bc3183473663fc3e353f487cf32f94e6f0d72 100644 (file)
--- 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
index 52d334d4ee97f7056d040191ab186e4b5d237de2..2d931bade908c5a871e99c73d923721f374b1746 100644 (file)
@@ -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);