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: Using more and/or better icons in Emacs Date: Fri, 9 Apr 2021 20:30:14 +0100 Message-ID: References: <597310b6-892c-a7d9-a663-f270ed3b0f0e@yandex.ru> <2f0b4786-d569-27e6-fa8a-fb47bf08b166@yandex.ru> <0279fbc8-74c3-3766-2b26-b3eb933a501e@yandex.ru> 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="5195"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Dmitry Gutov To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 09 21:33:07 2021 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 1lUwsN-0001Ft-3F for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Apr 2021 21:33:07 +0200 Original-Received: from localhost ([::1]:44124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUwsL-0007qD-Oi for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Apr 2021 15:33:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUwpz-00071o-QD for emacs-devel@gnu.org; Fri, 09 Apr 2021 15:30:39 -0400 Original-Received: from outbound.soverin.net ([2a01:4f8:fff0:2d:8::218]:33185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUwpx-00086T-05 for emacs-devel@gnu.org; Fri, 09 Apr 2021 15:30:39 -0400 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 2EA50601B7; Fri, 9 Apr 2021 19:30:18 +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=1617996617; bh=txRI0gGzlN/JdMz4WIPDgvcySdqG9JCgHcEPv+Un1Hc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P4hRwTOJ9XdAQjSEI8zHBFSn+00990D/YN8mtTBw/vzTrIldh+MHnVNsCOdyg0aHt 2tNcH4ruvdYxkdQ8H4gtc/mIXOkjz/F/djp/60AAl3oeIqW/JRv1u31+jTmG+6oZ+z Dv9wZb+kP4Qm3DPgHyCl8f3o1GE4zqn0DVS/IpieGlwtyZ84ys12frUOtHUwbKzsR1 yYTWpVGuu9bf9pCkVGDqcHAIeOm2+bFoBlMoJxUMWyp9HF6cYtlMUqht3mWArYINm7 OIkHdPVn0xPMgPbnISXHqUub/1W9hCcUdR6lJJl7GenvsvhMx3DG/jMjCis1ESO5WL KxTB6htROGJOw== Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 7CA2A202BBB642; Fri, 9 Apr 2021 20:30:14 +0100 (BST) Mail-Followup-To: Alan Third , Stefan Kangas , Dmitry Gutov , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=2a01:4f8:fff0:2d:8::218; envelope-from=alan@idiocy.org; helo=outbound.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_PASS=-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.23 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" Xref: news.gmane.io gmane.emacs.devel:267746 Archived-At: On Fri, Apr 09, 2021 at 12:46:57PM -0500, Stefan Kangas wrote: > For this to work, we obviously need to insert SVG files that are the > same height as the current face. > > Experimenting with this now, using my patch, > > (insert-image (find-image '((:type svg > :file "material/file/ic_folder_24px.svg")))) > > I'm getting an SVG in the buffer that is actually taller than the line. > When we added new SVG icons to customize recently, Alan Third fiddled > with the height and viewport in the SVG file to force it to be the same > height as the line. > > But is there any way to do this directly from Emacs? It seems like a > pain to have to edit the SVG file for every icon (and my attempts at > doing so has failed so far...). Something like (insert-image (create-image "my/svg/file.svg" 'svg nil :height (line-pixel-height) :ascent 'center)) Although it won't tie in quite as neatly as having the actual SVG height set to 1em or whatever. -- Alan Third