From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#57066: 29.0.50; Complex emoji overlaps with text Date: Thu, 11 Aug 2022 15:01:31 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <87r11pzsgb.fsf@protesilaos.com> <83iln1vfbl.fsf@gnu.org> <87o7wtzmdn.fsf@protesilaos.com> <837d3hvd5j.fsf@gnu.org> <87lerxzim5.fsf@protesilaos.com> <835yj1v1vy.fsf@gnu.org> <87czd9pc9z.fsf@protesilaos.com> <83iln1tjap.fsf@gnu.org> <877d3hpb55.fsf@protesilaos.com> <83bkstti9j.fsf@gnu.org> <87bkssn60s.fsf@protesilaos.com> <83zggcqnvz.fsf@gnu.org> <87edxnqv88.fsf@protesilaos.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35609"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Eli Zaretskii , 57066@debbugs.gnu.org To: Protesilaos Stavrou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 11 08:03:15 2022 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 1oM1Hm-00093Q-VH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Aug 2022 08:03:14 +0200 Original-Received: from localhost ([::1]:44388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oM1Hl-0002ET-H7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Aug 2022 02:03:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM1Gc-0001YQ-Jp for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2022 02:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oM1Gc-0004ji-93 for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2022 02:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oM1Gc-0004PR-2e for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2022 02:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Aug 2022 06:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57066 X-GNU-PR-Package: emacs Original-Received: via spool by 57066-submit@debbugs.gnu.org id=B57066.166019769816894 (code B ref 57066); Thu, 11 Aug 2022 06:02:02 +0000 Original-Received: (at 57066) by debbugs.gnu.org; 11 Aug 2022 06:01:38 +0000 Original-Received: from localhost ([127.0.0.1]:51175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oM1GD-0004OQ-Py for submit@debbugs.gnu.org; Thu, 11 Aug 2022 02:01:38 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:57996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oM1GB-0004OC-DZ for 57066@debbugs.gnu.org; Thu, 11 Aug 2022 02:01:36 -0400 Original-Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 0AE5EF08E4; Thu, 11 Aug 2022 15:01:32 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <87edxnqv88.fsf@protesilaos.com> 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:239329 Archived-At: On Thu, 11 Aug 2022 13:07:03 +0900, Protesilaos Stavrou wrote: >=20 > > From: Eli Zaretskii > > Date: Wed, 10 Aug 2022 15:33:20 +0300 >=20 > >> > strange. What is the default value? That is > >> > > >> > M-: (default-value 'buffer-file-coding-system) RET > >>=20 > >> It is nil. > > > > But of course. Should be fixed now, thanks. >=20 > Thank you! The C-u C-x =3D works now. >=20 > Back to my original recipe then: >=20 > - C-x 8 e s > - Type "sun" and RET > - C-b > - C-u C-x =3D >=20 > This gives me the following Help buffer: >=20 > position: 152 of 153 (99%), column: 6 > character: =E2=98=80 (displayed as =E2=98=80) (codepoint = 9728, #o23000, #x2600) > charset: unicode (Unicode (ISO10646)) > code point in charset: 0x2600 > script: symbol > syntax: w which means: word > category: .:Base, j:Japanese > to input: type "C-x 8 RET 2600" or "C-x 8 RET BLACK SUN = WITH RAYS" > buffer code: #xE2 #x98 #x80 > file code: not encodable by coding system nil > display: composed to form "=E2=98=80=EF=B8=8F" (see bel= ow) >=20 > Composed with the following character(s) "=EF=B8=8F" using this font: > ftcrhb:-GOOG-Noto Color Emoji-regular-normal-normal-*-13-*-*-*-m-0-= iso10646-1 > by these glyphs: > [0 1 9728 59 16 0 17 13 4 [0 0 2]] > with these character(s): > =EF=B8=8F (#xfe0f) VARIATION SELECTOR-16 >=20 > Character code properties: customize what to show > name: BLACK SUN WITH RAYS > general-category: So (Symbol, Other) > decomposition: (9728) ('=E2=98=80') >=20 > There are text properties here: > fontified t >=20 >=20 > I also attach a screenshot where the coloured sun overlaps with a double > quotes character. >=20 > --=20 > Protesilaos Stavrou > https://protesilaos.com It seems that position unit adjustment for bitmap fonts is no longer necessary on HarfBuzz 5: https://github.com/harfbuzz/harfbuzz/issues/489 Could you test if the following patch works? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 39ea068556..42610ccd9d 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -273,7 +273,8 @@ ftcrfont_open (struct frame *f, Lisp_Object entity, int= pixel_size) #ifdef HAVE_HARFBUZZ ftcrfont_info->hb_font =3D NULL; #endif /* HAVE_HARFBUZZ */ - if (ft_face->units_per_EM) + if (hb_version_atleast (5, 0, 0) + || ft_face->units_per_EM) ftcrfont_info->bitmap_position_unit =3D 0; else ftcrfont_info->bitmap_position_unit =3D (extents.height diff --git a/src/ftfont.h b/src/ftfont.h index f771dc159b..5248aef649 100644 --- a/src/ftfont.h +++ b/src/ftfont.h @@ -66,7 +66,9 @@ #define EMACS_FTFONT_H cairo_scaled_font_t *cr_scaled_font; /* Scale factor from the bitmap strike metrics in 1/64 pixels, used as the hb_position_t value in HarfBuzz, to those in (scaled) - pixels. The value is 0 for scalable fonts. */ + pixels. The value is 0 for scalable fonts. This is only + necessary for HarfBuzz prior to version 5, and the value is + always 0 on later versions. */ double bitmap_position_unit; /* Font metrics cache. */ struct font_metrics **metrics;