unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Protesilaos Stavrou <info@protesilaos.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 57976@debbugs.gnu.org
Subject: bug#57976: 29.0.50; Complex emoji have extra spacing
Date: Thu, 22 Sep 2022 11:00:15 +0900	[thread overview]
Message-ID: <wltu50uq1c.wl-mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <87illgq1qf.fsf@protesilaos.com>

On Wed, 21 Sep 2022 22:46:32 +0900,
Protesilaos Stavrou wrote:
> 
> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Date: Wed, 21 Sep 2022 15:35:02 +0200
> >
> > Protesilaos Stavrou <info@protesilaos.com> writes:
> >
> >> I have no reproducible recipe with harfbuzz 5.2.0 beside Emacs.  I wrote
> >> the M-x emoji-list buffer to a file and visited it with a generic text
> >> editor: the display looks fine.
> >
> > If you take one of the emojis that displayed correctly and one that was
> > wrong and then say
> >
> > (string-pixel-width "😶‍🌫️")
> >
> > on both -- what does that return?  From the display, it kinda looked
> > like Emacs thought that some of the glyphs were really wide.
> 
> I get these:
> 
>     (string-pixel-width "😶‍🌫️")
>     ;; => 136
> 
>     (string-pixel-width "🤣")
>     ;; => 16

Hmm, the fix for Bug#57066 needs to be undone for HarfBuzz 5.2.0.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index e089f9dea8..a02ff99870 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -679,8 +679,12 @@ ftcrhbfont_begin_hb_font (struct font *font, double *position_unit)
   hb_font_t *hb_font = fthbfont_begin_hb_font (font, position_unit);
   /* HarfBuzz 5 correctly scales bitmap-only fonts without position
      unit adjustment.
-     (https://github.com/harfbuzz/harfbuzz/issues/489) */
-  if (!hb_version_atleast (5, 0, 0)
+     (https://github.com/harfbuzz/harfbuzz/issues/489)
+
+     Update: HarfBuzz 5.2.0 no longer does this for an hb_font_t font
+     object created from a given FT_Face.
+     (https://github.com/harfbuzz/harfbuzz/issues/3788) */
+  if ((hb_version_atleast (5, 2, 0) || !hb_version_atleast (5, 0, 0))
       && ftcrfont_info->bitmap_position_unit)
     *position_unit = ftcrfont_info->bitmap_position_unit;
 





  parent reply	other threads:[~2022-09-22  2:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 10:17 bug#57976: 29.0.50; Complex emoji have extra spacing Protesilaos Stavrou
2022-09-21 10:30 ` Lars Ingebrigtsen
2022-09-21 10:48   ` Protesilaos Stavrou
2022-09-21 10:53     ` Lars Ingebrigtsen
2022-09-21 13:20       ` Protesilaos Stavrou
2022-09-21 13:35         ` Lars Ingebrigtsen
2022-09-21 13:46           ` Protesilaos Stavrou
2022-09-21 14:03             ` Lars Ingebrigtsen
2022-09-22  2:00             ` YAMAMOTO Mitsuharu [this message]
2022-09-22  7:08               ` Eli Zaretskii
2022-09-23  5:21                 ` YAMAMOTO Mitsuharu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wltu50uq1c.wl-mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=57976@debbugs.gnu.org \
    --cc=info@protesilaos.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).