From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Will Chang Newsgroups: gmane.emacs.bugs Subject: bug#54441: 28.0.92; set-language-environment causes Apple Color Emoji cannot show up Date: Sat, 19 Mar 2022 16:51:31 +0800 Message-ID: References: <83a6dnhhxt.fsf@gnu.org> <83mthmfn6w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004fdc5d05da8e5fb4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21047"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mituharu+bug-gnu-emacs-mac@math.s.chiba-u.ac.jp, 54441@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 19 09:52:12 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 1nVUol-0005Ig-ST for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Mar 2022 09:52:11 +0100 Original-Received: from localhost ([::1]:59504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVUok-0007LV-L9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Mar 2022 04:52:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVUoc-0007LJ-Hv for bug-gnu-emacs@gnu.org; Sat, 19 Mar 2022 04:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVUoc-0001cL-7r for bug-gnu-emacs@gnu.org; Sat, 19 Mar 2022 04:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVUob-0000ly-WB for bug-gnu-emacs@gnu.org; Sat, 19 Mar 2022 04:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Will Chang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Mar 2022 08:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54441 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 54441-submit@debbugs.gnu.org id=B54441.16476799112949 (code B ref 54441); Sat, 19 Mar 2022 08:52:01 +0000 Original-Received: (at 54441) by debbugs.gnu.org; 19 Mar 2022 08:51:51 +0000 Original-Received: from localhost ([127.0.0.1]:58970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVUoQ-0000lV-M1 for submit@debbugs.gnu.org; Sat, 19 Mar 2022 04:51:51 -0400 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:46600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVUoP-0000lF-1o for 54441@debbugs.gnu.org; Sat, 19 Mar 2022 04:51:49 -0400 Original-Received: by mail-ej1-f49.google.com with SMTP id qx21so20944089ejb.13 for <54441@debbugs.gnu.org>; Sat, 19 Mar 2022 01:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KON9gHcKfwK7wsF9VyByq2OvsFF/mGHFwKILk4WFsmI=; b=FtGfKrClznuFc7muqc/+lIEX+Tr+Xx+BK1oruzc0ufw+jkx4RJji5yMEqyZp6tlKom yq1kpoDzzeCT/HE3E7akzZb4gqDrdGFVryCAcVDhdOND8pj7NJdGTG+jpV2XbRt5DxBc CwwYuB8hPjH8QYetzd38zuK5hePv8Qqv2Y++9YKtAYNdePmsqr6XleNoj9riSCNV+3gR ljGeka7HzL1OzSXZtNb9YOaGFJPyLJRJF/2IjQi63bXC1fwzDr+FxD91QSMZ5UzrZcR3 w5m5GnDFqX46igdQ5DFy0CWmYLLQXtmZc6GAc6KVpyZE+RbTIuTrFhaIyiOlY7bZwqB/ 3S0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KON9gHcKfwK7wsF9VyByq2OvsFF/mGHFwKILk4WFsmI=; b=Wou1t7RShYlA0NZATg0FcwST8hJdWAi66fX01PG0g0q7Urqd+0X5YUMekh4mkdMaev 2WQZwNVtFLG2fwzLEZVticUtpuYoJAAcUP/w7Www9ygMeT1BofpuFb/TMSbyUoing0LC n/Q4CT94Jl+WJ7xzhfJoAz40slrGhETP+7gyXDP58x2jw59IqUSY6kc+N5EB8cgyDq+w 6tqKGY1NHA8vzA18Q1LaebtnAmbJhz9yrnhOA50POu4eFDkcIGvfeLyHMrDR0WWXgXmP WghxBMrsNWcE3hLlsDleu9+DQrZXl4A9fohU/Klz0toRjJXTj08j6jsXhUAR3G4YA17z oASg== X-Gm-Message-State: AOAM532SRaarloe9iwCvPipSiOvSxuq8A0+V2rN7piZ49TBhHtyq1LzB 8arpHuJMBZRzyAM8sGAsduVS8nr1pWp4iotoa6ccWRwcFytIV6m9 X-Google-Smtp-Source: ABdhPJz6M+BFxtHQ7BEQwJbWD46RAygPWeFmO+5UkHPixBhzpRx7rHXYW4/TWI5vHBdtlxgX8/g6sYyWWvLnMOKj6BU= X-Received: by 2002:a17:907:2cc6:b0:6df:78bc:583c with SMTP id hg6-20020a1709072cc600b006df78bc583cmr12372892ejc.238.1647679902832; Sat, 19 Mar 2022 01:51:42 -0700 (PDT) In-Reply-To: <83mthmfn6w.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:228583 Archived-At: --0000000000004fdc5d05da8e5fb4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > So it's a "C" (a.k.a. "Posix") language environment, looks like. > Somewhat strange, but maybe this is "usual" on macOS? On the previous Emacs Mac Port versions, Emacs doesn't need to set the code below to enable Emoji and the UTF-8 environment doesn't affect it. (set-fontset-font "fontset-default" 'unicode "Apple Color Emoji" nil 'prepend) Maybe it's a bug on that port, I CC'ed the maintainer Mituharu. > What happens if you evaluate > > (set-fontset-font "fontset-default" 'unicode "Apple Color Emoji" nil 'prepend) > > again, after changing the language environment? It remains the same. > AFAICT, this shows that "incorrect" means Emacs uses the Symbola font. Thanks for the info. > Does Apple Color Emoji on your system have glyphs for the #x1F300 and > #x1F600 characters? Those are the characters we request to be > supported by a font that is used for emoji. I believe it has. Currently, I removed the UTF-8 code and set the Apple Color Emoji font for = a temporary solution. Again, thanks for your help, I learned a lot with your conversation, you're so kind. ;) On Sat, Mar 19, 2022 at 2:53 PM Eli Zaretskii wrote: > [Please use Reply All so that the bug tracker is CC'ed.] > > > From: Will Chang > > Date: Sat, 19 Mar 2022 11:06:06 +0800 > > > > >does this happen in "emacs -Q", if you evaluate the above > > immediately upon entering Emacs? > > > > Yes. Tested it on: > > "GNU Emacs 28.0.92 (build 2, x86_64-apple-darwin21.4.0, Carbon Version > 165 > > AppKit 2113.4) > > of 2022-03-18" > > "GNU Emacs 28.0.92 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.= 60 > > Version 10.14.6 (Build 18G95)) > > of 2022-03-14" > > > > > what is the language environment before the evaluation of > > set-language-environment above? > > > > I run describe-language-environment and got: > > > > English language environment > > > > Nothing special is needed to handle English. > > > > Sample text: > > Hello!, Hi!, How are you? > > > > Input methods: > > programmer-dvorak ("DVP@" in mode line) > > english-dvorak ("DV@" in mode line) > > > > Character sets: > > ascii: ASCII (ISO646 IRV) > > > > Coding systems: > > nothing specific to English > > So it's a "C" (a.k.a. "Posix") language environment, looks like. > Somewhat strange, but maybe this is "usual" on macOS? > > > > what is the output of "M-x describe-fontset RET fontset-default RET" > > after evaluating set-language-environment, in particular in the > > Emoji block starting from #x1F600? > > > > =F0=9F=98=80 .. =F0=9F=99=8F (#x1F600 .. #x1F64F) > > -*-Apple Color Emoji-*-*-*-*-*-*-*-*-*-*-*-* > > -*-Noto Color Emoji-*-*-*-*-*-*-*-*-*-*-iso10646-1 > > -*-Symbola-*-*-*-*-*-*-*-*-*-*-iso10646-1 > > [-*-Symbola-normal-normal-semicondensed-*-12-*-*-*-p-0-iso10646-1] > > It sounds like Emacs used Symbola, although Apple Color Emoji is in > the list, and is first in the list. Which probably means Emacs > examined Apple Color Emoji and rejected it for some reason. > > What happens if you evaluate > > (set-fontset-font "fontset-default" 'unicode "Apple Color Emoji" nil > 'prepend) > > again, after changing the language environment? > > > >what did you mean by "emoji doesn't show up correctly"? how was it > > displayed "incorrectly"? > > > > The screenshots: > > - default: https://i.imgur.com/jLcwEDk.png > > - English with fontset(correctly): https://i.imgur.com/qgqhCHF.png > > - UTF-8 with fontset: https://i.imgur.com/tkjOVGv.png > > AFAICT, this shows that "incorrect" means Emacs uses the Symbola font. > > Does Apple Color Emoji on your system have glyphs for the #x1F300 and > #x1F600 characters? Those are the characters we request to be > supported by a font that is used for emoji. > --0000000000004fdc5d05da8e5fb4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> So it's a "C" (a.k.a. "Posix"= ) language environment, looks like.
> Somewhat= strange, but maybe this is "usual" on macOS?

