all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: 61974@debbugs.gnu.org, david@porkrind.org
Subject: bug#61974: 29.0.60; customize checkbox and radio widgets don't render on macOS
Date: Sun, 05 Mar 2023 10:26:45 +0200	[thread overview]
Message-ID: <83r0u38uyi.fsf@gnu.org> (raw)
In-Reply-To: <87jzzvtynt.fsf@yahoo.com> (message from Po Lu on Sun, 05 Mar 2023 16:01:10 +0800)

> From: Po Lu <luangruo@yahoo.com>
> Cc: David Caldwell <david@porkrind.org>,  61974@debbugs.gnu.org
> Date: Sun, 05 Mar 2023 16:01:10 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Date: Sat, 4 Mar 2023 17:35:16 -0800
> >> From: David Caldwell <david@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.

My impression was that such a conclusion would be too drastic, as many
SVG images can undoubtedly be displayed.





  reply	other threads:[~2023-03-05  8:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-05  1:35 bug#61974: 29.0.60; customize checkbox and radio widgets don't render on macOS David Caldwell
2023-03-05  6:25 ` Eli Zaretskii
2023-03-05  8:01   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-05  8:26     ` Eli Zaretskii [this message]
2023-03-05 10:42       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-05 20:26         ` David Caldwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r0u38uyi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61974@debbugs.gnu.org \
    --cc=david@porkrind.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.