From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: What is a default font? Date: Sat, 07 Dec 2019 12:29:51 +0200 Message-ID: <8336dwfmxs.fsf@gnu.org> References: <4c86b07f-175d-f6cf-171a-b58474ab717a@gmx.at> <83tv6ghxxk.fsf@gnu.org> <36fc3581-f8b9-cfbb-7455-eaccf9fe3c4a@gmx.at> <83y2vqhcnp.fsf@gnu.org> <0fb8540a-5edd-53ee-a02f-51960af2821b@gmx.at> <83v9quhahx.fsf@gnu.org> <2e7821ab-0ebc-fe80-8faa-faebf36dec82@gmx.at> <83tv6eh9fv.fsf@gnu.org> <834kydh2zw.fsf@gnu.org> <5a990e63-8794-ae25-3063-ea9271b12677@gmx.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="137410"; mail-complaints-to="usenet@blaine.gmane.org" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 07 11:30:15 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1idXLp-000ZSl-AH for ged-emacs-devel@m.gmane.org; Sat, 07 Dec 2019 11:30:13 +0100 Original-Received: from localhost ([::1]:49316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idXLn-0004l8-K2 for ged-emacs-devel@m.gmane.org; Sat, 07 Dec 2019 05:30:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45039) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idXLg-0004iZ-Kg for emacs-devel@gnu.org; Sat, 07 Dec 2019 05:30:05 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1idXLg-0008PT-Fb; Sat, 07 Dec 2019 05:30:04 -0500 Original-Received: from [176.228.60.248] (port=3088 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1idXLf-0008Fp-1d; Sat, 07 Dec 2019 05:30:03 -0500 In-reply-to: <5a990e63-8794-ae25-3063-ea9271b12677@gmx.at> (message from martin rudalics on Sat, 7 Dec 2019 10:39:51 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243213 Archived-At: > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > From: martin rudalics > Date: Sat, 7 Dec 2019 10:39:51 +0100 > > Thanks. But you left the doc-string of 'face-font' alone. That > doc-string still says that > > If FRAME is t, report on the defaults for face FACE (for new frames). > > which is wrong according to Stefan > > Yes, you can, but only if you know in which frame it will be displayed > (or you can approximate it by using a frame "similar" to the one that > will be used). > > and you > > For a frame that was not yet created there are too many unknowns > for face-font to be able to help you efficiently. The best you can do > is assume the new frame will have the same faces as the selected one. This is a misunderstanding. What I meant to say was that when a new frame is created, we usually apply frame-parameters from all kinds of sources, and that is what I referred to as "unknowns". barring that, the above line is accurate, albeit you may see it as useless in your use case. > What I'm still unsure about is the following paragraph in the Elisp > manual: > > If ‘face-remapping-alist’ is buffer-local, its local value takes > effect only within that buffer. If ‘face-remapping-alist’ includes > faces applicable only to certain windows, by using the > ‘(:filtered (:window PARAM VAL) SPEC)’, that face takes effect only > in windows that match the filter conditions (*note Special > Properties::). To turn off face filtering temporarily, bind > ‘face-filters-always-match’ to a non-‘nil’ value, then all face > filters will match any window. > > From this I'd conclude that I might have to explicitly select a > specific window (and not just its frame) before calling any of the > functions 'default-font-height', 'face-font', ... in order to process > 'face-remapping-alist' correctly. Is that conclusion correct? If so, > the descriptions of these functions should tell that. It depends on what you are going to use the results of default-font-height etc. for. And I'd consider it a bug, or at least a misfeature, to have the default face filtered like that anyway.