diff options
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2019-06-10 12:55:37 +0900 |
---|---|---|
committer | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2019-06-10 12:57:30 +0900 |
commit | 82052afb24d29303804443d160a96c99ce4fae1a (patch) | |
tree | fb49bd63808cbc3b7974e6b7f95b95f286ee7f6a | |
parent | e4f12a1b1ffba07cc7d6f6e1aec5de9f09af616f (diff) | |
download | emacs-82052afb24d29303804443d160a96c99ce4fae1a.tar.gz |
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.
-rw-r--r-- | lwlib/lwlib-utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |