Avoid empty menu bar on Xaw with cairo

* lwlib/lwlib-utils.c (crxft_font_open_name) [USE_CAIRO]: Return NULL if
font extents are bogus.
This commit is contained in:
YAMAMOTO Mitsuharu 2019-06-10 12:55:37 +09:00
parent e4f12a1b1f
commit 82052afb24

View file

@ -192,6 +192,11 @@ crxft_font_open_name (Display *dpy, int screen, const char *name)
}
FcPatternDestroy (pattern);
}
if (pub && pub->height <= 0)
{
crxft_font_close (pub);
pub = NULL;
}
return pub;
}