From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Caldwell Newsgroups: gmane.emacs.bugs Subject: bug#61974: 29.0.60; customize checkbox and radio widgets don't render on macOS Date: Sat, 4 Mar 2023 17:35:16 -0800 Message-ID: <10c87ff5-223f-9300-5ecd-46317fa98881@porkrind.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35883"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 To: 61974@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 05 02:36:23 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 1pYdIV-00097d-JK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Mar 2023 02:36:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYdIC-0002dD-Bq; Sat, 04 Mar 2023 20:36: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 1pYdIB-0002d4-32 for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 20:36: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 1pYdIA-0001Hg-RK for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 20:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYdIA-0003pT-MQ for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 20:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David Caldwell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Mar 2023 01:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61974 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167798013514682 (code B ref -1); Sun, 05 Mar 2023 01:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Mar 2023 01:35:35 +0000 Original-Received: from localhost ([127.0.0.1]:38141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYdHi-0003ok-FX for submit@debbugs.gnu.org; Sat, 04 Mar 2023 20:35:34 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYdHg-0003oc-Va for submit@debbugs.gnu.org; Sat, 04 Mar 2023 20:35:33 -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 1pYdHg-0002c1-DN for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 20:35:32 -0500 Original-Received: from sa38.galvanix.net ([98.126.48.38] helo=porkrind.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYdHe-0001DQ-HN for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 20:35:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=porkrind.org; s=bauhaus; t=1677980122; bh=b6UIgo9a+p/XlvhJU77X+mG03ec7y9o3o5XbkB+3MeA=; h=Date:To:From:Subject:From; b=dXSjfI+XAtzM2QaYli9R4+bwtnVO/cFMbtxNG4GKY+NpbuMOJi1EoK8gF6SS8Yh2j Zepy8ZdYn7R+ziMIDh1teIcG89GSHnVwwV2DBp+o5rRDWj8cM8y8PngBkTDrS6SxF4 iIp+b2Q5lm2G6++8F+CTTZa1WRXQFCDQK5Pe22ZZGfwfpPRaIvmxZEpSoagzDzsTVh k2mf9/w7QBqn6PSYV+T2N43U6x+FxlDl+ZkDKvORKAGs9uAxoxFU0J6hWf5LUrL8/g OH4DnE75WWOCrnRcZTbvD5gAO9lZ473kF1S4r1geS68KOWiZMMm6rOfnkDwChPWyaW 6JppiJyTbk16B9EaVUYRT+Pe+jraB5cmH5gOgot3zF0AjqAGm1s4Xu1UD2qQrtAtxt MfpX6iQ4vIdL3kT1YJkiVhG7ewc+2SxfUnLFotn4uI73kJPJoEGbOjY8oaD9euuh6R IVMUSDyMkBTUahKntXYnshXMLkPi9gbG5o9L4alQ33tihiDAIGGhmbB32Bv9sGPup7 tnIOL1O0eBTTHstibGeQquYCoVyrfj/dGbuwtpM4aroK11E8s3G0Mdump4F0MTL1uT 3EkVcoBC43hzISUF4Efv4Fbv5T8+HuXEbj2IKb7D5wYZDSSdvvr0bn4sXmd6D2y8Rj 0E8qmbysvoIQemp9FihJ+nmY= Original-Received: from [10.0.0.206] ([10.0.0.206]) (authenticated bits=0) by porkrind.org (8.17.1.9/8.17.1.9/Debian-2) with ESMTPSA id 3251ZLvi2328775 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 4 Mar 2023 17:35:21 -0800 Content-Language: en-US Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAACXBIWXMAAAsTAAALEwEAmpwY AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+S X8VGAAABiklEQVR42rRYSZIDIQwzLv7/ZXLoEAzeBKG7ag4DRhZeBKQ0Qr5imLWCrKwn0HImc1Mx aAvmmc/cuAT7RMYws6v/gHeb0p4/y5792GJJlLZWOPgsdV5NaRes4Xe4632sLljD7wKv1Ta74H/h MxecN1Rc2TatYcP7zb+6WFfN/zMSHg1Ymuxjrzd+DuLw6Nlekggt1hvr7KK9tRIX85jjM6GTYhfv nzXH3jBdYc4koueBs66M+Xv9O9n5ML4urWssjGeMY3if3bzGSvk30BQ46OOaxJjLCpzPJAzXrOrD z5VFh58TIiwESIiCHNxxwPTy97qDei8YdpVdyYEv6EQcK8n+iTyE/Cn1eoe7HwN+F56oErVSGtJY Q1sR2ehaUHfjvJuv0tL7qAzEbBmfF2IHrVi8zp9N0pZtQZZHOXp/sLW4+hqKvm3iccaPwP3XgnKX n8/YtVeOsnenRG7VCBFlZ5fe3LOyANCVdGAIwDs7tTXGF4hIk15/iAfSgv2UkNFItSszOG3Ha7r0 GQBerhBkHOAzmQAAAABJRU5ErkJggg== Received-SPF: pass client-ip=98.126.48.38; envelope-from=david@porkrind.org; helo=porkrind.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:257326 Archived-At: To reproduce: M-x customize-face RET bold RET It can be any face, that's just an example. In the customize buffer click or select the "Show All Attributes" button/link at the bottom. The attributes should have checkboxes in checked or unchecked states but none show up. Here's a screenshot (the cyan square is my cursor over where a checkbox should be rendered): https://porkrind.org/tmp/emacs29-customize-bug-macos.png This happens in radio buttons too, but I don't know which customize setting use those. This also happens in Emacs 28. I have not tried the master branch yet. I tried to track this down and found that even inserting the checkbox image fails, though I can insert other SVGs: 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. I really wanted to suggest a fix or a patch, but I'm stuck because I don't want to flat out turn off svgs on macOS, but I also don't want to get rid of the nice scaling that librsvg supports. Maybe nsimage.m should load the svg into memory, check for width or height being "1em" and manually changing it to something concrete before passing it to the OS? Yuck, but also it would probably work. -David In GNU Emacs 29.0.60 (build 1, aarch64-apple-darwin22.1.0, NS appkit-2299.00 Version 13.0.1 (Build 22A400)) of 2023-03-04 built on black.local Repository revision: bd5115e13479b1d81d6aa09efe362ad14d53c3c6 Repository branch: emacs-29 Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.0.1 Configured features: ACL DBUS GIF GMP GNUTLS JPEG LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Custom Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x crm thingatpt cus-edit pp cus-start cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 68647 5810) (symbols 48 7188 0) (strings 32 18140 1297) (string-bytes 1 468742) (vectors 16 11324) (vector-slots 8 174536 16175) (floats 8 38 31) (intervals 56 1508 3) (buffers 984 13))