From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: How to get the actual face attribute? Date: Mon, 22 Jun 2020 17:05:08 -0400 Message-ID: References: <60C41409-88B0-4F21-AC6D-2F18394A7C46@gmail.com> <41A32155-634A-4D5A-A878-2F92E6761917@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="78415"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Yuan Fu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 22 23:05:57 2020 Return-path: Envelope-to: geh-help-gnu-emacs@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 1jnTdd-000KIX-3q for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Jun 2020 23:05:57 +0200 Original-Received: from localhost ([::1]:60002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnTdc-0005zg-5x for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Jun 2020 17:05:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnTcw-0005x8-SO for help-gnu-emacs@gnu.org; Mon, 22 Jun 2020 17:05:14 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:35109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnTcu-0001NP-HL for help-gnu-emacs@gnu.org; Mon, 22 Jun 2020 17:05:13 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E6DE01006D2; Mon, 22 Jun 2020 17:05:10 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 51D3D1002FA; Mon, 22 Jun 2020 17:05:09 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1592859909; bh=tOK2dr4Ux/uo8YH4LayPf6RCz/WEpJ3mpvBQ19dNerw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=o7wUuJFZnX5lK65z3VCHLZ8behj+UDve3r2oWoFCJE7tMipGHqksM77ghPYR3P5dy mB2bQrZlPPpO9qIVDFpIZDBeWQn0V+dvEYoDODXTllnqFDMmJsmN9/QaeIq6swQ6Cr YIJhC62XHZK5ZgUDKn+OPv1VXfK/I5865gL9AyDGWgxXceyEhNuwT86QvnfY2IdDam j8UGnlhsRnJTnucrMwrO+NUj8Sc4+Y5ixoOHrV2U+sleq+T/MaAT2J3C20s3dviYDY /v+dB9ttwOLzVY32HGIZo3meijz74DlY/371c7DKKObH6LNhVnsXEnyu9xk8alzeMV /6Va6u61ShgNg== Original-Received: from alfajor (unknown [108.175.228.207]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1B13D12029D; Mon, 22 Jun 2020 17:05:09 -0400 (EDT) In-Reply-To: (Yuan Fu's message of "Mon, 22 Jun 2020 15:54:19 -0400") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/22 14:56:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:123426 Archived-At: > How should I recompute the text scale? Currently I calculate it from > > (expt text-scale-mode-step text-scale-mode-amount) > > Which is what text-scale-mode uses. (Face remap is hard to calculate so > I thought I can just support text-scale-mode.) You shouldn't look at `text-scale-*` at all and instead ask the display code which font it will use. [ But note that there's the issue of *computing* and then there's the issue of *re*computing (i.e. how to detect when it needs to be refreshed and how to make sure it is refreshed then). ] -- Stefan