microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
94.93k stars 8.22k forks source link

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

Open MikeTheGreat opened 5 years ago

MikeTheGreat commented 5 years ago

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)

DHowett-MSFT commented 5 years ago

It should probably work.

djsavvy commented 4 years ago

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?

MikeTheGreat commented 4 years ago

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 :) )

DHowett commented 4 years ago

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

marcelwgn commented 5 months ago

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...