unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: 52142@debbugs.gnu.org
Subject: bug#52142: 28.0.60; `posn-object-width-height' does not reflect actual dimensions of object when confronted by display string
Date: Sat, 27 Nov 2021 15:03:11 +0200	[thread overview]
Message-ID: <837dctzr74.fsf@gnu.org> (raw)
In-Reply-To: <87czmlahpw.fsf@yahoo.com> (message from Po Lu on Sat, 27 Nov 2021 20:47:07 +0800)

> From: Po Lu <luangruo@yahoo.com>
> Cc: 52142@debbugs.gnu.org
> Date: Sat, 27 Nov 2021 20:47:07 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > That's a feature.  Maybe it isn't documented clearly enough, but
> > basically as long as there's a character displayed at that position,
> > WIDTH and HEIGHT give the dimensions of that character's glyph on
> > display.
> 
> Hmm, okay.  I think the documentation in (elisp)Click Events could do
> with some improvement:

Thanks, fixed.

> > Remember: this stuff was originally designed for mouse clicks, where
> > it's important to know what did you click on.
> 
> Thanks.  On a slightly unrelated topic, what would be the appropriate
> method to obtain the height of such a display string?  I'm trying to
> make the pixel scrolling machinery work with such text, and while
> scrolling down already works, I have no idea how to implement scrolling
> up, which currently relies on going to the last screen line, then
> adjusting vscroll the remainder of the way, which naturally requires a
> way to fetch the height of the display string.

Did you try window-text-pixel-size?





  reply	other threads:[~2021-11-27 13:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87v90dajvy.fsf.ref@yahoo.com>
2021-11-27 12:00 ` bug#52142: 28.0.60; `posn-object-width-height' does not reflect actual dimensions of object when confronted by display string Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-27 12:32   ` Eli Zaretskii
2021-11-27 12:47     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-27 13:03       ` Eli Zaretskii [this message]
2021-11-27 13:12         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-27 13:27           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837dctzr74.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=52142@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).