[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crash with --enable-checking and some glyphs
From: |
Eli Zaretskii |
Subject: |
Re: Crash with --enable-checking and some glyphs |
Date: |
Fri, 26 Nov 2021 17:00:29 +0200 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: rpluim@gmail.com, emacs-devel@gnu.org
> Date: Fri, 26 Nov 2021 15:30:45 +0100
>
> (gdb) p it->what
> $1 = IT_CHARACTER
> (gdb) p/x it->c
> $2 = 0xace0
> (gdb) pgrowx it->glyph_row
> TEXT: 2 glyphs
> 0 0: CHAR[^] pos=1 blev=0,btyp=L w=22 a+d=35+9 MB
> 1 22: CHAR[0xace0] pos=2 blev=0,btyp=L w=24 a+d=25+-1 face=21 MB
OK, so the glyph for this character, U+ACE0, comes out with a negative
descent value of -1.
Please run Emacs again, under GDB, with a breakpoint like this:
(gdb) break xdisp.c:30866 if it->c == 0xace0
The breakpoint should be on the line shown with "<<<<" below:
void
gui_produce_glyphs (struct it *it)
{
int extra_line_spacing = it->extra_line_spacing;
it->glyph_not_available_p = false;
if (it->what == IT_CHARACTER)
{
unsigned char2b;
struct face *face = FACE_FROM_ID (it->f, it->face_id);
struct font *font = face->font;
struct font_metrics *pcm = NULL;
int boff; /* Baseline offset. */
if (font == NULL) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
{
/* When no suitable font is found, display this character by
the method specified in the first extra slot of
Vglyphless_char_display. */
Lisp_Object acronym = lookup_glyphless_char_display (-1, it);
Then step with the "next" command through the code there, and see
where it->descent gets its negative value. In particular, when you
get to this part:
if (get_char_glyph_code (it->char_to_display, font, &char2b))
{
pcm = get_per_char_metric (font, &char2b);
if (pcm->width == 0
&& pcm->rbearing == 0 && pcm->lbearing == 0)
pcm = NULL;
}
if (pcm)
{
it->phys_ascent = pcm->ascent + boff;
it->phys_descent = pcm->descent - boff;
it->pixel_width = pcm->width;
please tell what are the values of pcm->ascent and pcm->descent.
I want to know whether the font is the culprit or some code of ours
overrides the value from the font. Then we can devise the solution.
Thanks.
- Re: Crash with --enable-checking and some glyphs, (continued)
- Re: Crash with --enable-checking and some glyphs, Gregory Heytings, 2021/11/25
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/25
- Re: Crash with --enable-checking and some glyphs, Gregory Heytings, 2021/11/25
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/25
- Re: Crash with --enable-checking and some glyphs, Gregory Heytings, 2021/11/25
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/25
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/26
- Re: Crash with --enable-checking and some glyphs,
Eli Zaretskii <=
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Po Lu, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Gregory Heytings, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Gregory Heytings, 2021/11/27