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: Mon, 22 Jun 2020 15:54:19 -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="20421"; 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 Mon Jun 22 21:54:44 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 1jnSWi-0005DD-5U for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Jun 2020 21:54:44 +0200 Original-Received: from localhost ([::1]:49844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnSWh-0000JN-8b for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Jun 2020 15:54:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnSWO-0000J2-6B for help-gnu-emacs@gnu.org; Mon, 22 Jun 2020 15:54:24 -0400 Original-Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:40444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jnSWM-00043R-8W for help-gnu-emacs@gnu.org; Mon, 22 Jun 2020 15:54:23 -0400 Original-Received: by mail-qv1-xf35.google.com with SMTP id e2so8558918qvw.7 for ; Mon, 22 Jun 2020 12:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=lY7rubvPa9QWenotipeUU5wSEo9h3lBU4WzKriAMlh8=; b=Nbx3U8VGmOaZSEvNOqu91DyO/0s9uYa0qIdtuliYXiIxiS2YE7UuaiYnKXfscaSM1Y xr07itNyVJKR7Cf7PGfATmvYrzqJ/IIlKY/wti/fvtCDaUxLrBANQUuC+XTZ9LaXNFKw TbiTWeOtP1PXd74vxqBId9/rKZRp833/jtvoKhJReW2nPAG62x/L7tql796w+BO2kW5f t63SuRmiqgYj5nLrgJsReoD7M5BedWm/PVzdLKKuaHSl4xRfu4u1wrqKcx5bahCuyrBF qqaoNZcpQ/0DN8DyTqM10xLPkvobcMmuTm9eBPqZLtMVoimT+M4Hw2ReI7CArII5DAds HVRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=lY7rubvPa9QWenotipeUU5wSEo9h3lBU4WzKriAMlh8=; b=uipY3i7fSE8bjELONJgwL91IUSrIcNCffpUpyYMQSejBtaEWQNRbt1wuKf/DKL3uZY K3ueLxZoOM7tPaeuYHl+aItP5vX+IMs0GiWAOp3rPa0TpeI+06Sm9lDNbeFZEPrYmI2F jST7333wShs3n/M8XkgUs1bHpyNnQLWyiB3frlX/dqJDXGIuqI+v3Xy9UmrEIFR1ijmm mx3mA2E3cBURZWU/Xdmq+Nv1fDbbKJVvxDYwQ68MVh6mk/ew4uqsGMUW6Mp5vHWxIrOT 2qqaCRoxtV6O49+rav8MBfDH55RzL2W3mp+JaYYez8Iq77df6OeY468eZn469HkWM/Cg yUJA== X-Gm-Message-State: AOAM533kfHIR4cBtqMvKDcFP+hR8aIgYOP9U4SDGmQU9qKxQxfYRDPKM 88wraJAMCjoO6v7dC4cZnHE= X-Google-Smtp-Source: ABdhPJzYMMaM8wVbvgaQgsUpIu2GHPQvWC9svhcJzJJwaKE+qZi+fsUmccZuh/CpPF0H1kJIzGRjwQ== X-Received: by 2002:ad4:4d09:: with SMTP id l9mr23584417qvl.8.1592855660879; Mon, 22 Jun 2020 12:54:20 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:4db3:689a:8b65:21d1? ([2601:98a:4200:9210:4db3:689a:8b65:21d1]) by smtp.gmail.com with ESMTPSA id a14sm13628237qkn.16.2020.06.22.12.54.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 12:54:20 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=2607:f8b0:4864:20::f35; envelope-from=casouri@gmail.com; helo=mail-qv1-xf35.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, HTML_MESSAGE=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-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:123425 Archived-At: > On Jun 22, 2020, at 3:49 PM, Stefan Monnier = wrote: >=20 >>>> Some one reported that when they change the text size with >>>> text-scale-adjust, the alignment are messed up. >>> If the alignment is done before changing the text-scale, then it's = no >>> big surprise, since text-scale won't scale everything by the same = factor. >> I see. I calculate the text size base on the assumption that the text = scale >> is the same for all glyphs. That explains why my measuring are off. >=20 > I don't know what that means. The text-scale does apply globally. > But it doesn't necessarily scale by the same factor horizontally and > vertically, nor does it necessarily scale by the same factor for > different fonts. It's "more or less equal" but not exactly. And of > course, it won't affect those glyphs whose size is not relative to the > base `default` face (e.g. images or glyphs to which a face is applied > which sets an absolute rather than relative size). >=20 > IOW it needs to be recomputed from scratch when the text-scale is = changed. 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.) Yuan