From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#59802: 30.0.50; Checkbox button not rendered Date: Sun, 11 Dec 2022 23:40:38 +0100 Message-ID: <87sfhlpnrt.fsf@gmx.net> References: <87v8mshit6.fsf@ledu-giraud.fr> <838rjoendw.fsf@gnu.org> <87r0xgh7c3.fsf@ledu-giraud.fr> <83zgc4crg6.fsf@gnu.org> <87ilisgxbi.fsf@ledu-giraud.fr> <83lenocoge.fsf@gnu.org> <87edtggol3.fsf@ledu-giraud.fr> <83359vd535.fsf@gnu.org> <87cz8s3gq7.fsf@ledu-giraud.fr> <83sfhozreh.fsf@gnu.org> <87ilik8zjs.fsf@gmx.net> <83v8mjweqm.fsf@gnu.org> <87h6y3447l.fsf@gmx.net> <83cz8rw5pq.fsf@gnu.org> <874ju2qe3a.fsf@gmx.net> <83k02yszqf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1831"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: manuel@ledu-giraud.fr, 59802@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 11 23:41:12 2022 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 1p4V0S-0000HU-JI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Dec 2022 23:41:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4V0L-0008Tk-Ht; Sun, 11 Dec 2022 17:41:05 -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 1p4V0J-0008TE-Bq for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 17:41:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4V0I-0000gF-Ts for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 17:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4V0I-00047I-AI for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 17:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Dec 2022 22:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59802 X-GNU-PR-Package: emacs Original-Received: via spool by 59802-submit@debbugs.gnu.org id=B59802.167079845315808 (code B ref 59802); Sun, 11 Dec 2022 22:41:02 +0000 Original-Received: (at 59802) by debbugs.gnu.org; 11 Dec 2022 22:40:53 +0000 Original-Received: from localhost ([127.0.0.1]:48634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4V08-00046u-Jr for submit@debbugs.gnu.org; Sun, 11 Dec 2022 17:40:53 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:58259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4V06-00046m-AB for 59802@debbugs.gnu.org; Sun, 11 Dec 2022 17:40:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1670798439; bh=kXv5bkIPrK1e//xHIy4lRf1zfRpKqUbk/gWjl9Lhd3k=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=fSSe/usZXByBSrbguZlTTW6rjFo/usSSeHUZjw//77VM4M7g6LrzX9VM0pVzaQUpC VDyv2YSGA0jUXt9ObUd3xVBmOguTSAAMLibjN0qGTEUfQeLsy1aAqtoSZ2UEd5x/fm 1M5UcrgRfU+A3RsmYbTgKvPTJYvMwQAU8smndy2/MmlvXfCExY0N+7QUpTZ5t/aHns 2sSV2z67Jb/9O9HZH+sR2SMkZWmdAhL+zJ4BPUbDmi7MgkuZpCBjgE/EJBpRKf/Y1Y gAui49+hPEqnNpl3OWpWbZODx2oGohoBJyYamgvnZ7Yi1noNIZjANCX6gvFuY17iWQ yK0rjs6vK9QGg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([89.246.36.217]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MybGh-1ojuoc2BW1-00ywDv; Sun, 11 Dec 2022 23:40:39 +0100 In-Reply-To: <83k02yszqf.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 11 Dec 2022 17:54:00 +0200") X-Provags-ID: V03:K1:SWBTrm38RFHHvBEp9E4uWDgdQykiJAvo4KItMA3e+T//8phIj4z n9zUHADbTTuVYkfnBPgwk5jh8zVCQJR6CSe8yS5ZoyJs11/FUYSw1ATQxJ8DSMGzJrx7547 rNxKNXoG3j1Hlw9BNSrIh3FHqC2hcQTV0VJYZ4oEoiCsDSXnjqf4X3aZXsZMh6HiCfzQXve nvbzq8UyWD5gfvyt/XTdA== UI-OutboundReport: notjunk:1;M01:P0:rTCxoflsbzg=;u/oFP+AnwBIi05WmufV15VMY3FZ P5KsFk5Ibeso28NvYlhI+ZYNuAqyg73BFleOjI47zcEG13nUOvYEA37K6vJWPrU9w9Dxy6/J/ OMkf9tHmMBxm6GDxwSEWckrVT8IZm57jEX9C2xmaiHavD/D4BW5wV069zxWR2eBsi0l1e0p5k bodyhCGZwzfH2cpxUOwCxNut6pbp06D5dougSh38QCxc3D5UF7YJZlpz3m+kk70znYpKndnOr FTmqqMzOG9pZAp6vcmlChnx+6xkIatI8/OWqT8iu37VJGRCvxZahSNYzzmeercMA87++hOklP ATThfV8XpqxmQwMnjYXL1u4ujlufJ2Bf3TD8k86w04wndNeW0voNx0v4hK2MsetRFeZNhi+Le C3GcV8KoDEDXNJW+lTpgcfCpjdlpEbYZpjGbsAsi5W86XjZzB+IPk4nJ9NQ02mCoS2PLe4MWK qNtAixed0/7k2NUJ2QzYGJ5h1UvSKe40vN3t3Ydl106vg9ruS143HjgFh1nDfEnIBHXZgwIko e7c7er3OjPAkST3TDQrmoHzDLMxnZG4w92WXs6F5XxpcKEP+XTe+IRZXYUJ+DXjuPjkDXmkFe k89PbRfbCJrRd3CTnKUNc0eZ+QMivYpqGOuSZ54K5zFHRz6j0u3SfEN/OXzJ3S8hMsf5CCbco tPtX8VeukUpuiQybpALANmBNGg5y+iQDO3+Gqb8iSYnaXqnt2PsfuWr3F/XWotgUrSe+JHVtH edz9sT1RdNu/Hx4QjFcbE2bZ7bsl1hbXnoJiDD9iZhlk63mhU30l1u5BF1YSkHo3SzHsXu7a 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:250659 Archived-At: On Sun, 11 Dec 2022 17:54:00 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: manuel@ledu-giraud.fr, 59802@debbugs.gnu.org >> Date: Sun, 11 Dec 2022 14:12:09 +0100 >> >> When I visit the SVG image file the image scales without any display >> problem, so the problem apparently only arises with text scaling. And >> not just via face-remapping with text-scale-mode: when I evaluate >> (set-face-attribute 'default nil :height 200) and then insert >> emacs/etc/images/checked.svg with insert-image-file, the bottom half of >> the image is truncated like in the "+4" buffer in the screenshot I >> attached to my first post in this thread. (When the image is displayed >> via put-text-property, explicitly passing `:ascent center' does correct >> the initial alignment, but on increasing the font size with `C-x C-+' >> the image still gets pushed down just like in the screenshot I posted.) > > In the Custom buffers, we already use ":ascent center" for images, so > they should scale correctly. If they don't, the place to look is in > the produce image_glyph function: look at the values of ascent and > descent computed there. Maybe something goes wrong there when the SVG > images are scaled. Here's what I tried and the output I got: I started gdb with `M-x gdb' and set a breakpoint at xdisp.c:30795, which is the first line after these two lines: it->ascent =3D it->phys_ascent =3D glyph_ascent =3D image_ascent (img, f= ace, &slice); it->descent =3D slice.height - glyph_ascent; Then I started emacs -Q, typed `M-x customize-face RET bold RET' and hit the breakpoint. Now the *locals of emacs* buffer displayed this: struct it * it 0x7fffffff8a70 struct it * it@entry 0x7fffffff8a70 struct image * img 0x5555563f5fb0 struct face * face 0x555555e5ca10 int glyph_ascent 13 int crop struct glyph_slice slice { x =3D 0, y =3D 0, width =3D 16, height = =3D 16 } In the *gud-emacs* buffer I typed `pp it->ascent' and then `pp it->descent' and the *input/output of emacs* buffers displayed this: # # In the *gud-emacs* buffer I typed `c', which immediately hit the breakpoint again. I then kept typing RET until the Emacs being debugged became accessible, now showing the *Customize Face: Bold* buffer. Now the *locals of emacs* buffer displayed this: struct it * it 0x7fffffff8a70 struct it * it@entry 0x7fffffff8a70 struct image * img 0x5555569f4dd0 struct face * face 0x555555e5ca10 int glyph_ascent 12 int crop struct glyph_slice slice { x =3D 0, y =3D 0, width =3D 15, height = =3D 15 } In the *Customize Face: Bold* buffer I typed `C-x C-+' and hit the breakpoint again, and the *locals of emacs* buffers now displayed this: struct it * it 0x7fffffff8a70 struct it * it@entry 0x7fffffff8a70 struct image * img 0x5555560bcc00 struct face * face 0x5555562f4110 int glyph_ascent 14 int crop struct glyph_slice slice { x =3D 0, y =3D 0, width =3D 16, height = =3D 16 } In the *gud-emacs* buffer I again typed `pp it->ascent' and then `pp it->descent', which added the following to *input/output of emacs*: 3 0 I repeated the above steps for a few more iterations, getting similar output: glyph_ascent ranged from 12 to 19; width and height switched back and forth between 15 and 16; the following values of it->ascent and it->descent were added to *input/output*: # # # # # # # # nil 4 -1 # # At this point the latter two values repeated for two iterations, then when the *Customize* buffer became accessible again, with text scaling at +5, I could now type `C-x C-+' without hitting the breakpoint. I went as far as +12, then typed `C-x C--' and when the scaling got back down to +6 again, that hit the breakpoint again. Now the values returned by `pp it->ascent' and `pp it->descent' were again the last two above. If this isn't isn't useful, please advise me what to do. Steve Berman