From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Crash with --enable-checking and some glyphs Date: Fri, 26 Nov 2021 17:00:29 +0200 Message-ID: <838rxb2c8i.fsf@gnu.org> References: <87h7c1u0cg.fsf@gnus.org> <87czmpu0ae.fsf@gnus.org> <87wnkxskvn.fsf@gnus.org> <87zgpt63m3.fsf@gnus.org> <83mtlt8vil.fsf@gnu.org> <87v90h6271.fsf@gnus.org> <83lf1d8uyw.fsf@gnu.org> <87r1b561kn.fsf@gnus.org> <871r35ziyl.fsf@gnus.org> <87sfvlwkrc.fsf_-_@gnus.org> <87sfvlh1zo.fsf@gmail.com> <87h7c0flfk.fsf@gnus.org> <874k807166.fsf@gmail.com> <87wnkwb8q7.fsf@gnus.org> <87sfvkb85w.fsf@gnus.org> <83wnkw469i.fsf@gnu.org> <87ee739kjx.fsf@gnus.org> <83h7bz2i9f.fsf@gnu.org> <87mtlrt2ei.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21564"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 26 16:02:04 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mqcjk-0005Qj-AA for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Nov 2021 16:02:04 +0100 Original-Received: from localhost ([::1]:48088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqcji-0003vU-W8 for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Nov 2021 10:02:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqciB-0002yM-SZ for emacs-devel@gnu.org; Fri, 26 Nov 2021 10:00:29 -0500 Original-Received: from [2001:470:142:3::e] (port=58852 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqciB-0007yS-8k; Fri, 26 Nov 2021 10:00:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=I2LoxGcZG23tbPwaG3d2TlCV/XeguTQMN1Lt0quvNjA=; b=gqBJYuOGm1m6 s/ctg1T6aTIlnyH0ig4m15lNGADfd5ENDgiQiZPP7bcsTEwiL2fjcfrdManyMAj1b8LCLzzXwZv1n CSebfJqr7bcaBZq4Yu0hJ1gvjd9RDAONGf+e6nrAK+RgqyCmO7xolR1u+O136akvLwmcAnPT5vlVE 4qGpPH68JU6Ktj26ffkzc/FoxKbqImO4JRxyI4VhymuYv2XgJZj4e0VnhjFjqlj+XQz3+zR/A+GGi nuPK0Ly5Qr9MgeuVFK3FEZls6BMtSd8MmoxY7jMidL9zhjNqIwcf3WfzkBLl7pevgkXlEwfoluTjL ueFuVa6i4BDq9haaPidHsA==; Original-Received: from [87.69.77.57] (port=2689 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqci9-0007xj-Pg; Fri, 26 Nov 2021 10:00:27 -0500 In-Reply-To: <87mtlrt2ei.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 26 Nov 2021 15:30:45 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280251 Archived-At: > From: Lars Ingebrigtsen > 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.