]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid empty menu bar on Xaw with cairo
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 10 Jun 2019 03:55:37 +0000 (12:55 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 10 Jun 2019 03:57:30 +0000 (12:57 +0900)
* lwlib/lwlib-utils.c (crxft_font_open_name) [USE_CAIRO]: Return NULL if
font extents are bogus.

lwlib/lwlib-utils.c

index 2c0a931f9cbb77905bcf86d1b3f16f90f8df3bbb..1507b08861097ac032f81934e5358d9119c93513 100644 (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;
 }