[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using more and/or better icons in Emacs
From: |
Stefan Kangas |
Subject: |
Re: Using more and/or better icons in Emacs |
Date: |
Fri, 9 Apr 2021 20:43:56 -0500 |
Stefan Kangas <stefan@marxist.se> writes:
> Basing myself on that I have ended up with the following fragment:
>
> (let* ((scale (cadr (assoc :height (assoc 'default face-remapping-alist))))
> (family (face-attribute 'default :family))
> (height (* (aref (font-info family) 2) (if scale scale 1)))
> (ascent (* (aref (font-info family) 8) (if scale scale 1))))
> (insert-image (create-image "material/action/ic_search_24px.svg" 'svg nil
> :height height
> :ascent 'center)))
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?
- Re: Using more and/or better icons in Emacs, (continued)
- Re: Using more and/or better icons in Emacs, Dmitry Gutov, 2021/04/09
- Re: Using more and/or better icons in Emacs, Dmitry Gutov, 2021/04/09
- Re: Using more and/or better icons in Emacs, Stefan Kangas, 2021/04/09
- Re: Using more and/or better icons in Emacs, Dmitry Gutov, 2021/04/09
- Re: Using more and/or better icons in Emacs, Stefan Kangas, 2021/04/09
- Re: Using more and/or better icons in Emacs, Eli Zaretskii, 2021/04/09
- Re: Using more and/or better icons in Emacs, Alan Third, 2021/04/09
- Re: Using more and/or better icons in Emacs, Alan Third, 2021/04/09
- Re: Using more and/or better icons in Emacs, Dmitry Gutov, 2021/04/09
- Re: Using more and/or better icons in Emacs, Stefan Kangas, 2021/04/09
- Re: Using more and/or better icons in Emacs,
Stefan Kangas <=
- Re: Using more and/or better icons in Emacs, Alan Third, 2021/04/10
- Re: Using more and/or better icons in Emacs, Stefan Kangas, 2021/04/10
- Re: Using more and/or better icons in Emacs, Alan Third, 2021/04/10
- Re: Using more and/or better icons in Emacs, Alan Third, 2021/04/12
- Re: Using more and/or better icons in Emacs, Stefan Kangas, 2021/04/12
- Re: Using more and/or better icons in Emacs, Alan Third, 2021/04/13
- Re: Using more and/or better icons in Emacs, Stefan Kangas, 2021/04/13
- Re: Using more and/or better icons in Emacs, Alan Third, 2021/04/13
- Re: Using more and/or better icons in Emacs, Stefan Kangas, 2021/04/13
- Re: Using more and/or better icons in Emacs, Eli Zaretskii, 2021/04/14