+ (FRAME_LINE_HEIGHT ((F)) > FONT_HEIGHT ((FONT)))) / 2 \
- (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F)))
+/* A heuristic test for fonts that claim they need a preposterously
+ large vertical space. The heuristics is in the factor of 3. We
+ ignore the ascent and descent values reported by such fonts, and
+ instead go by the values reported for individual glyphs. */
+#define FONT_TOO_HIGH(ft) ((ft)->ascent + (ft)->descent > 3*(ft)->pixel_size)
+
\f
/***********************************************************************
Faces
/* Pixmaps of the image. */
Pixmap pixmap, mask;
+#ifdef USE_CAIRO
+ void *cr_data;
+ void *cr_data2;
+#endif
#ifdef HAVE_X_WINDOWS
/* X images of the image, corresponding to the above Pixmaps.
Non-NULL means it and its Pixmap counterpart may be out of sync
extern void produce_stretch_glyph (struct it *);
extern int merge_glyphless_glyph_face (struct it *);
+extern void get_font_ascent_descent (struct font *, int *, int *);
+
#ifdef HAVE_WINDOW_SYSTEM
#ifdef GLYPH_DEBUG
void w32_init_fringe (struct redisplay_interface *);
void w32_reset_fringes (void);
#endif
+#ifdef USE_CAIRO
+void x_cr_init_fringe (struct redisplay_interface *);
+#endif
extern unsigned row_hash (struct glyph_row *);