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.devel Subject: Re: Entering emojis Date: Fri, 29 Oct 2021 08:45:26 +0300 Message-ID: <83bl38s7t5.fsf@gnu.org> References: <87cznths5j.fsf@gnus.org> <87ilxi7531.fsf@gnus.org> <875yth7bjr.fsf@gnus.org> <871r4576ey.fsf@gnus.org> <87wnlx5rd4.fsf@gnus.org> <837ddxtimp.fsf@gnu.org> <87h7d15mvi.fsf@gnus.org> <831r45tgu3.fsf@gnu.org> <87cznp5k6p.fsf@gnus.org> <83tuh1rvjt.fsf@gnu.org> <87czno3jmp.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25875"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 29 08:32:49 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mgLRY-0006We-PQ for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Oct 2021 08:32:48 +0200 Original-Received: from localhost ([::1]:55842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgLRX-00068m-Hr for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Oct 2021 02:32:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgKhx-0002AO-54 for emacs-devel@gnu.org; Fri, 29 Oct 2021 01:45:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgKhw-0002JF-MK; Fri, 29 Oct 2021 01:45:40 -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=tcJuLuOIJUHbogDsOpVc2LDzCVYqPm31OmRrMuaYfsM=; b=bOXaxe01jD05 EOQkmtJXK3fs40tdrfZd2sc/VVWmJUtJYqL0KXl3pMIbbkwmErlbo3AKWcENO8hNtBsd/qq1AFisL PHydVMsUjwxJz6LwBlV4CNrLbo3EyaQSyXdqD7A/DswoFFNrXIxn9W6smpcghznjZOTq2lAk8jqpC Om5QYozc/SbnjcREHATNDD+pSMQ88pPgCLPcwFTC734EKvncZ2WeQAMvZvM/2LmaTDac5Tr1hHtt2 8JJVJ+NEJkGTl3aQurXXrY2AE0++rW3kSG3fz0kP15NPuTYbkLohwmfDI85SlVAzABzX9YZAzTdaP JHrWQXlCG75Z8lp+y5sXkQ==; Original-Received: from [87.69.77.57] (port=2115 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgKhw-0007Cg-5J; Fri, 29 Oct 2021 01:45:40 -0400 In-Reply-To: <87czno3jmp.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 28 Oct 2021 23:49:18 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278167 Archived-At: > From: Lars Ingebrigtsen > Cc: stefankangas@gmail.com, emacs-devel@gnu.org > Date: Thu, 28 Oct 2021 23:49:18 +0200 > > Eli Zaretskii 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 sequence. 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.