From: Arthur Miller <arthur.miller@live.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 52118@debbugs.gnu.org
Subject: bug#52118: 29.0.50; string-pixel-width reports incorrect width
Date: Fri, 26 Nov 2021 14:46:21 +0100 [thread overview]
Message-ID: <AM9PR09MB497731426355021C40D1D40896639@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <871r33uj8m.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 26 Nov 2021 14:41:45 +0100")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Arthur Miller <arthur.miller@live.com> writes:
>
>> Attached is small lisp program and a screenshot of the output. From the
>> screenshot itself it is visible that for string with large non-default font-size
>> the reported width is erroneous. It should be close to frame/window size
>> in this particular example, but reported size is missing ~500 pixels.
>
> Seems to be working OK for me:
>
> (string-pixel-width
> (propertize "foo" 'face '(:height 500 :background "red")))
> => 300
>
> (string-pixel-width
> (propertize "foo" 'face '(:height 5000 :background "red")))
> => 2997
>
> But you seem to be using an old version, and not from the Emacs repo?
>
> In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4)
> of 2021-11-17 built on pascal
> Repository revision: 1ddebefc9fe178e9e8b4275a45e0eda1bcf7848e
> Repository branch: alpha-patch
:) Yes, like a week old :).
> `string-pixel-width' was rewritten recently. Could you try a fresh
> checkout and see whether the problem is still present?
Allright. I haven't had time to pull and rebuild; I'll try and come back when I
rebuild it.
Thanks for the info.
next prev parent reply other threads:[~2021-11-26 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 0:51 bug#52118: 29.0.50; string-pixel-width reports incorrect width Arthur Miller
2021-11-26 13:41 ` Lars Ingebrigtsen
2021-11-26 13:46 ` Arthur Miller [this message]
2021-11-26 13:47 ` Lars Ingebrigtsen
2021-11-26 14:36 ` Arthur Miller
2021-11-26 16:17 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM9PR09MB497731426355021C40D1D40896639@AM9PR09MB4977.eurprd09.prod.outlook.com \
--to=arthur.miller@live.com \
--cc=52118@debbugs.gnu.org \
--cc=larsi@gnus.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.