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.bugs Subject: bug#61196: 30.0.50; X11 rendering of horizontal line in log-edit mode fails with some fonts Date: Wed, 01 Feb 2023 14:19:01 +0200 Message-ID: <83bkmd1sui.fsf@gnu.org> References: <877cx3xg24.fsf@secretsauce.net> <87ilgmxjff.fsf@yahoo.com> <83cz6u12ft.fsf@gnu.org> <87edraxd98.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4323"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61196@debbugs.gnu.org, dima@secretsauce.net To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 01 13:21:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pNC6y-0000sR-Bn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Feb 2023 13:21:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNC6k-0002DZ-Po; Wed, 01 Feb 2023 07:20:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNC5w-0001yS-QM for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 07:20:19 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNC5r-00042K-1G for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 07:20:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNC5q-00022d-Fa for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2023 07:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Feb 2023 12:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61196 X-GNU-PR-Package: emacs Original-Received: via spool by 61196-submit@debbugs.gnu.org id=B61196.16752539537778 (code B ref 61196); Wed, 01 Feb 2023 12:20:02 +0000 Original-Received: (at 61196) by debbugs.gnu.org; 1 Feb 2023 12:19:13 +0000 Original-Received: from localhost ([127.0.0.1]:56665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNC52-00021O-UK for submit@debbugs.gnu.org; Wed, 01 Feb 2023 07:19:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNC51-00021C-FI for 61196@debbugs.gnu.org; Wed, 01 Feb 2023 07:19:11 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNC4w-0003n4-0g; Wed, 01 Feb 2023 07:19:06 -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=jbUOR5NHuXTtYmFAn80vbad4V6jCFgU988Bf/0OJG24=; b=mGyWEcY5appN rBXB3erMiULdWzhzAV0Mf7c8KCaXYcbDWYuu8iUH7bD9d1agdqGrgLEXGAH1eij1gYZnj+lI2QQvd VhiB8Jfimzg5PQ2Bge8bAyUZAiYdn1BlMiu3YJW4R8ImcxszNM3oahAQWWxc0ztGANHFlaKTWalna W4kCHmsPG/Y1Ax+VEzIlTmKizDfpxtXnZzXizNES5/EZ6U+B2aAN/3YkyUgouBNflLsC3FX6DviTg 0woQRntzASfMDLmazc1aotJQupbNjsGsEV4/Mqc4H2pDDjqvT7cAMbGqMtSUJflL5QU7/pf+z9DBy uYMCd8ojegr8jtDi74Bw9Q==; Original-Received: from [87.69.77.57] (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 1pNC4t-0005lR-7f; Wed, 01 Feb 2023 07:19:05 -0500 In-Reply-To: <87edraxd98.fsf@yahoo.com> (message from Po Lu on Wed, 01 Feb 2023 11:42:27 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254571 Archived-At: > From: Po Lu > Cc: dima@secretsauce.net, 61196@debbugs.gnu.org > Date: Wed, 01 Feb 2023 11:42:27 +0800 > > Eli Zaretskii writes: > > >> Cc: 61196@debbugs.gnu.org > >> Date: Wed, 01 Feb 2023 09:29:08 +0800 > >> From: Po Lu via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> When I last investigated this problem (I use the X core font backend all > >> the time), it was that X fonts typically have no glyph for the newline > >> character, which Emacs seems to expect. > > > > No, Emacs doesn't use the glyph for newline. It starts a new screen > > line instead. But that requires the default face to have a valid > > font, AFAIU. > > Well, when I made xfont_has_char and xfont_encode_char return a working > glyph for newline, that started working as expected. > > But it's been so long that I've forgotten the details. Or maybe I'm missing something: I don't really see the problem with the newline character, I see the same problem with other (ASCII) characters. And there's this part of gui_produce_glyphs, which is done before Emacs even considers what kind of character it has to display: 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); eassert (it->what == IT_GLYPHLESS); produce_glyphless_glyph (it, true, STRINGP (acronym) ? acronym : Qnil); goto done; }