From 82052afb24d29303804443d160a96c99ce4fae1a Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Mon, 10 Jun 2019 12:55:37 +0900 Subject: [PATCH] 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. --- lwlib/lwlib-utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lwlib/lwlib-utils.c b/lwlib/lwlib-utils.c index 2c0a931f9cb..1507b088610 100644 --- a/lwlib/lwlib-utils.c +++ b/lwlib/lwlib-utils.c @@ -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; } -- 2.39.2