From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#56691: outline-minor-mode displays navigation arrow buttons as emojis Date: Fri, 29 Jul 2022 14:48:01 +0200 Message-ID: <87sfmkjda6.fsf@gmail.com> References: <15cd39ee8fe919a8656095fbfa5ae85e@purelymail.com> <83k085lhj1.fsf@gnu.org> <87o7xg5ob9.fsf@gnus.org> <83tu78i9xz.fsf@gnu.org> <875yjo47a8.fsf@gnus.org> <83pmhwi8i7.fsf@gnu.org> <87k0842s4s.fsf@gnus.org> <83o7xgi53z.fsf@gnu.org> <87zggyyiy3.fsf@gnus.org> <874jz1wgzm.fsf@gnus.org> <83sfml8gez.fsf@gnu.org> <87czdom9w6.fsf@gnus.org> <83wnbw6r9o.fsf@gnu.org> Mime-Version: 1.0 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="2301"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 56691@debbugs.gnu.org, hello@paulwrankin.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 29 14:49: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 1oHPQZ-0000Sb-Ka for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 14:49:15 +0200 Original-Received: from localhost ([::1]:58604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHPQY-0007vt-B4 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Jul 2022 08:49:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHPQM-0007vB-HX for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 08:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42150) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHPQM-0004D3-91 for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 08:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHPQM-0004vu-3z for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 08:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jul 2022 12:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 56691-submit@debbugs.gnu.org id=B56691.165909889418893 (code B ref 56691); Fri, 29 Jul 2022 12:49:02 +0000 Original-Received: (at 56691) by debbugs.gnu.org; 29 Jul 2022 12:48:14 +0000 Original-Received: from localhost ([127.0.0.1]:60132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHPPZ-0004ue-U7 for submit@debbugs.gnu.org; Fri, 29 Jul 2022 08:48:14 -0400 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:34380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHPPX-0004u3-G1 for 56691@debbugs.gnu.org; Fri, 29 Jul 2022 08:48:13 -0400 Original-Received: by mail-wr1-f53.google.com with SMTP id h8so5896700wrw.1 for <56691@debbugs.gnu.org>; Fri, 29 Jul 2022 05:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc; bh=Mg25r91oRk4EblM+pqfYJOYHIFgyx/THzbB2nZxBgC0=; b=G0BDTV1athEtuJ9n1r6CAz47xZt0OPDWkLcPnBnRlayTqwPtxzeaw63D2xtOxIy4Br kKnjcbvpAhm04UlxFJZ4Qb4h/MpFk4VsEGk2iW8owjQQfB+bCzTuWC3zwlBYLJGsTpTW KBMrc7w8PItV/JtjiiDjKWgmbjW6iIF++q0b9zL7WDrMY4QEGrnJKCY1nhqSno/KDQbE I74TXbj0MLRYvFIkh29GHaK7emfyfwXRW0vCimUauAFeVX7uB6Mzzx6q2O566FyBO1b1 RsJ7+tNyM/+lBoGAgyoo2HDQL8o9tl4PbSbTErhfz2tUlMVvARMLSorG8ce9O5KeOJnY EMTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Mg25r91oRk4EblM+pqfYJOYHIFgyx/THzbB2nZxBgC0=; b=04+LYQHS8DGLH+aFs35btdS4xZHyhhhDQdfjyMg4v47XX5rmyuyhIUMgnLPznhoZs4 bb1bsaCqqkBt5s6u1WlbSrNAPKYh+xJLNNssNKuXtA58vX2GndzN3erYtrris3hbxQz7 cFoIeXcRKqsZilokmYs9wh7+KLAShwopNpAUj6vLOvRYxwpiao1Ba6WFecsMrNuTgUij bIhK3W7ni8+97hO4q/rlUUGNBQ0ocoPfm2AIt09FD3xJVHWbWB1+pHuZEDH75fVObN4n X4jkDasP8Dv97jqE+LDddLl8pat/4I3f82WtYChPnPOlrcxyoo5wN+Le4ovV6HLe/guE FltA== X-Gm-Message-State: ACgBeo1S9mtofC9UM/jdTD6raKRdbKEfy/ViuD/IX63EM06ZZtFTz5Hf QB/n5MIEmAE8JgeHFCAEkNC7mUjDeKk= X-Google-Smtp-Source: AA6agR5X15CvZdXnZ2TnMMLrNTK3S/JN6xq72gvZ7bvkGLV0B5EHiAmRiM0uXiDutcWIoMEjXEnhCQ== X-Received: by 2002:a05:6000:16c9:b0:21e:60a2:ae9d with SMTP id h9-20020a05600016c900b0021e60a2ae9dmr2308297wrf.549.1659098883896; Fri, 29 Jul 2022 05:48:03 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:fab9:67b5:84fa:8161]) by smtp.gmail.com with ESMTPSA id f17-20020a5d50d1000000b0020d07d90b71sm3574405wrt.66.2022.07.29.05.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 05:48:02 -0700 (PDT) In-Reply-To: <83wnbw6r9o.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 29 Jul 2022 15:24:19 +0300") 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:238161 Archived-At: >>>>> On Fri, 29 Jul 2022 15:24:19 +0300, Eli Zaretskii said: >> From: Lars Ingebrigtsen >> Cc: hello@paulwrankin.com, 56691@debbugs.gnu.org >> Date: Fri, 29 Jul 2022 13:32:57 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> > The test for Emoji display is not accurate enough. Maybe we should >> > have a display-color-emoji-p predicate? I added a FIXME there. >>=20 >> Sounds like a good idea. What would that predicate look like? Eli> I think we can currently only do that by looking at the details of= the Eli> build. Currently, color Emoji are supported only by builds with C= airo Eli> and HarfBuzz on Unix and by macOS builds. Eli> But even that could be not enough, since the necessary font may no= t be Eli> installed. So here's another idea: use font-at to check that it Eli> returns one of the known color Emoji fonts for an Emoji character. Eli> For example: Eli> (font-get (font-at 0 nil "=F0=9F=98=84") :family) Eli> =3D> Symbola There are dozens if not hundreds of fonts capable of displaying colour emoji. You really want to list them all? Is it such a bad thing if we don=CA=BCt use the emoji when we could? Eli> We can then compare the value with a list of known families of fon= ts Eli> that support color Emoji. The downside of this is that it can look Eli> for and load a font, which could be slow, especially if font-at Eli> returns nil, meaning there's no font for the character. Eli> So bottom line, something like this: Eli> (defun display-color-emoji-p (&optional frame) Eli> "DOC" Eli> (and (display-multi-font-p frame) Eli> (let ((font-obj (font-at 0 (frame-selected-window frame) "=F0=9F= =98=84"))) Eli> (and (fontp font-at) Eli> (member (font-get font-obj :family) Eli> list-of-known-emoji-font-families))))) That will return nil here, but in this particular terminal emulator, colour emoji display fine. I=CA=BCve not been following, but I assume there=CA=BCs a "damn the torpedoes, I know what I=CA=BCm doing" option for = this stuff. Robert --=20