From: martin rudalics <rudalics@gmx.at>
To: Josh <josh@foxtail.org>
Cc: 9949@debbugs.gnu.org
Subject: bug#9949: 24.0.91; window-width function does not take text-scale-mode-amount into account
Date: Fri, 04 Nov 2011 20:58:44 +0100 [thread overview]
Message-ID: <4EB443F4.9070605@gmx.at> (raw)
In-Reply-To: <CANdFEAHbtU3FUqfdmRbX9+2EwU8ZP6vghWybOS+rN-SwdDdR7Q@mail.gmail.com>
> window-width already returns incorrect results for the exceptions you
> mentioned. A variant that accounts for text scaling would be correct in
> all the cases window-width is correct, plus the case where text scaling has
> been applied to a fixed width font. All that is needed is for someone to
> expose the pixel width of a face and my scaled-window-width function above
> will work.
You really should leave this job to the display-engine. Doing your
calculations based on window-width means you'd have to add a function to
`window-configuration-change-hook' and/or `window-size-change-functions'
and recalculate the position of your stamps when a window changes size.
Moreover, a solution based on window-width will fail when you display
the same buffer in two windows of different width. And another benefit
of using :align-to would be the additional experience whether it does
its job as expected.
martin
next prev parent reply other threads:[~2011-11-04 19:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 2:29 bug#9949: 24.0.91; window-width function does not take text-scale-mode-amount into account Josh
2011-11-04 10:25 ` Eli Zaretskii
[not found] ` <CANdFEAF10Lkp3VXe-aLa2nQi6BJWzDQiVdY9m3-uYAQxxWBqMA@mail.gmail.com>
2011-11-04 16:02 ` Eli Zaretskii
2011-11-04 18:30 ` Josh
2011-11-04 19:58 ` martin rudalics [this message]
2011-11-04 20:12 ` Eli Zaretskii
2011-11-04 13:56 ` martin rudalics
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=4EB443F4.9070605@gmx.at \
--to=rudalics@gmx.at \
--cc=9949@debbugs.gnu.org \
--cc=josh@foxtail.org \
/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).