diff options
| author | Eli Zaretskii | 2016-06-29 19:14:58 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-06-29 19:14:58 +0300 |
| commit | 21110afa2c6bc2698c172854988d306b9308d6f5 (patch) | |
| tree | 3342be527849aaafd5bdd751a0840127786bbf92 /src | |
| parent | 6192b6c3a4374b2cb6e02ca865e1899a04a7f7dc (diff) | |
| download | emacs-21110afa2c6bc2698c172854988d306b9308d6f5.tar.gz emacs-21110afa2c6bc2698c172854988d306b9308d6f5.zip | |
Avoid assertion violations when rendering some fonts
* src/dispextern.h (FONT_TOO_HIGH): Don't consider a font "too
high" if its pixel_size value is zero. This avoids assertion
violations at the end of x_produce_glyphs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispextern.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 70358724024..7b9ae78dcd3 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1541,7 +1541,8 @@ struct glyph_string | |||
| 1541 | large vertical space. The heuristics is in the factor of 3. We | 1541 | large vertical space. The heuristics is in the factor of 3. We |
| 1542 | ignore the ascent and descent values reported by such fonts, and | 1542 | ignore the ascent and descent values reported by such fonts, and |
| 1543 | instead go by the values reported for individual glyphs. */ | 1543 | instead go by the values reported for individual glyphs. */ |
| 1544 | #define FONT_TOO_HIGH(ft) ((ft)->ascent + (ft)->descent > 3*(ft)->pixel_size) | 1544 | #define FONT_TOO_HIGH(ft) \ |
| 1545 | ((ft)->pixel_size > 0 && (ft)->ascent + (ft)->descent > 3*(ft)->pixel_size) | ||
| 1545 | 1546 | ||
| 1546 | 1547 | ||
| 1547 | /*********************************************************************** | 1548 | /*********************************************************************** |