Uno: Support for Svg

Created on 28 Oct 2019  路  4Comments  路  Source: unoplatform/uno

What would you like to be added:

WinUI has SvgImageSource which lets you display svg assets.

Why is this needed:

Usage of SVGs helps making apps as small as possible and also scale better to various screen sizes

For which Platform:

  • [x] iOS
  • [x] Android
  • [x] WebAssembly
  • [ ] WebAssembly renderers for Xamarin.Forms
  • [ ] Windows
  • [ ] Build tasks
  • [ ] Solution Templates

Anything else we need to know?

If we add this, we would probably want to make sure svg assets are supported in shared code, if not already supported. (see #1839)

Here is an example of SVG support in Wasm: https://playground.platform.uno/#2be09f62

  • iOS does have minimal in-box support for SVG
  • Android would need to use GlideX or similar to provide this feature. This would be a replacement for UniversalImage Loader that uno uses for its templates.
epic kinenhancement platforandroid platforios projecmedia projecshapes-brushes

Most helpful comment

As an FYI, currently already working in both UWP and WASM:

svg

All 4 comments

Definitely a great feature to have.

As an FYI, currently already working in both UWP and WASM:

svg

A good in UWP for image scaling on an SvgImageSource:

https://stackoverflow.com/a/51241460/973342

Stack Overflow
Since the creators update came out, uwp can use svg images as briefly explained here (minute 3). I have this svg (48x48) and i can use it fine, if (and only if) i set the image's width&height ...

The same issue with macOs and Skia (Linux)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisevans9629 picture chrisevans9629  路  4Comments

JanabiSoft picture JanabiSoft  路  3Comments

bricelam picture bricelam  路  3Comments

PylotLight picture PylotLight  路  3Comments

Ali-YousefiTelori picture Ali-YousefiTelori  路  4Comments