From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#65899: 30.0.50; window-text-pixel-size sometimes fails to report accurate pixel-width Date: Wed, 13 Sep 2023 00:09:35 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36361"; mail-complaints-to="usenet@ciao.gmane.io" To: 65899@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 13 00:03:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qgBTc-0009HF-A1 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Sep 2023 00:03:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgBTH-0003SR-0i; Tue, 12 Sep 2023 18:02:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgBTF-0003SH-H6 for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 18:02:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgBTF-0003qb-8Y for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 18:02:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgBTJ-0007Nh-Nx for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 18:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Sep 2023 22:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65899 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169455614528327 (code B ref -1); Tue, 12 Sep 2023 22:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Sep 2023 22:02:25 +0000 Original-Received: from localhost ([127.0.0.1]:60226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgBSj-0007Mo-0z for submit@debbugs.gnu.org; Tue, 12 Sep 2023 18:02:25 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:59392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgBSg-0007Ma-RC for submit@debbugs.gnu.org; Tue, 12 Sep 2023 18:02:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgBSU-0003Ow-8t for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 18:02:11 -0400 Original-Received: from [78.47.144.35] (helo=metalevel.at) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgBSQ-0003l6-Jm for bug-gnu-emacs@gnu.org; Tue, 12 Sep 2023 18:02:10 -0400 Original-Received: from mts-Mac-mini.local (localhost [127.0.0.1]) by metalevel.at (Postfix) with ESMTP id 57DF49C751 for ; Wed, 13 Sep 2023 00:02:03 +0200 (CEST) Original-Received: by mts-Mac-mini.local (Postfix, from userid 501) id 8A35E28ECC6E; Wed, 13 Sep 2023 00:09:35 +0200 (CEST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 78.47.144.35 (failed) Received-SPF: none client-ip=78.47.144.35; envelope-from=triska@metalevel.at; helo=metalevel.at X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270226 Archived-At: The following slight variation of the previously filed issue #54862 also yields a wrong result of window-text-pixel-size. To reproduce the issue, please invoke Emacs with: $ emacs -Q and then evaluate the following form: (let ((width 20)) (= width (let* ((height (line-pixel-height)) (data (with-temp-buffer (insert (format "P1\n%s %s\n" width height)) (dotimes (_ height) (insert (make-string width ?1) "\n")) (buffer-string)))) (insert "\n") (insert-image `(image :type pbm :data ,"P1\n1 10\n1111111111" :ascent center) "t") (let ((from (point))) (insert-image `(image :type pbm :data ,data :ascent center) "t") (car (window-text-pixel-size nil from (point))))))) The expected result, obtained for example in Emacs 26.1, is: t. With Emacs 30.0.50, I instead unexpectedly get: nil. If possible, could you please restore the previous behaviour? Thank you and all the best, Markus In GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin18.2.0, X toolkit, cairo version 1.17.6, Xaw scroll bars) of 2023-09-11 built on mac Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Mac OS X 10.14.2 Configured using: 'configure --prefix=/opt/local --disable-silent-rules --without-ns --without-dbus --without-gconf --without-libotf --without-m17n-flt --with-libgmp --with-gnutls --with-json --with-xml2 --with-modules --with-sqlite3 --with-webp --infodir /opt/local/share/info/emacs --with-x-toolkit=lucid --without-xaw3d --without-imagemagick --with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-lcms2 --without-rsvg --with-xft --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-pipe -Os -Wno-attributes -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64' 'CPPFLAGS=-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk' 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -lfreetype -lfontconfig -Wl,-rpath /opt/local/lib/gcc12 -Wl,-no_pie -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64'' Configured features: ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE PDUMPER PNG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM LUCID ZLIB