GNU bug report logs - #61974
29.0.60; customize checkbox and radio widgets don't render on macOS

Previous Next

Package: emacs;

Reported by: David Caldwell <david <at> porkrind.org>

Date: Sun, 5 Mar 2023 01:36:02 UTC

Severity: normal

Found in version 29.0.60

Full log


Message #11 received at 61974 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61974 <at> debbugs.gnu.org, David Caldwell <david <at> porkrind.org>
Subject: Re: bug#61974: 29.0.60; customize checkbox and radio widgets don't
 render on macOS
Date: Sun, 05 Mar 2023 16:01:10 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Sat, 4 Mar 2023 17:35:16 -0800
>> From: David Caldwell <david <at> porkrind.org>
>> 
>> Fails:
>> 
>>    (insert-image (find-image '((:file "checked.svg"))))
>> 
>> Works:
>> 
>>    (insert-image (find-image '((:file "splash.svg"))))
>> 
>> It appears to be because the checkbox and radio svgs in etc/images all
>> use height="1em" and the mac native renderer doesn't like that.
>> 
>> It works with rsvg because the emacs code that interfaces with rsvg code
>> passes some extra styling info to it so that it can render that properly
>> (image.c:11226 in the emacs-29 branch for me today).
>> 
>> Unfortunately the native renderer in nsimage.m doesn't do this. I spent
>> some time today trying to figure it out, but it appears that the cocoa
>> apis just don't have this feature, so it would have to be done some
>> other way.
>> 
>> I can confirm this is the issue by opening "etc/images/checked.svg",
>> hitting "C-c C-c" to edit, changing the "1em" to "16" and "C-c C-c"ing
>> again to re-render it. It will appear with a non-percentage height.
>
> Does it work to use the checked.xpm image instead?  If it does,
> perhaps we should switch the macOS build to using the XPM images
> (assuming the problem you report is common to all macOS builds, that
> is).

Shouldn't we disable SVG display with native image APIs instead?
In general, the native image API code we have at present cannot
display SVG images as well as librsvg, because it cannot know the
scale at which the image will be displayed.




This bug report was last modified 2 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.