From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Using more and/or better icons in Emacs Date: Sat, 10 Apr 2021 05:56:32 -0500 Message-ID: References: <2f0b4786-d569-27e6-fa8a-fb47bf08b166@yandex.ru> <0279fbc8-74c3-3766-2b26-b3eb933a501e@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27297"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Dmitry Gutov To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 10 12:57:16 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 1lVBIh-0006yB-Et for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 12:57:15 +0200 Original-Received: from localhost ([::1]:50282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVBIg-0003q0-FJ for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 06:57:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVBI4-00030w-5M for emacs-devel@gnu.org; Sat, 10 Apr 2021 06:56:36 -0400 Original-Received: from mail-pl1-f171.google.com ([209.85.214.171]:46800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVBI2-0005oo-NK for emacs-devel@gnu.org; Sat, 10 Apr 2021 06:56:35 -0400 Original-Received: by mail-pl1-f171.google.com with SMTP id m18so1751017plc.13 for ; Sat, 10 Apr 2021 03:56:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=5yYQaJYEzd1dpwQvQAcR7mhFoKp/7ohAk8rEXdXKl0A=; b=uITBSM2oyrtvSWtKfc8Y/k2kE2IzP1e0M06qxWo/kQKfCM81nVpJE52QOhU5qPdOQn wPvsAA6DVJM7JGpvyF5cs+CIJmmdi6wteaSVVuScEPHgQVlhMDArU9QMxBAUm60l8HPO S3w2mTIPkxSztc6+vopVozt58AJvzQiv3YC13pKb0raOMvE3DlvSzRDaRoyBajZ/fd0P gYJS8h56rH5IyLxcHeO9St2OkXXHJ8zOD9PGFcxTFcMgyV4XfGHnELtBPghlGR/Druxl CJO1AiCySjZ7e/FXTk8eD4LCeqEsDfBVE9tqXlGLmOlTaLiNYNuVPD0tJMIETUzPJmNs lgig== X-Gm-Message-State: AOAM533oKIVUnPX2I7XhshJvmvYCaINWvKbgkgjN0138D+r9sslXPBMB vhT9M4iX/p1Ma8QxfSAYicHHFsgc+vVVi1nBfN8= X-Google-Smtp-Source: ABdhPJy1T6yox8rqY2d4vzbEb3f93s1rDGT4nijaYCIyFf4kEiBLDpw60kpSgOErvOGQAn4yEDFoxytYpx6g1fCS6NM= X-Received: by 2002:a17:90b:f0b:: with SMTP id br11mr6124175pjb.179.1618052193147; Sat, 10 Apr 2021 03:56:33 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 10 Apr 2021 05:56:32 -0500 In-Reply-To: Received-SPF: pass client-ip=209.85.214.171; envelope-from=stefankangas@gmail.com; helo=mail-pl1-f171.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:267800 Archived-At: Alan Third writes: >> Hmm, I'm now testing simply using this, with width and height set to 1em >> in the SVG file: >> >> (insert-image (create-image "material/action/ic_search_24px.svg" 'svg nil >> :ascent 'center)) >> >> And it seems to do precisely the correct thing, as well as work with >> `text-scale-adjust'. So perhaps that's the winner? > > Yes, sorry, I seem to have caused some confusion. I thought you were > asking how to do the same thing without modifying the files. I don't > know how to do the exact same thing, because as you say they don't > scale with the text on the fly, but it's as near as I've been able to > get. Well, I might be the cause for that as I was going back and forth a bit as I was experimenting. It is useful here to know that to get the best results there is no substitution for editing the actual files. So I'll continue experimenting in that direction for now. But is there anything lacking in Emacs' SVG and/or image support? For example, it would be very nice to be able to just do something similar to what you would do with CSS in a browser: give `:height "1em" and have it work automatically. Is it worth filing a feature request about this, or are we happy with the state of things? > So modifying the files seems like the best solution to me. It works > the best and doesn't require special code when inserting the image. Yup. Thanks a lot for your help!