From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.help Subject: Re: How to get the actual face attribute? Date: Wed, 24 Jun 2020 00:13:26 -0400 Message-ID: References: <60C41409-88B0-4F21-AC6D-2F18394A7C46@gmail.com> <41A32155-634A-4D5A-A878-2F92E6761917@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="48260"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 24 06:13:51 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 1jnwnG-000CR7-MI for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 24 Jun 2020 06:13:50 +0200 Original-Received: from localhost ([::1]:46874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnwnF-0005M1-Nx for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 24 Jun 2020 00:13:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnwmw-0005Lg-HA for help-gnu-emacs@gnu.org; Wed, 24 Jun 2020 00:13:30 -0400 Original-Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:40574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jnwmu-0006lN-Vp for help-gnu-emacs@gnu.org; Wed, 24 Jun 2020 00:13:30 -0400 Original-Received: by mail-qk1-x72d.google.com with SMTP id 80so694620qko.7 for ; Tue, 23 Jun 2020 21:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sn4YaQ8iaQXLTgQPmWmSPf4o+eLRHPb2GA9gzzzV62M=; b=QU7Q+rOL+kibRkPK4WAkdsp4vEN8Ioe3UkMBsPEjLs91wDyM9Lq8jhB5eilLZQKh/6 5eFL1hc7ClhmjpouxMMqqIRFSw+XyAoap61Knb36Bni7GPxBeOFloToWWwn+lzcuxxbB MK8kYQhMfNYJ58mAoUx6MhwYyrPOpDjZ+VtBPCjQuOI2Lz7hRByXLmHfAeUS4iUUIWAG QAmTFAE9TikXOBh3llDqWaUKA3N+ip3ZbfsMLOjk1KyEv79Dt2kyaLAoDRNibEAbUDC1 zGSOCkCET8+X2uKOosqoa5Inl7/gPwRr7cZha9kLYvX5kqzidCHDzsJsNC/Xor3rHWtp fhOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sn4YaQ8iaQXLTgQPmWmSPf4o+eLRHPb2GA9gzzzV62M=; b=UEssw+K1Qu1Lsd5ytAsPLF7NA+LeWcMzxpnHpobenVz74f4BdaW0oBRI18lnyrxABo 6rzkDh4cLBCrbBXZgR20WRJxd5IDP9u3SNGQSoxNt3Y9tBnhYV6mitwTY6ebVgP21O0y GGgpR2lsOajDwtWBRFUgxEpliKw6ZkF2Rgw/VjAOjiJfTj0UWdM5fdB3jYmAhnohi5gl glJYV6y0f8gV+OsSQeQpbMQcwsdawZmcQikGdfKOcB1Los7r8Zb1w0Ekf91z8cFrfxjX 7PWX2eq+uOtClHhiIY4UR3K4ZML+R0nLH2BQw1NJ82EQFTQLGMOui+2OWoV4Wd36CbQA yYBw== X-Gm-Message-State: AOAM532HBRq+x9/Tst530Fui0zXfVjmSGD5nym16vE66jVbkBinayDWe xbl/vPygOGOKHVjU37NQbGOYR7KhCRHIMA== X-Google-Smtp-Source: ABdhPJwPk2Ia6NH1l5A4JrmG7SWUgRuoAQLjKScQN+UYS0cSiycoOvqvP0C/a56kFNrhHZ8ibdGpRg== X-Received: by 2002:a37:b341:: with SMTP id c62mr23055356qkf.128.1592972007991; Tue, 23 Jun 2020 21:13:27 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:d9ee:c420:2dfe:c49c? ([2601:98a:4200:9210:d9ee:c420:2dfe:c49c]) by smtp.gmail.com with ESMTPSA id m128sm2415732qke.90.2020.06.23.21.13.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2020 21:13:27 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=casouri@gmail.com; helo=mail-qk1-x72d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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:123436 Archived-At: > On Jun 22, 2020, at 5:05 PM, Stefan Monnier = wrote: >=20 >> How should I recompute the text scale? Currently I calculate it from >>=20 >> (expt text-scale-mode-step text-scale-mode-amount) >>=20 >> Which is what text-scale-mode uses. (Face remap is hard to calculate = so >> I thought I can just support text-scale-mode.) >=20 > You shouldn't look at `text-scale-*` at all and instead ask the = display > code which font it will use. >=20 > [ 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). ] >=20 Right. I just advised text-scale functions for now. I think that should = work for most of the use cases. Yuan=