From: YAMAMOTO Mitsuharu Date: Mon, 10 Jun 2019 03:55:37 +0000 (+0900) Subject: Avoid empty menu bar on Xaw with cairo X-Git-Tag: emacs-27.0.90~2630 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=82052afb24d29303804443d160a96c99ce4fae1a;p=emacs.git 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. --- 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; }