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#52542: 29.0.50; Emoji makes lines taller Date: Sat, 18 Dec 2021 08:38:09 +0200 Message-ID: <83czluct9q.fsf@gnu.org> References: <83sfutgd78.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37222"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52542@debbugs.gnu.org To: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 18 07:40:20 2021 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 1myTOF-0009Xq-9D for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Dec 2021 07:40:19 +0100 Original-Received: from localhost ([::1]:49502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myTOD-0008HS-5C for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Dec 2021 01:40:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myTN1-0008HK-0V for bug-gnu-emacs@gnu.org; Sat, 18 Dec 2021 01:39:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myTN0-0007Mw-Nw for bug-gnu-emacs@gnu.org; Sat, 18 Dec 2021 01:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myTN0-0007PE-EB for bug-gnu-emacs@gnu.org; Sat, 18 Dec 2021 01:39: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: Sat, 18 Dec 2021 06:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52542 X-GNU-PR-Package: emacs Original-Received: via spool by 52542-submit@debbugs.gnu.org id=B52542.163980950928427 (code B ref 52542); Sat, 18 Dec 2021 06:39:02 +0000 Original-Received: (at 52542) by debbugs.gnu.org; 18 Dec 2021 06:38:29 +0000 Original-Received: from localhost ([127.0.0.1]:41131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myTMT-0007OR-DU for submit@debbugs.gnu.org; Sat, 18 Dec 2021 01:38:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myTMS-0007OF-3x for 52542@debbugs.gnu.org; Sat, 18 Dec 2021 01:38:28 -0500 Original-Received: from [2001:470:142:3::e] (port=37898 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 1myTMM-0007Kr-M9; Sat, 18 Dec 2021 01:38:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Gh9CFwgPNes79wuyeP/GP6u22F4N1NtWY/Ff7ujfK4w=; b=YYZ76Vu7htLnL14N5gwW nZtZb1DarS0tnmPJk4/SvnCxhHSsJmGLFEuBzuaADcxtxJyd4jxUP0wWUq5yT5pW1zHhhcgFJjT9i fd4pxY8uFSG2iyphL7RNHSR2XQ650uPKZeNm86Xh/8GXXpvCCL72zilwEZYMYhu27xccvC2ZBhVil fMNiIcR1fNau70O4OCK+2aYH6BojO1s4bBJOjJh2TQ3vSqXHunqtSUBSAOWE/TaJ1sLIhJEXqGkYP raVQ8KXf+D3ReoBCfTgUXkhhNfFVfSNv7pps5QNdyml5T7wsg5No5huQE8UptywJiXgatr2niSXS5 rI1GnXkrm9kBaQ==; Original-Received: from [87.69.77.57] (port=3618 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 1myTMM-0007tg-G6; Sat, 18 Dec 2021 01:38:22 -0500 In-Reply-To: (message from Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= on Fri, 17 Dec 2021 22:57:54 +0100) 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" Xref: news.gmane.io gmane.emacs.bugs:222593 Archived-At: > From: Rudolf Adamkovič > Cc: 52542@debbugs.gnu.org > Date: Fri, 17 Dec 2021 22:57:54 +0100 > > > Your expectations are unfounded, IMO. Emacs cannot possibly change > > the fonts you have on your system, and cannot truncate glyphs of the > > Emoji characters if they are taller than the font used for the default > > face. So it has no alternative but to make the line's height larger. > > Interesting. I based my expectation on the built-in Terminal > application on macOS. It uses the same default font as Emacs, yet > emojis do not change the height of its lines. If you can look into its sources and tell what is it doing, we could perhaps use some of those ideas, if they fit how Emacs works with fonts. The main issue here is not the default font, it's the font used for Emoji; I believe it's a different font in both cases. > Cannot Emacs, when defaulting to "Apple Color Emoji", make the emojis a > bit smaller? Terminal seems to do that. The Emoji come out as small or as large as the font tells us: the metrics of each glyph are dictated by the font. Emacs selects an Emoji (and any other) font's size to match as well as possible the size of the default face's font, so Emacs attempts to make the size the same up front. It is possible that we somehow miscalculate the size, or fail to find the right match, or something like that. But once the font matching the default face's size is selected, Emacs never changes the metrics of the font glyphs as provided by the font.