From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: What is a default font? Date: Wed, 4 Dec 2019 19:04:10 +0100 Message-ID: References: <4c86b07f-175d-f6cf-171a-b58474ab717a@gmx.at> <83tv6ghxxk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="220035"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 04 19:04:55 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 1icZ1C-000v4G-D2 for ged-emacs-devel@m.gmane.org; Wed, 04 Dec 2019 19:04:54 +0100 Original-Received: from localhost ([::1]:45330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icZ1A-0002C1-Kk for ged-emacs-devel@m.gmane.org; Wed, 04 Dec 2019 13:04:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41002) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icZ0d-0002BZ-2X for emacs-devel@gnu.org; Wed, 04 Dec 2019 13:04:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icZ0b-0002HR-JR for emacs-devel@gnu.org; Wed, 04 Dec 2019 13:04:18 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:49681) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icZ0a-0002FX-UL; Wed, 04 Dec 2019 13:04:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1575482651; bh=GRyt+VvcyqBcM9YvEX3qPIlOKm8kD+eKgpSrn+b0iJY=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=eeGHv0XE7RwUbi3fkBt86nmsl+NRXFC80L3NP52MLqzyoJHa3omI9+pMIpc5q23oK 8uHp8yVcda7E/d/CveI7ztvqp3Qa3F4ywgWH+f9OzR2Boi9wNO5JO17Z4nxMLOkM4N tFH2i+Os34iWCS4tLJSMrIPD+BYeKlRlVVuzBdII= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.208]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MI5Q5-1iWBUT3W7T-00FGCO; Wed, 04 Dec 2019 19:04:10 +0100 In-Reply-To: <83tv6ghxxk.fsf@gnu.org> Content-Language: de-AT X-Provags-ID: V03:K1:/XJy5cgKEBjqCf/4fBSyqg1PNCuinu/rzavl5H7ASgH8J8Yr7KU PHcS9172vn78sZG1gc86+tuq6cr9Sx0BUyFFGkLWDJ06VQdnoa2izWCJb2HTtNX/E6Vnr+Z WeIIVFtVRcF2frpuF/Sig4vrLnQFS0HhiTntqIUOkc0HXBB30ont6TSA/QKpkjz47KRJf3w 8ZxQ7FvV8C9bfkgs3t92A== X-UI-Out-Filterresults: notjunk:1;V03:K0:c8Olyei5oO0=:ffRRTlhwggi87V7nexuRCp +8hiLubn+dCqXU7WXmPSMfrmiTuNAvITk93UzFdvKZEp9ygOR/vIL6eI+SHVZJ9L3aU+qIQ5T hDtDE7R7J0zeQ7X2hrBavsZM88I6xZOXXXxNx5t19GMzdyzG50wg7x+yjgKYYaDCApFKj9XKp 7I7TT8wlUkQ8KLwJYVmzv2a5O5MIwk9aZdD5HUf0KWjZyF/EOdlrmMzrUzOq/+Mf/lhHuVBX5 JDytWnZIG1bH0cmwnkbNhrm9egZ+TbdN4FRsEBecQOnIzBHoY8PAdSQrIdcOGCbEODT5jtJUN TIscyj+/tgVBQ0pUOc41Th4lQMt07VEYKmJdbvwkDb1+JQAOp3/Ofh1d4xMQgCxtiMfI9BypX TULXFKiYfsjQVf4Ggu5SUaF8CPJ2HXgaD8TtPmP/D1kSSaK+0Hf7FbSu/OfddwLmUMrZWSCZ3 MB0yZP0OIRMh4VWTTvV8S/DgFnbxrjge3SWNEnT0cxn3vNnuMOL2ziOY6st235PFH65Dq2shw kb0va8eWO+cGD2KjXYi132505q1kIyy98WFoYnm7w3Y5Vp6XTH9Sn0ku31GWJEoXZHMog2Fmz noNBh4ytb/oogh5wlJAwUPRghRSBJ2QDWL5Y5Eu8BMekbRBy7Rz5/y1+5ERbPzTnNIXjJ6FM5 p5uPpiRQePjgmEi4zSDoyDCn1gA9qcDcBAsRFkByRUz/DXpYVYy+v4l2NJQSJHi4/Wj+3Ia/f ToScM7lxBBe3wyWX5eLfXefj0EbPuR9bYXZ9NEaQ4aVHt5ppFlvK0cRiSZzwWHZgDMceiPku X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.19 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:243123 Archived-At: > I don't think I understand what you need, or why. There's no "face > for a buffer"; only face-remapping is buffer-local. frame-char-height > take the value from the specified frame, not from a buffer. It is > meaningless to ask about a font of a buffer without specifying the > frame on which it is, or will be, displayed. > > You will see that functions which use the likes of default-font-height > are interested in the selected window on the selected frame. But in that case the first line of the doc-string of 'default-font-height' Return the height in pixels of the current buffer's default face font. is totally misleading because, as you noted above, asking for such a value is meaningless when the current buffer is not displayed in the selected window. Please try to fix these doc-strings so they tell what the functions actually do and not how they are used. I would do that myself but I fail to see where 'face-font' asks about the font property of a window. It calls lookup_named_face with the first argument NULL so that function should "consider only frame-level face configuration" according to its comment. Where does it take the selected window and hence face remapping for that window's buffer into account? It's probably all deeply rooted in functions like merge_face_ref but I'm completely lost there. In either case, from what you said, the following problem apparently cannot be resolved: If I have a buffer I want to display via 'display-buffer' with a specified number of lines, that buffer is not yet displayed anywhere and some face remapping is in effect for that buffer, I cannot specify how high the window showing that buffer should be in terms of the remapped font's height. Is that conclusion correct? Thanks, martin