unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Arthur Miller <arthur.miller@live.com>
Cc: 52118@debbugs.gnu.org
Subject: bug#52118: 29.0.50; string-pixel-width reports incorrect width
Date: Fri, 26 Nov 2021 14:41:45 +0100	[thread overview]
Message-ID: <871r33uj8m.fsf@gnus.org> (raw)
In-Reply-To: <AM9PR09MB497744E50C72D6A89B2BA8A696639@AM9PR09MB4977.eurprd09.prod.outlook.com> (Arthur Miller's message of "Fri, 26 Nov 2021 01:51:45 +0100")

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

`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





  reply	other threads:[~2021-11-26 13:41 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 [this message]
2021-11-26 13:46   ` Arthur Miller
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

  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=871r33uj8m.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=52118@debbugs.gnu.org \
    --cc=arthur.miller@live.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).