On Fri, Mar 12, 2021 at 08:44:55PM -0600, Stefan Kangas wrote: > Alan Third writes: > > > On Thu, Mar 11, 2021 at 10:01:11PM +0200, Eli Zaretskii wrote: > >> > > >> > I think SVG is obviously much preferable to XPM, but there is still the > >> > problem that the images don't scale with the text. Do we have a general > >> > solution to that? If not, should we have one? > >> > >> With SVG, I believe we could. (We can scale other kinds of images as > >> well, but they don't look well when enlarged, AFAIK.) > > > > I've been thinking about this, and assuming we can extract the font > > name and size from the face in C then we can create a default CSS > > stylesheet that should make 1em in an SVG equivalent to the actual > > Emacs font height. > > I took a stab at adding SVG icons, as found in the GNOME Adwaita Icon > Theme. I had to scrub some color details from the SVG files by hand, > but they now seem to automagically adapt to the :foreground and > :background of the current face (but I could be wrong about that as I > don't understand how this is supposed to work). > > How would a patch like the attached relate to the changes you propose, > Alan? I've attached a proof of concept patch for what I'm talking about. Stefan's patch must be applied first and it requires at least librsvg 2.48 and might foul up if create-image starts automatically changing scale (it's fine here). Does this look like the sort of behaviour you were thinking of, in terms of icon sizing? -- Alan Third