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.devel Subject: Re: Mechanism to scale SVG images when default face height changes? Date: Mon, 18 Sep 2023 19:19:58 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13771"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs-Devel devel To: Jimmy Yuen Ho Wong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 18 20:21:14 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qiIrx-0003NM-RR for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Sep 2023 20:21:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiIr2-00031E-5Z; Mon, 18 Sep 2023 14:20:16 -0400 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 1qiIqv-00030E-Hp for emacs-devel@gnu.org; Mon, 18 Sep 2023 14:20:09 -0400 Original-Received: from dane.soverin.net ([185.233.34.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiIqq-0006t0-7c for emacs-devel@gnu.org; Mon, 18 Sep 2023 14:20:09 -0400 Original-Received: from smtp.soverin.net (c04smtp-lb01.int.sover.in [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4RqCkl2dTTz2xgR; Mon, 18 Sep 2023 18:19:59 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net (Postfix) with ESMTPSA id 4RqCkk72PSzLb; Mon, 18 Sep 2023 18:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1695061199; bh=ObnljKWpVVPYpihwe0qTvs96F1LWFoljGUfE5l0JesM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SK8WVSzxV8zaiY50UKIQ3V09A3oacYgFCJ70/CXaJHDo8kJUeAIMj3kWH3PVwRM6Q d0XQRB6w1syv+M+1AIrYkGcVtAVLJzdFUAfL4f7COz4Pc2YNUTcT5JPJf5Rj+EwOL/ rFy2+07cSiUSYKztD2PYHo7PcU2jryVTKQJWbo87hE8RTr2TIODrhLkNwtNbxRc+i5 +52NPYL7DnoSZT98R2W5uQ8EbTzIR0Q0lD/YOjftqoXBMSfkB9WduH3sFLukEx1Ei8 LCmuWhj37QD+KFTfowKEWba4cS+BnhGO7QESmDbdcExD+QkmUnJqNSyeH9Sq42G+Ad Jk/KA+DkVYobQ== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.96) (envelope-from ) id 1qiIqk-000BAO-1n; Mon, 18 Sep 2023 19:19:58 +0100 X-Soverin-Authenticated: true Mail-Followup-To: Alan Third , Jimmy Yuen Ho Wong , Emacs-Devel devel Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=185.233.34.31; envelope-from=alan@idiocy.org; helo=dane.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310715 Archived-At: On Mon, Sep 18, 2023 at 06:42:33PM +0100, Jimmy Yuen Ho Wong wrote: > In the SVG branch in all-the-icons, all the icons are inserted with a > `:width` and `:height` properties set on the image, and the face is applied > to the propertized string. i.e. > > ```elisp > ELISP> (all-the-icons-icon-for-file "test.js") > #("" 0 1 > (face all-the-icons-lpurple font-lock-face all-the-icons-lpurple > fontified t display > (image :type svg :data " height=\"512\"> " :scale 1 > :transform-smoothing t :width 14 :height 14 :ascent center :margin 1) > front-sticky nil rear-nonsticky t)) > ``` Do you need to set the size in pixels? If you set the size in em's (from Emacs 28 up) then it will scale automatically. -- Alan Third