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: Suggest installing more fonts? Date: Sat, 17 Oct 2020 17:08:00 +0300 Message-ID: <835z79t073.fsf@gnu.org> References: <87wnzqa1be.fsf@gnus.org> <83y2k6v378.fsf@gnu.org> <83tuuuuygf.fsf@gnu.org> <83pn5iuxds.fsf@gnu.org> <83ft6euq7a.fsf@gnu.org> <83eelyuhwe.fsf@gnu.org> <834kmtuyon.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34580"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ghe@sdf.org, larsi@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 17 16:41:51 2020 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 1kTnP3-0008rp-RX for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Oct 2020 16:41:49 +0200 Original-Received: from localhost ([::1]:58446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTnP2-0000mE-UC for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Oct 2020 10:41:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTmsM-0007sy-S9 for emacs-devel@gnu.org; Sat, 17 Oct 2020 10:08:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56198) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTmsK-0004Fa-Kr; Sat, 17 Oct 2020 10:08:00 -0400 Original-Received: from [176.228.60.248] (port=1686 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kTmsK-0001ba-3f; Sat, 17 Oct 2020 10:08:00 -0400 In-Reply-To: (message from Stefan Monnier on Sat, 17 Oct 2020 09:49:09 -0400) 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:257944 Archived-At: > From: Stefan Monnier > Cc: ghe@sdf.org, larsi@gnus.org, emacs-devel@gnu.org > Date: Sat, 17 Oct 2020 09:49:09 -0400 > > > Emacs already knows not to search the available fonts for a character > > that it already tried to display and failed to find a suitable font. > > We should probably reuse the information which says a character > > doesn't have a font for finding such characters and marking them. > > I assumed that Emacs knows it's choosing "tofu" for any particular > glyph, regardless if that's the result of a long search or the reuse of > some previous search. The glyph information (assuming you mean 'struct glyph') is ephemeral, and is not recorded between redisplay cycles. It stays stored in the "current" glyph matrix, but Emacs almost never consults that for anything except comparison with "desired" matrix, because the current matrix can easily become outdated. > If it doesn't (e.g. it just reuses "the same glyph as last time this > char was used with this face"), then indeed it might be a bit more > tricky, but I'm sure it can be made acceptably cheap (both in terms of > memory&CPU resources and in terms of code complexity). AFAIR, this is indeed based on face information (and the fact that there's no font is recorded in the face struct), but these faces aren't exposed to Lisp, they are created and used internally. Still, the information should be reachable, I think.