GNU bug report logs -
#52118
29.0.50; string-pixel-width reports incorrect width
Previous Next
Reported by: Arthur Miller <arthur.miller <at> live.com>
Date: Fri, 26 Nov 2021 00:53:02 UTC
Severity: normal
Tags: moreinfo
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Arthur Miller <arthur.miller <at> 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
`string-pixel-width' was rewritten recently. Could you try a fresh
checkout and see whether the problem is still present?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.