From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0_?= =?UTF-8?Q?=E0=A4=B8=E0=A4=BF=E0=A4=82=E0=A4=B9?= Sameer Singh Newsgroups: gmane.emacs.bugs Subject: bug#58184: Faulty font selection for Latin characters Date: Fri, 30 Sep 2022 18:05:02 +0530 Message-ID: References: <831qrtflg3.fsf@gnu.org> <83h70pdqx0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000baa43f05e9e43996" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9252"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58184@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 30 14:45:02 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 1oeFO1-0002FQ-RZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Sep 2022 14:45:01 +0200 Original-Received: from localhost ([::1]:51660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeFO0-0006w1-8N for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Sep 2022 08:45:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeFFK-0007bI-PJ for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 08:36:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oeFFK-0003zK-8G for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 08:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oeFFK-0001Es-37 for bug-gnu-emacs@gnu.org; Fri, 30 Sep 2022 08:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0_?= =?UTF-8?Q?=E0=A4=B8=E0=A4=BF=E0=A4=82=E0=A4=B9?= Sameer Singh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Sep 2022 12:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58184 X-GNU-PR-Package: emacs Original-Received: via spool by 58184-submit@debbugs.gnu.org id=B58184.16645413224712 (code B ref 58184); Fri, 30 Sep 2022 12:36:02 +0000 Original-Received: (at 58184) by debbugs.gnu.org; 30 Sep 2022 12:35:22 +0000 Original-Received: from localhost ([127.0.0.1]:40697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeFEg-0001Dv-2M for submit@debbugs.gnu.org; Fri, 30 Sep 2022 08:35:22 -0400 Original-Received: from mail-yw1-f174.google.com ([209.85.128.174]:38468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeFEd-0001Db-Ed for 58184@debbugs.gnu.org; Fri, 30 Sep 2022 08:35:20 -0400 Original-Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-3321c2a8d4cso42877057b3.5 for <58184@debbugs.gnu.org>; Fri, 30 Sep 2022 05:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=JgQU1WEii9ucBw0EIlxY9U/gfS5QDCauzrUR9EPJ+Yc=; b=i6Y02zSMCdHajQohmGA7TRLXy472ygepnryrugBF5EnGzxhwTtTiXcyn783BigS2eQ fNrtnNYu/Cr08Jz8vtItSRjB3XWzmpN2+pex2X6c1OUIxNkw96cABVbAZzw1LZLsyMt8 b6TMJ7Y5Bq1rE6gE09/klKutThsE0e1j5uRp4FtiW7VRqfZRmUVC1JKXUdkWmhbwOF7l fApQ4GkqOOFm8eDoIuIq92+VFmXcJx4w7vOiCNl8X8Ld5kET4VQImAErqe6a9VXdB318 Rs7ain2JMw9+T/qK/L3vQrejS0fGXjo4V1osYun9E5zRChrAxY5LSMF5FanHyuhBbg+N m/wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=JgQU1WEii9ucBw0EIlxY9U/gfS5QDCauzrUR9EPJ+Yc=; b=wsJiYM+QKZMlCC1G1175Y8aTrYfpG5L+fmKzMhTKCrybZ67JN9n338XI7rtgg1AzNA n3zZPrxPJaooPwgyo5eUBPhPCf5vpjT39ZyjtBPBgf/h3AUuLVsj2E6yKS7+0zkQ/rmZ tOyv/GM38KoG+F5InoCmZUSilVhA1mDvbj1mWJyvCxyTcUeB7GeMbwboOcav1LeJ1sNf vutQraWomBH3fkaHeTNMFG1ZFLQNDxVNjkGmOfIvtKs+cxvsMw/gFfV5rqHKFXPgcMjB NqI9D1APf3nLiWhaC27tL5QI8mn1wQy02Ju0XhMOta+iE2ebzCLFqpVBSz2Auwvlxe4X gHIg== X-Gm-Message-State: ACrzQf3uS4vgOeH+xcSE+qBE+el6NzS1YbXzEbjn8ATNGkNqZwFYcgcy gb5qGUWmAx4omoGnhqkv8D5eDmoGfdh4/cDQ3sUdT55eOsczmAIH X-Google-Smtp-Source: AMsMyM7czZDWSxURVegIW0MvQ9bZRDd8ByWEBP2uj/ZIyqf64UtTKltv45U2LeirXgrxri9I8d0QniDpx/cI8Zh2tdw= X-Received: by 2002:a81:1212:0:b0:353:941:ee19 with SMTP id 18-20020a811212000000b003530941ee19mr8476936yws.126.1664541313899; Fri, 30 Sep 2022 05:35:13 -0700 (PDT) In-Reply-To: <83h70pdqx0.fsf@gnu.org> 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:243995 Archived-At: --000000000000baa43f05e9e43996 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think I may have found the problem here, JetBrains Mono does not have the glyphs for these "faulty" characters that is why Emacs chooses a different font for them, but the thing is these characters can still be displayed in the correct font i.e. JetBrains Mono by combining the glyphs which made up the unsupported glyph, this is why hb-view was able to display them I guess. For example entering =E1=B9=83 (#x1e43 Latin small letter m with a dot belo= w) will result in it being displayed in a different font, but entering m=CC=A3 (m + #x323 Combining dot below) will result in it bein= g displayed with JetBrains Mono. So now the question is should these characters be decomposed to better fit with other characters when the font does not support them? On Fri, Sep 30, 2022 at 5:18 PM Eli Zaretskii wrote: > > From: =E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0 =E0=A4=B8=E0=A4=BF=E0=A4=82= =E0=A4=B9 Sameer Singh > > Date: Fri, 30 Sep 2022 16:53:01 +0530 > > Cc: 58184@debbugs.gnu.org > > > > Here are the steps to reproduce: > > 1. emacs -Q > > > > 2. enter these three words: > > h=E1=B9=9B=E1=B9=A3yatha (h#x1E5B#x1E63yatha) > > k=E1=B9=A3ipta=E1=B8=A5 (k#x1E63ipta#x1E25) > > vi=C5=9B=C4=81ma=E1=B8=A5 (vi#x015B#x0101ma#x1E25) > > > > At this stage everything is fine, all of the characters use the same > font therefore all of them return the same > > font after evaluating (font-at (point)) on them: > > # Pro-regular-normal-normal-*-32-*-*-*-m-0-iso10646-1"> > > > > 3. Now eval the following in the buffer > > (set-face-attribute 'default nil > > :font "JetBrains Mono" > > :weight 'regular > > :height 170) > > > > Now you'll notice that the font for some of the characters above are > different from JetBrainsMono, these > > characters are: > > =E1=B9=9B (#x1e5b) > > =E1=B9=A3 (#x1e63) > > =E1=B8=A5 (#x1e25) > > (font-at (point)) returns # > Mono-regular-normal-normal-*-57-*-*-*-*-0-iso10646-1"> on all of them > > while for the rest of the characters gives # > Mono-regular-normal-normal-*-57-*-*-*-m-0-iso10646-1"> > > I downloaded the JetBrainsMono font, and I see that it doesn't have > glyphs for these characters. Its coverage of the Latin Extended > Additional block is only partial: only 97 out of 256 characters. > > So I think Emacs does TRT here, at least with this font I have here. > > In your original report you said the characters were supported by the > new default font, but that is not so in this detailed recipe. > > Or maybe you are using a different version of JetBrainsMono? I have > v2.242 here. > --000000000000baa43f05e9e43996 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think I may have found the problem here, JetBrains = Mono does not have the glyphs for these
"faulty" charac= ters that is why Emacs chooses a different font for them, but the thing is = these characters
can still be displayed in the correct font i.e. = JetBrains Mono by combining the glyphs which made up the
unsuppor= ted glyph, this is why hb-view was able to display them I guess.
= For example entering =E1=B9=83 (#x1e43 Latin small letter m with a dot belo= w) will result in it being displayed in a different font,
but ent= ering m=CC=A3 (m + #x323 Combining dot below) will result in it being displ= ayed with JetBrains Mono.

So now the question is s= hould these characters be decomposed to better fit with other characters wh= en the font does not support them?

On Fri, Sep 30, 2022 at 5:18 P= M Eli Zaretskii <eliz@gnu.org> wr= ote:
> From: = =E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0 =E0=A4=B8=E0=A4=BF=E0=A4=82=E0=A4=B9 S= ameer Singh <= lumarzeli30@gmail.com>
> Date: Fri, 30 Sep 2022 16:53:01 +0530
> Cc: 58184@d= ebbugs.gnu.org
>
> Here are the steps to reproduce:
> 1. emacs -Q
>
> 2. enter these three words:
> h=E1=B9=9B=E1=B9=A3yatha (h#x1E5B#x1E63yatha)
> k=E1=B9=A3ipta=E1=B8=A5 (k#x1E63ipta#x1E25)
> vi=C5=9B=C4=81ma=E1=B8=A5 (vi#x015B#x0101ma#x1E25)
>
> At this stage everything is fine, all of the characters use the same f= ont therefore all of them return the same
> font after evaluating (font-at (point)) on them:
> #<font-object "-ADBO-Source Code Pro-regular-normal-normal-*-3= 2-*-*-*-m-0-iso10646-1">
>
> 3. Now eval the following in the buffer
> (set-face-attribute 'default nil
>=C2=A0 =C2=A0 :font "JetBrains Mono"
>=C2=A0 =C2=A0 :weight 'regular
>=C2=A0 =C2=A0 :height 170)
>
> Now you'll notice that the font for some of the characters above a= re different from JetBrainsMono, these
> characters are:
> =E1=B9=9B (#x1e5b)
> =E1=B9=A3 (#x1e63)
> =E1=B8=A5 (#x1e25)
> (font-at (point)) returns #<font-object "-UKWN-Latin Modern > Mono-regular-normal-normal-*-57-*-*-*-*-0-iso10646-1"> on all = of them
> while for the rest of the characters gives #<font-object "-JB-= JetBrains
> Mono-regular-normal-normal-*-57-*-*-*-m-0-iso10646-1">

I downloaded the JetBrainsMono font, and I see that it doesn't have
glyphs for these characters.=C2=A0 Its coverage of the Latin Extended
Additional block is only partial: only 97 out of 256 characters.

So I think Emacs does TRT here, at least with this font I have here.

In your original report you said the characters were supported by the
new default font, but that is not so in this detailed recipe.

Or maybe you are using a different version of JetBrainsMono?=C2=A0 I have v2.242 here.
--000000000000baa43f05e9e43996--