terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Terminal cannot use SVG files in backgroundImage, icon (xaml limitation?)

Open MikeTheGreat opened this issue 6 years ago • 5 comments

Over at UsingJsonSettings.md, in the section about adding a background image it directs me to download the .SVG image in Step 1

Step 4 then says to use the .JPG: ( "backgroundImage": "ms-appdata:///Roaming/openlogo.jpg", ) but this doesn't display the image in the Terminal.

Changing Step 4 to use the .SVG also doesn't display the image

Changing the file to be an actual .JPG (downloaded from the Debian logo page ) causes the image to appear.

The docs definitely need to be tweaked :) (I'm not sure if .SVG is supposed to work or not, otherwise I'd do a PR to offer a fix)

MikeTheGreat avatar Aug 15 '19 18:08 MikeTheGreat

It should probably work.

DHowett-MSFT avatar Aug 15 '19 18:08 DHowett-MSFT

Just to counter @DHowett-MSFT, using an SVG icon does not in fact work. I'm guessing y'all are aware of this already, but I just want to make sure the latest comment on this thread reflects the current status.

@MikeTheGreat are you still interested/willing to make a PR for SVG support for icon/background files?

djsavvy avatar Jun 22 '20 15:06 djsavvy

Thanks for the shout-out, @djsavvy :)

I'm busy until after August 8th so feel free to dig in on this if it's looking interesting to you.

After that I'd like to dig in on #5506 first, I think. (No promises there, either :) )

MikeTheGreat avatar Jun 22 '20 19:06 MikeTheGreat

@djsavvy Just to be clear, I meant "Yeah this should probably be made to work" :smile:

DHowett avatar Jun 22 '20 19:06 DHowett

I'm afraid, supporting SVGs might not be that trivial due to the UWP Platform behaving quite strangely around them (e.g https://github.com/microsoft/microsoft-ui-xaml/issues/825). When testing SVGs, the results were completely broken:

Screenshots of TV test image not being rendered properly

https://upload.wikimedia.org/wikipedia/commons/b/bd/Test.svg

Screenshot of Microsoft Logo rendering as solid yellowish block

https://upload.wikimedia.org/wikipedia/commons/4/44/Microsoft_logo.svg

There might not be much we can do to support this at this point I'm afraid beside looking for other ways to render SVGs beside the UWP Image control...

marcelwgn avatar Apr 09 '24 19:04 marcelwgn