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#61974: 29.0.60; customize checkbox and radio widgets don't render on macOS Date: Sun, 05 Mar 2023 10:26:45 +0200 Message-ID: <83r0u38uyi.fsf@gnu.org> References: <10c87ff5-223f-9300-5ecd-46317fa98881@porkrind.org> <831qm3af59.fsf@gnu.org> <87jzzvtynt.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26522"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61974@debbugs.gnu.org, david@porkrind.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 05 09:28:18 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 1pYjj7-0006lT-LL for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Mar 2023 09:28:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYjiu-0004wh-MI; Sun, 05 Mar 2023 03:28:04 -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 1pYjis-0004wG-GM for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2023 03:28:02 -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 1pYjis-0005th-8H for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2023 03:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYjis-0006y7-4Q for bug-gnu-emacs@gnu.org; Sun, 05 Mar 2023 03:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Mar 2023 08:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61974 X-GNU-PR-Package: emacs Original-Received: via spool by 61974-submit@debbugs.gnu.org id=B61974.167800482226706 (code B ref 61974); Sun, 05 Mar 2023 08:28:02 +0000 Original-Received: (at 61974) by debbugs.gnu.org; 5 Mar 2023 08:27:02 +0000 Original-Received: from localhost ([127.0.0.1]:38404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYjhu-0006wf-DM for submit@debbugs.gnu.org; Sun, 05 Mar 2023 03:27:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYjhs-0006w9-Ma for 61974@debbugs.gnu.org; Sun, 05 Mar 2023 03:27:01 -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 1pYjhn-0005gp-E1; Sun, 05 Mar 2023 03:26:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=LQFb4bHQaMoFitfQhJ0C/pvvlqqplcFhvvCrZ3VZwRQ=; b=gBlPK9w6gb/I XuKsndoxM1u8jns7JMR/m3femaQkH9RJbxrETXjDhRx1+zP8TcHSsgClXArdj8DKN0BClqOGChjxr mmbDiA/Gvxq38E41jyHDaMLvAPqnW8osvKM6Ys57nytDkoxqeUUr9maX8RNTH+Um5BQccUxUXnY1M eeCJc2JAyOg4KwvxGLBW3gG02bahLvRJh74FmF/ghJwQQNE7tp2zwpZ0Q/jp0J+1fXw4pNP4YhJT9 hcmuuj3uIVPVQCPGEbnqWmu9vEq0YL8ZUhRZQe0nGV1x9G/IZBT2rU0Np0k8RB42xBTHTWkqHvg7d c7sH476z1gyUwjMowGGorQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYjhm-0006WZ-TO; Sun, 05 Mar 2023 03:26:55 -0500 In-Reply-To: <87jzzvtynt.fsf@yahoo.com> (message from Po Lu on Sun, 05 Mar 2023 16:01:10 +0800) 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:257342 Archived-At: > From: Po Lu > Cc: David Caldwell , 61974@debbugs.gnu.org > Date: Sun, 05 Mar 2023 16:01:10 +0800 > > Eli Zaretskii writes: > > >> Date: Sat, 4 Mar 2023 17:35:16 -0800 > >> From: David Caldwell > >> > >> 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.