From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#47074: Replace XPM icons with Unicode codepoints in customize/widgets Date: Fri, 12 Mar 2021 18:21:24 +0000 Message-ID: References: <83a6r9mwgk.fsf@gnu.org> <8335x1mpdk.fsf@gnu.org> <87a6r9z0vh.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32722"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , 47074@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 12 20:24:26 2021 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 1lKnOY-0008Hi-3X for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Mar 2021 20:24:22 +0100 Original-Received: from localhost ([::1]:36038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKnOX-0003kn-60 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Mar 2021 14:24:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKmQF-0003FV-5I for bug-gnu-emacs@gnu.org; Fri, 12 Mar 2021 13:22:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKmQD-0000xp-UN for bug-gnu-emacs@gnu.org; Fri, 12 Mar 2021 13:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lKmQD-0004ma-Ou for bug-gnu-emacs@gnu.org; Fri, 12 Mar 2021 13:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Mar 2021 18:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47074 X-GNU-PR-Package: emacs Original-Received: via spool by 47074-submit@debbugs.gnu.org id=B47074.161557329918354 (code B ref 47074); Fri, 12 Mar 2021 18:22:01 +0000 Original-Received: (at 47074) by debbugs.gnu.org; 12 Mar 2021 18:21:39 +0000 Original-Received: from localhost ([127.0.0.1]:58322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKmPr-0004ly-IN for submit@debbugs.gnu.org; Fri, 12 Mar 2021 13:21:39 -0500 Original-Received: from outbound.soverin.net ([116.202.65.218]:39005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKmPo-0004lj-O2 for 47074@debbugs.gnu.org; Fri, 12 Mar 2021 13:21:38 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 0BAD260142; Fri, 12 Mar 2021 18:21:31 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1615573290; bh=wzyOV5kdO2LFbQJdmDdEe/2zoy7+aZkGBAJaI4ipKVk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nIZsfzlhn4rd4l2TjBmpoCtrX/W2+FLRniy5KDCVwcB0WJMSrKNy40cwNT0wuLi4G kbWRCjMvIyu/rLZ8245wiPBy1CTvPbPC+rRjLLCkWhU3H75VuUty7ROfYAbP0FYb6Q RqYgNfRjxoCJXTBYNYrxCGkFt27/mjw3SnfAb8iU/3lIFdqIfr8eqa3DPUDPqkg0hy adkkjlUfAjVyC/j6+MpAJ7LS6tkABz7aIduQOhFNB/9zjQ2KeAaESBgsDtK+JIOUzU BwK4HYjkypgyq6Vd0KhVt2WrKRA4KivsZbeeEgXTqCa2+X1Xd3aRO9V6VTeeJgj6WD 2Apj5vSCC1jCA== Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id B8B54202AE9E3A; Fri, 12 Mar 2021 18:21:24 +0000 (GMT) Mail-Followup-To: Alan Third , Lars Ingebrigtsen , Eli Zaretskii , Stefan Kangas , 47074@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <87a6r9z0vh.fsf@gnus.org> 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" Xref: news.gmane.io gmane.emacs.bugs:202190 Archived-At: On Fri, Mar 12, 2021 at 01:12:02AM +0100, Lars Ingebrigtsen wrote: > Alan Third writes: > > > In fact, it's possible to build an SVG within Emacs that contains the > > correct font details that will display at the correct size. > > > > Something like this: > > > > (require 'svg) > > (let* ((scale (cadr (assoc :height (assoc 'default face-remapping-alist)))) > > (height (* (/ (face-attribute 'default :height) 10) (if scale scale 1))) > > (family (face-attribute 'default :family)) > > (img (svg-create height height > > :font-size height > > :font-family family))) > > (svg-circle img "0.5em" "0.5em" "0.5em") > > (insert "XX") > > (insert-image (svg-image img :ascent 'center)) > > (insert "XX")) > > Hm... Isn't that basically what `image-compute-scaling-factor' does > already, only on the `create-image' level? Sort of, although this should produce an image that's the exact same size as the text, which I don't think we can duplicate without making image-compute-scaling-factor resize much more aggressively. Nor would we want to, generally. -- Alan Third