GNU bug report logs -
#47712
27.1; Provide `string-display-width` function, which takes properties into account, `substring-width`
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Sun, 11 Apr 2021 21:17:02 UTC
Severity: normal
Found in version 27.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Daniel Mendler <mail <at> daniel-mendler.de> writes:
> `window-text-pixel-size` computes the size of a portion of the window,
> it does not take a string argument. The function `string-width`
> instead takes a string argument returning the number of columns needed
> to display this string. This function is needed to compute widths of
> strings which are not yet displayed.
If I understand correctly (and I may not), the proposed function just
takes properties into account (like `invisible' and `display'), but does
not compute pixel sizes at all?
I can see how that may be useful in some cases (and is very different
from `window-text-pixel-size'), so I think adding something like that
would be nice. But the name is confusing -- it sounds like it's
computing the displayed width, and it's not -- if there's images or text
with a different font in there, it's not taken into account?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 38 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.