<= div>On the previous Emacs Mac Port versions, Emacs doesn't need to set<= /div>
the code below to enable Emoji and the UTF-8 environment doesn= 9;t affect=C2=A0it.

=C2=A0 (set-fontset-font "fontset-default" 'unicode &quo= t;Apple Color Emoji" nil 'prepend)

Maybe it's a bug on that= port, I CC'ed=C2=A0the maintainer Mituharu.

<= br>
> What happens if you evaluate
>
>=C2=A0 =C2=A0(set-fontset-font "fontset-defa= ult" 'unicode "Apple Color Emoji" nil 'prepend)
>
> again, aft= er changing the language environment?
<= br>
It remains the same.

> AFAICT, th= is shows that "incorrect" means Emacs uses the Symbola font.
<= /div>

Thanks for the info.
> Does Apple Color Emoji on your system have glyphs for the = #x1F300 and
> #x1F600 characters?=C2=A0 Those = are the characters we request to be
> supporte= d by a font that is used for emoji.

I believe = it has.


Currently, I removed the UT= F-8 code and set the Apple Color Emoji font for a
temporary solut= ion.

Again, thanks for your help, I learned a lot = with=C2=A0your conversation, you're so kind. ;)

On Sat, Mar 19, 20= 22 at 2:53 PM Eli Zaretskii <eliz@gnu.or= g> wrote:
[Please use Reply All so that the bug tracker is CC'ed.]

> From: Will Chang <will.b.chang@gmail.com>
> Date: Sat, 19 Mar 2022 11:06:06 +0800
>
> >does this happen in "emacs -Q", if you evaluate the abov= e
> immediately upon entering Emacs?
>
> Yes. Tested it on:
> "GNU Emacs 28.0.92 (build 2, x86_64-apple-darwin21.4.0, Carbon Ve= rsion 165
> AppKit 2113.4)
>=C2=A0 of 2022-03-18"
> "GNU Emacs 28.0.92 (build 1, x86_64-apple-darwin18.7.0, NS appkit= -1671.60
> Version 10.14.6 (Build 18G95))
>=C2=A0 of 2022-03-14"
>
> > what is the language environment before the evaluation of
>=C2=A0 =C2=A0 =C2=A0set-language-environment above?
>
> I run describe-language-environment and got:
>
> English language environment
>
> Nothing special is needed to handle English.
>
> Sample text:
>=C2=A0 =C2=A0Hello!, Hi!, How are you?
>
> Input methods:
>=C2=A0 =C2=A0programmer-dvorak ("DVP@" in mode line)
>=C2=A0 =C2=A0english-dvorak ("DV@" in mode line)
>
> Character sets:
>=C2=A0 =C2=A0ascii: ASCII (ISO646 IRV)
>
> Coding systems:
>=C2=A0 =C2=A0nothing specific to English

