From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65993: 29.1; emoji-insert show nothing without font settings Date: Sat, 16 Sep 2023 09:47:57 +0300 Message-ID: <83zg1mipgi.fsf@gnu.org> References: <83led7jvni.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28479"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65993@debbugs.gnu.org To: awrhygty@outlook.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 16 08:49:16 2023 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 1qhP7E-0007Cg-0z for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Sep 2023 08:49:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhP6v-0003EF-Dh; Sat, 16 Sep 2023 02:48:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhP6t-0003Dw-M5 for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 02:48:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhP6t-00081Y-E2 for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 02:48:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhP6z-0003nu-Ud for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 02:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Sep 2023 06:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65993 X-GNU-PR-Package: emacs Original-Received: via spool by 65993-submit@debbugs.gnu.org id=B65993.169484689914466 (code B ref 65993); Sat, 16 Sep 2023 06:49:01 +0000 Original-Received: (at 65993) by debbugs.gnu.org; 16 Sep 2023 06:48:19 +0000 Original-Received: from localhost ([127.0.0.1]:45266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhP6I-0003lE-QA for submit@debbugs.gnu.org; Sat, 16 Sep 2023 02:48:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhP6F-0003kG-4d for 65993@debbugs.gnu.org; Sat, 16 Sep 2023 02:48:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhP62-0007pO-PN; Sat, 16 Sep 2023 02:48:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KacdXpXwANTBPYAKUVh4cb3A0Qy0EsjvrdvA6yohrR4=; b=CEm8Xk9tpgAQ CToqjxIMxEdgMBtUje473oEcDorldJ6Q//7NTj5PhqOTReSqBZ+RsU/FTEVMNZ6YPaaPdUL30GSeq t6h6i+dvADjD4utdIcRkZGMZLrc35RlOqqxPffgVhtYo7eF+6nS6oZTnLROnE1MBtI8JcB6a9RItW wJi8SgoiGM4xtM0nXs9cgHoET27fb/dlVjMWzBEYMavTLjNczVIZdfrx4dzSWtBb8eO/LCJSkYaFk gqVoqWHkAG5m/7tEjA+sEmCtjTf2acy+1uwWPCe/kz2W2VwVQpXMz6lHWN7hXalEK7vfTngzCBLVn y/dBGQh+XoZ+C0mseQ+KRg==; In-Reply-To: (awrhygty@outlook.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270584 Archived-At: > From: awrhygty@outlook.com > Cc: 65993@debbugs.gnu.org > Date: Sat, 16 Sep 2023 15:12:42 +0900 > > Eli Zaretskii writes: > > >> And once emoji-insert is called before font setting, > >> emoji-insert does not show emoji items after they are made visible in > >> emacs buffer with font settings. > > > > This is not a bug: you need to clear the font cache to get Emacs to > > react to newly-installed fonts without restarting Emacs. Like this: > > > > M-: (clear-font-cache) RET > > Evaluating (clear-font-cache) have no effect on emoji-insert. > Perhaps menu items are cached in another place. Maybe. You can also try clear-composition-cache. If that doesn't help either, just restart the session. Installing new fonts and reconfiguring fontsets while running Emacs is not fully supported, due to many caches we have for fonts and compositions. > >> Here is a sample setting to display emojis: > >> (set-fontset-font nil '(#x1f000 . #x1faff) "Segoe UI Emoji") > > > > Segoe UI Emoji is not a free font, so we cannot advertise it in Emacs. > > You could tell Emacs about any fonts you have that support Emoji by > > using the function w32-find-non-USB-fonts, see its doc string for > > details. > > Segoe UI was an only font for most of emojis installed in my PC. > In this case, I think emacs should find the font by default. It cannot, not without help (or opening each and every font, which would be prohibitively expensive), because the fonts don't announce support for Emoji in the Unicode Subset Bits, which are used on Windows to decide which fonts support a given script. That's why Emacs has the w32-find-non-USB-fonts function: it configures the font search algorithm to consider fonts that support scripts, such as Emoji, which don't have those bits allocated to them. You need to run that function just once, and as long as you don't install new fonts, you can keep its result in your .emacs. > > In addition, Emacs 29 comes pre-configured to use the Noto Emoji font > > on MS-Windows for showing Emoji, but you need to install that font > > first. > > Is Noto Color Emoji font is supported by emacs on MS-Windows? No. But Noto Emoji, the black-and-white variant, is supported, and Emacs will use it for Emoji if it's installed.