GNU bug report logs - #52542
29.0.50; Emoji makes lines taller

Previous Next

Package: emacs;

Reported by: Rudolf Adamkovič <salutis <at> me.com>

Date: Thu, 16 Dec 2021 08:29:01 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rudolf Adamkovič <salutis <at> me.com>
Cc: 52542 <at> debbugs.gnu.org
Subject: bug#52542: 29.0.50; Emoji makes lines taller
Date: Sat, 18 Dec 2021 08:38:09 +0200
> From: Rudolf Adamkovič <salutis <at> me.com>
> Cc: 52542 <at> 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.




This bug report was last modified 3 years and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.