So it's a "C" (a.k.a. "Posix") language environment= , looks like.
Somewhat strange, but maybe this is "usual" on macOS?

> > what is the output of "M-x describe-fontset RET fontset-defa= ult RET"
>=C2=A0 =C2=A0 =C2=A0after evaluating set-language-environment, in parti= cular in the
>=C2=A0 =C2=A0 =C2=A0Emoji block starting from #x1F600?
>
> =F0=9F=98=80 .. =F0=9F=99=8F (#x1F600 .. #x1F64F)
>=C2=A0 =C2=A0 =C2=A0-*-Apple Color Emoji-*-*-*-*-*-*-*-*-*-*-*-*
>=C2=A0 =C2=A0 =C2=A0-*-Noto Color Emoji-*-*-*-*-*-*-*-*-*-*-iso10646-1<= br> >=C2=A0 =C2=A0 =C2=A0-*-Symbola-*-*-*-*-*-*-*-*-*-*-iso10646-1
> [-*-Symbola-normal-normal-semicondensed-*-12-*-*-*-p-0-iso10646-1]

It sounds like Emacs used Symbola, although Apple Color Emoji is in
the list, and is first in the list.=C2=A0 Which probably means Emacs
examined Apple Color Emoji and rejected it for some reason.

What happens if you evaluate

=C2=A0 (set-fontset-font "fontset-default" 'unicode "App= le Color Emoji" nil 'prepend)

again, after changing the language environment?

> >what did you mean by "emoji doesn't show up correctly&quo= t;? how was it
>=C2=A0 =C2=A0 =C2=A0displayed "incorrectly"?
>
> The screenshots:
> - default: https://i.imgur.com/jLcwEDk.png
> - English with fontset(correctly): https://i.imgur.com/qgqhCHF.p= ng
> - UTF-8 with fontset: https://i.imgur.com/tkjOVGv.png

AFAICT, this shows that "incorrect" means Emacs uses the Symbola = font.

Does Apple Color Emoji on your system have glyphs for the #x1F300 and
#x1F600 characters?=C2=A0 Those are the characters we request to be
supported by a font that is used for emoji.
--0000000000004fdc5d05da8e5fb4--