GNU bug report logs -
#57976
29.0.50; Complex emoji have extra spacing
Previous Next
Reported by: Protesilaos Stavrou <info <at> protesilaos.com>
Date: Wed, 21 Sep 2022 10:18:02 UTC
Severity: normal
Merged with 59606
Found in version 29.0.50
Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Wed, 21 Sep 2022 22:46:32 +0900,
Protesilaos Stavrou wrote:
>
> > From: Lars Ingebrigtsen <larsi <at> gnus.org>
> > Date: Wed, 21 Sep 2022 15:35:02 +0200
> >
> > Protesilaos Stavrou <info <at> 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 <at> 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;
This bug report was last modified 2 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.