[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Entering emojis

From: Eli Zaretskii
Subject: Re: Entering emojis
Date: Fri, 29 Oct 2021 08:45:26 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: stefankangas@gmail.com,  emacs-devel@gnu.org
> Date: Thu, 28 Oct 2021 23:49:18 +0200
> Eli Zaretskii <eliz@gnu.org> writes:
> > Why not? it will at least tell the user the font doesn't support
> > that.  More importantly, it will allow the user to choose a sequence
> > even if his/her Emacs cannot display it, because those of the
> > addressees (assuming this is in an email message, for example) could.
> But this is in the graphical display -- the user has no way of knowing
> what they're entering (it's just the glyph, not the name).

I assumed you display the names as well.  Why don't you? it could be
important, because the appearance is not always everything.  Sometimes
the selection of an Emoji needs that you understand what it expresses,
in words.

> I've poked at the problem some more, and it seems like
> `char-displayable-p' is really fast on characters it can actually
> display, but slow on characters it doesn't know about?  Perhaps this
> makes it trigger loading more fonts or something?  (I haven't actually
> read the code yet, just done some testing.)

Of course, that function could involve looking for a suitable font, if
none of those already loaded supports the character.  Emacs does there
the same as it does when it needs to display the character.

> If this is the case, is there a way to say "don't try to load
> anything, but just see if you have the glyph in the current set"?

But that makes no sense, because there's no guarantee the fonts
already loaded support the character you ask about, and no guarantee
there isn't some other font which does.  And in any case, AFAIU the
delay of loading fonts is not wasted if Emacs does succeed to find a
font, because then actually displaying the character will find the
required font already loaded.  It's only the failure to find a font
that causes multiple failed attempts for the next character or

When this search is slow, how many sequences fail to display?  Or is
it slow even if all the sequences can be displayed?  If the latter,
there could be some issue here that doesn't meet the eye, and we
should start by profiling.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]