bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47074: Replace XPM icons with Unicode codepoints in customize/widget


From: Alan Third
Subject: bug#47074: Replace XPM icons with Unicode codepoints in customize/widgets
Date: Fri, 12 Mar 2021 18:25:34 +0000

On Fri, Mar 12, 2021 at 09:27:01AM +0200, Eli Zaretskii wrote:
> > Date: Thu, 11 Mar 2021 23:49:54 +0000
> > From: Alan Third <alan@idiocy.org>
> > Cc: Stefan Kangas <stefan@marxist.se>, 47074@debbugs.gnu.org
> > 
> > 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.
> 
> The font details can be accessed from Lisp as well, if that's more
> convenient.

It depends. Doing it at the C level means it Just Works for all SVGs.
That is if you put unstyled text into any SVG it would appear with the
size and font of the surrounding face rather than whatever the librsvg
default setting is.

Doing it in lisp would require a little more care.

> > Alas it doesn't resize the image as you scale with C-x C-+.
> 
> Why not? what is preventing that?

Simply that we're inserting an image and to change it we'd have to
regenerate it. If it were being done as part of a mode (this bug
report is about customize, so in there I guess?) it should be possible
to make it fix it.

> > Perhaps there is some way to mark certain SVGs as part of the UI and
> > regenerate them?
> > 
> > Yet another alternative is to define a different text property (or
> > whatever) that only draws SVGs, but on the fly so there's no caching
> > and we can put them anywhere in the frame. But that might not be a
> > good idea.
> 
> if these two paragraphs explain why the images currently don't resize
> with the text scale, I don't think I follow the reasoning.  Please
> elaborate.

No, I was just listing off the different ways I could think of to make
SVGs appear more coupled to the text.
-- 
Alan Third





reply via email to

[Prev in Thread] Current Thread [Next in Thread]