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 13:00:42 -0400 Message-ID: References: <60C41409-88B0-4F21-AC6D-2F18394A7C46@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="20470"; 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 19:01:12 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 1jnPom-0005Fq-HI for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Jun 2020 19:01:12 +0200 Original-Received: from localhost ([::1]:44888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnPol-0003NA-JF for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 22 Jun 2020 13:01:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnPoN-0003Mu-J2 for help-gnu-emacs@gnu.org; Mon, 22 Jun 2020 13:00:47 -0400 Original-Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:43395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jnPoL-0002Ca-ST for help-gnu-emacs@gnu.org; Mon, 22 Jun 2020 13:00:47 -0400 Original-Received: by mail-qk1-x736.google.com with SMTP id l188so3128842qkf.10 for ; Mon, 22 Jun 2020 10:00:45 -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=aJzyVi9f6UgJWLOtexX9BAXcXZynJUa+kiHRxBMW+MQ=; b=TZugeY1WyRBGqyODKxUe44TgiEdnGkNcEFCPA5yf0bP0GPSJGUihSS6l9Kn47aMKmp EEDYlpi3huTlqG+TVIK4jdg2DZMAL52Oosd3NYpNvd7I6bnb8Mlc229bovU2gfBIUr21 anVysVrqF6KO3h+RVXTZQ/dhLvqt/QrZFWH0Lb6/gCLZPGdA77zhXwJNYnphzjSsLiZd rjp1dv7pYf/uIc8LC/WpaUe6oIrXNrQ/RlerA9NFa1L+MKJWKTuVv7XLgYdi3kfsvjvO zPFx3YbRPR9MoRZEZnJQzQibBOQpczPn+PFTGrLn1VlHy0msXbIjqUOTT4hk+NSAMzk+ Lxrw== 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=aJzyVi9f6UgJWLOtexX9BAXcXZynJUa+kiHRxBMW+MQ=; b=hTENYQ4okOgo3lv85cNCCLo8X0cer5rVhTm9gkXftgf1vfFcOETwL7vqAkpjcecy+s JEduRA9cpE3lAH+BT6mWt5003MmXY8OY/0MmUmoFA6CBGscn/eOKaDG66plMH2Yv/XVY lNsM2Dbqxf8ySQo+zA3I7rQeuy/lsh0KfWi+xCzfY6in3dbmpnWuVOg3/ZI8HVwvLVJG xCN2U3B6x2eNr88b8d4ULVuzLAxhHHEhJC9VYWZU1vgX2yvNNEkarf56pHxpLqXgFcl+ fDClxr+Ey8R/NlMqOmprUMTulhV2boqBi8CaYjhc+CGDDPG1ct2AvK4fse7S90v92FQ2 68rQ== X-Gm-Message-State: AOAM530XJhAdDFF3oy7LuBypE0npQY9aBt+rGCQqGNGPPGm0Z4PXCXk/ 39A6qf8fHZuK+RDwmfaHfTT4/aOXQBJJpw== X-Google-Smtp-Source: ABdhPJy8ZOG3DzKyKVaD29BeRztchNk3JyKFZGvEGfsCQVtorn0o97WIVq3WJABjd92hunUoYzH4rw== X-Received: by 2002:a37:a84c:: with SMTP id r73mr16517149qke.0.1592845244173; Mon, 22 Jun 2020 10:00:44 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:657c:e0bd:67cd:c97? ([2601:98a:4200:9210:657c:e0bd:67cd:c97]) by smtp.gmail.com with ESMTPSA id d17sm14044730qke.101.2020.06.22.10.00.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 10:00:43 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=2607:f8b0:4864:20::736; envelope-from=casouri@gmail.com; helo=mail-qk1-x736.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:123417 Archived-At: > On Jun 21, 2020, at 11:54 AM, Stefan Monnier = wrote: >=20 >> When writing my package I need to get height of the face at point. >=20 > Note that there may be simultaneously several different such heights = if > point is shown simultaneously in different frames. >=20 >=20 > Stefan >=20 >=20 Thanks. Unfortunately I think I asked an x-y question. What I really = want to know is the width of the glyph and I thought I can just multiply = the height factor to the original width of the glyph. It seems not to be = the case. The multiplied result doesn=E2=80=99t match with the width on = glass. More precisely :height * glyph width !=3D posn of point after - = posn of point. Is this expected? Also I can=E2=80=99t use posn for calculation since sometimes the text = might not be on screen.=20 Yuan=