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 09:57:44 +0300 Message-ID: <834kmtuyon.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9035"; 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 08:58:18 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 1kTgAU-0002FY-6p for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Oct 2020 08:58:18 +0200 Original-Received: from localhost ([::1]:59556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTgAT-0008Jp-9D for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Oct 2020 02:58:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTg9z-0007uS-Fo for emacs-devel@gnu.org; Sat, 17 Oct 2020 02:57:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51726) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTg9x-0007KN-OF; Sat, 17 Oct 2020 02:57:45 -0400 Original-Received: from [176.228.60.248] (port=2405 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kTg9w-0001GG-P7; Sat, 17 Oct 2020 02:57:45 -0400 In-Reply-To: (message from Stefan Monnier on Fri, 16 Oct 2020 15:40:11 -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:257923 Archived-At: > From: Stefan Monnier > Cc: Gregory Heytings , larsi@gnus.org, emacs-devel@gnu.org > Date: Fri, 16 Oct 2020 15:40:11 -0400 > > > Instead, it is much easier to have a feature implemented in Lisp that > > would detect characters with no font glyphs and put help-echo on them. > > We have infrastructure for such features in jit-lock.el. > > Indeed. And we can make this very efficient if the redisplay stashes > in some Lisp var the chars-with-locations of the tofu it generates. I think relying on such a trace variable would be unreliable, because you can never predict which parts of the window will be actually redisplayed, and the display engine can only leave the trace about those parts where it tried to find a font glyph for a character. 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. It cannot be too expensive, I think.