From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
56691@debbugs.gnu.org, hello@paulwrankin.com
Subject: bug#56691: outline-minor-mode displays navigation arrow buttons as emojis
Date: Fri, 29 Jul 2022 14:48:01 +0200 [thread overview]
Message-ID: <87sfmkjda6.fsf@gmail.com> (raw)
In-Reply-To: <83wnbw6r9o.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 29 Jul 2022 15:24:19 +0300")
>>>>> On Fri, 29 Jul 2022 15:24:19 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: hello@paulwrankin.com, 56691@debbugs.gnu.org
>> Date: Fri, 29 Jul 2022 13:32:57 +0200
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> > The test for Emoji display is not accurate enough. Maybe we should
>> > have a display-color-emoji-p predicate? I added a FIXME there.
>>
>> 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 Cairo
Eli> and HarfBuzz on Unix and by macOS builds.
Eli> But even that could be not enough, since the necessary font may not 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 "😄") :family)
Eli> => 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ʼt use the emoji when we could?
Eli> We can then compare the value with a list of known families of fonts
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) "😄")))
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ʼve not been following, but I assume
thereʼs a "damn the torpedoes, I know what Iʼm doing" option for this
stuff.
Robert
--
next prev parent reply other threads:[~2022-07-29 12:48 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 4:57 bug#56691: outline-minor-mode displays navigation arrow buttons as emojis Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <handler.56691.B.16584658415826.ack@debbugs.gnu.org>
2022-07-22 5:00 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-22 5:04 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-22 5:19 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-22 6:24 ` Gregory Heytings
2022-07-23 6:32 ` Lars Ingebrigtsen
2022-07-22 7:42 ` Eli Zaretskii
2022-07-23 6:35 ` Lars Ingebrigtsen
2022-07-23 7:07 ` Eli Zaretskii
2022-07-23 7:28 ` Lars Ingebrigtsen
2022-07-23 7:38 ` Eli Zaretskii
2022-07-23 7:41 ` Lars Ingebrigtsen
2022-07-23 8:51 ` Eli Zaretskii
2022-07-24 9:10 ` Lars Ingebrigtsen
2022-07-28 12:37 ` Lars Ingebrigtsen
2022-07-28 14:23 ` Eli Zaretskii
2022-07-29 11:32 ` Lars Ingebrigtsen
2022-07-29 12:24 ` Eli Zaretskii
2022-07-29 12:48 ` Robert Pluim [this message]
2022-07-29 13:35 ` Eli Zaretskii
2022-07-29 13:38 ` Lars Ingebrigtsen
2022-07-29 13:45 ` Eli Zaretskii
2022-07-29 13:50 ` Lars Ingebrigtsen
2022-07-29 13:48 ` Robert Pluim
2022-07-29 13:51 ` Eli Zaretskii
2022-07-29 13:47 ` Robert Pluim
2022-07-30 11:33 ` Lars Ingebrigtsen
2022-07-30 11:44 ` Eli Zaretskii
2022-07-30 14:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-30 14:17 ` Lars Ingebrigtsen
2022-07-31 0:51 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-31 10:08 ` Robert Pluim
2022-07-31 11:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-01 10:36 ` Lars Ingebrigtsen
2022-08-01 10:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-01 10:50 ` Lars Ingebrigtsen
2022-08-01 11:40 ` Eli Zaretskii
2022-08-01 11:51 ` Lars Ingebrigtsen
2022-08-01 12:14 ` Eli Zaretskii
2022-08-01 12:36 ` Lars Ingebrigtsen
2022-08-01 13:12 ` Eli Zaretskii
2022-08-02 9:54 ` Lars Ingebrigtsen
2022-08-02 11:18 ` Eli Zaretskii
2022-08-02 11:20 ` Lars Ingebrigtsen
2022-08-02 11:35 ` Eli Zaretskii
2022-08-02 11:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-02 12:02 ` Eli Zaretskii
2022-08-02 13:33 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-03 11:05 ` Lars Ingebrigtsen
2022-08-03 11:33 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-01 12:16 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-01 13:02 ` Eli Zaretskii
2022-08-01 13:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-01 13:34 ` Eli Zaretskii
2022-08-01 13:47 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-01 13:53 ` Eli Zaretskii
2022-08-01 14:04 ` Robert Pluim
2022-08-10 11:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-10 11:52 ` Lars Ingebrigtsen
2022-08-10 12:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-12 14:56 ` Lars Ingebrigtsen
2022-08-13 1:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-11 4:30 ` Jim Porter
2022-08-11 7:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-12 14:57 ` Lars Ingebrigtsen
2022-08-13 1:54 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 11:56 ` Lars Ingebrigtsen
2022-08-13 12:16 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 12:24 ` Lars Ingebrigtsen
2022-08-13 12:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 5:53 ` Jim Porter
2022-08-13 7:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 11:58 ` Lars Ingebrigtsen
2022-08-13 12:17 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 12:25 ` Lars Ingebrigtsen
2022-08-13 12:34 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 12:37 ` Lars Ingebrigtsen
2022-08-13 12:42 ` Lars Ingebrigtsen
2022-08-13 11:59 ` Lars Ingebrigtsen
2022-08-13 12:18 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-01 11:38 ` Eli Zaretskii
2022-07-23 9:05 ` Visuwesh
2022-07-22 7:05 ` Eli Zaretskii
2022-07-22 7:49 ` Juri Linkov
2022-07-24 4:45 ` bug#56691: reopen Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-24 4:58 ` bug#56691: Better override Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sfmkjda6.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=56691@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=hello@paulwrankin.com \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).