Subject: bug#59802: 30.0.50; Checkbox button not rendered

From: Stephen Berman <[email-masked]>
Date: Sun, 11 Dec 2022 14:12:09 +0100

On Sat, 10 Dec 2022 19:04:17 +0200 Eli Zaretskii <[email-masked]> wrote:

>> From: Stephen Berman <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Sat, 10 Dec 2022 17:24:14 +0100
[...]
>> I create buffer "a" by typing this (with emacs -Q):
>>
>> C-x b a
>> M-: (insert-image-file "path/to/emacs/etc/images/checked.svg")
>> C-f
>> M-: (insert-image-file "path/to/emacs/etc/images/checked.xpm")
>> C-f
>> Test
>>
>> To create buffer "+2" I type `C-x h M-w' in buffer "a", and then type
>> `C-x b +2 C-y'.  However, this results in only the image checked.svg
>> being displayed in "+2", but with point not before but after the image,
>> so then I insert the image checked.xpm and the string "Test" as above.
>> Then I typed `C-x C-+' twice.  I create buffers "+4" and "+6" likewise
>> (typing `C-x C-+' four and six times, respectively).
>>
>> Concerning the line number display, after inserting checked.svg in
>> buffer "a" and typing `C-f' the mode line displays "L1".  After
>> inserting checked.xpm as above, the mode line displays "L7", and after
>> typing `C-f T' it displays "L27" and remains like that while and after
>> typing "est".  After typing `C-y' in buffer "+2" (which displays only
>> checked.svg), the mode line displays "L27" and stays like that after
>> inserting checked.xpm and typing `C-f'.  But as soon as I type "T" the
>> mode line displays "L47".  (So I was mistaken in saying the line number
>> display changes by changing the font size.)
>
> We are still discussing the problem with misalignment of images, are
> we?  Because most of what you describe is unrelated to that.  (If
> those other aspects bother you or surprise you, we can talk about that
> as well.)

Yes, that was just a parenthetical aside.  (And what I observed does
surprise me but I haven't encountered this issue in code I've used, so
it hasn't bothered me yet.  But maybe I'll file a separate bug about
this.)

> As for the misalignment, I'm guessing that your librsvg is newer than
> mine, so it supports scaling the SVG images as you scale text.  My
> librsvg doesn't support that, and so the SVG image remains aligned
> with the XPM one, slightly lower than the baseline of the text (which
> could probably controlled by the :ascent property of the image, if
> that is a problem).

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.)

Steve Berman