emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a89731a: Avoid assertion violations in --enable-checking builds


From: Eli Zaretskii
Subject: master a89731a: Avoid assertion violations in --enable-checking builds
Date: Sat, 27 Nov 2021 10:10:27 -0500 (EST)

branch: master
commit a89731a78c8cb019a18d2e70fe43d21286d88ab1
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Avoid assertion violations in --enable-checking builds
    
    * src/xdisp.c (gui_produce_glyphs): Make sure character glyphs
    don't trigger assertion violation due to negative ascent or
    descent.  This was reporte dto happen with some fonts used by the
    xfont backend.
---
 src/xdisp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/xdisp.c b/src/xdisp.c
index 24049ab..9f93799 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -31199,6 +31199,11 @@ gui_produce_glyphs (struct it *it)
          it->max_ascent = max (it->max_ascent, font_ascent);
          it->max_descent = max (it->max_descent, font_descent);
        }
+
+      if (it->ascent < 0)
+       it->ascent = 0;
+      if (it->descent < 0)
+       it->descent = 0;
     }
   else if (it->what == IT_COMPOSITION && it->cmp_it.ch < 0)
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]