From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67533: SVG images confound position pixel measurements Date: Sat, 02 Dec 2023 09:30:55 +0200 Message-ID: <83wmtx83io.fsf@gnu.org> References: <9B9C683E-B951-406E-98AA-32F4539B3FF7@gmail.com> <83o7fbb0zf.fsf@gnu.org> <6158BB83-3C05-4CEC-BF65-A6C0DEA329CD@gmail.com> <837clybds3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20913"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67533@debbugs.gnu.org To: JD Smith Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 02 08:32:24 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 1r9KUC-0005FQ-0k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Dec 2023 08:32:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9KTk-0000D4-73; Sat, 02 Dec 2023 02:31:56 -0500 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 1r9KTh-0000CV-Go for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2023 02:31:54 -0500 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 1r9KTh-00041e-5o for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2023 02:31:53 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r9KTp-0007BJ-Ug for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2023 02:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Dec 2023 07:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67533 X-GNU-PR-Package: emacs Original-Received: via spool by 67533-submit@debbugs.gnu.org id=B67533.170150227627552 (code B ref 67533); Sat, 02 Dec 2023 07:32:01 +0000 Original-Received: (at 67533) by debbugs.gnu.org; 2 Dec 2023 07:31:16 +0000 Original-Received: from localhost ([127.0.0.1]:56579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9KT5-0007AI-Ps for submit@debbugs.gnu.org; Sat, 02 Dec 2023 02:31:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9KT4-0007A4-BO for 67533@debbugs.gnu.org; Sat, 02 Dec 2023 02:31:14 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9KSp-0003UA-Bf; Sat, 02 Dec 2023 02:30:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=j1pmKtK8uO2CeEm2NeQGVxkzOhtVHGhuxhXLAqsddLc=; b=BoUX9zFlazkIUFgVhmEl GTEf+KT6SF2c8QbrGlF5BiugV5vpkjecrqxQ7gaPP6ytkoDyUMpR8hcRADXto3Pqv7xlGQsBzSrKi Wmt89C5c+Kemx+F2zfGK9XXAIb5rQAsZItqkbKj3ILWPtHK+8PlJK4vQ1zlLW3mHVQuyQqQVf1OYt LVDZeyPOcnnrs/WDr7HW3+Z2nYlOCsTpf9IEY0ot1YbInZvrNn4JZWRIqkCRIsgP276YYoGgJcclZ yy1K3Dqlj+VZN8GlZ77RFMTxyBHPpbXJVM2XPldj98wjoDkSCWv2Vk5GzYZig8aQB5up3r5gca3Zd DDoXPaTlAf8RRQ==; In-Reply-To: (message from JD Smith on Fri, 1 Dec 2023 17:04:59 -0500) 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:275354 Archived-At: > From: JD Smith > Date: Fri, 1 Dec 2023 17:04:59 -0500 > > On Dec 1, 2023, at 2:08 AM, Eli Zaretskii wrote: > > Thanks, but I need recipes I could reproduce on my system, and > reproduce relatively easily. > > Please find a stand-alone reproduction code which can separately test both text-property and overlay > inline SVGs at this gist. See the header for instructions. Thanks, but I'd appreciate more focused pointers to specific problems, see below. I also seem to be unable to reproduce the problems(?). > You should get many reported errors in which the size above is larger than expected, but as you > narrow your frame and re-run the check, you’ll eventually find some images reporting 0 height above. > Interestingly, for the same frame width, overlays produce some of the same but overall fewer errors > than text-properties, using precisely the same images for ‘display. What is/are the specific problem(s) I should be looking into? Is the problem only the zero size when it is reported? Or are there also other problems, and if so, how do I recognize where and when they happen? > The report also reveals that the posn-x-y of the mis-reporting images is usually wrong, which is at > least partially responsible for incorrect pixel position measurements. Again, can you point me to the situations when this happens and tell how to realize it did happen? I'd need to reproduce those specific situations under a debugger. When I run "M-x my/check-buffer-pixel-values" in the buffer created by "M-x my/test-svg-positions", all I see is a single message "End of buffer", nothing else. I've resized the frame horizontally many times, and I still see only this single message. So either the code somehow doesn't work on my system, or I am missing some important part of the reproduction recipe. Also, your test file doesn't use lexical-binding -- should it? Or does it not matter for the purposes of reproducing these issues? > The one bug in my original org file I haven’t been able to reproduce is random text characters (usually > on a line with a bad image) misreporting pixel measurements. Misreporting pixel measurements of what? > BTW, I haven’t tested it, but I do not think this misbehavior is specific to SVG images. I don't think it is. The display engine has no idea about the source of the image data, all it cares about is that it is an image of a given size and given attributes.