mntone / SvgForXaml

Draw SVG image with Win2D
MIT License
94 stars 18 forks source link

Texts disappeared while converting to PNG #3

Open JohnTortugo opened 8 years ago

JohnTortugo commented 8 years ago

First of all, thanks for putting effort on this excellent lib. It really helped me a lot!

I'm trying to convert some SVG files to PNG however at some point during the conversion all texts in the images disappear. Do you have an idea of what could be the problem?

I've attached a sample SVG file where the problem happens.

test.svg.txt

JohnTortugo commented 8 years ago

Even for this file the text does not appear in the PNG output:

/Mntone.SvgForXaml.DemoApp/Mntone.SvgForXaml.DemoApp.Shared/Assets/test1.svg

BTW, I'm using the lib on a UWP app.

mntone commented 8 years ago

Its library does not implement both parsing tag text and rendering texts. Thus they don’t draw all texts.

The behavior is by design.

JohnTortugo commented 8 years ago

Do you think this would be difficult to implement? I am not very familiar with C# but I need this feature and if it's not be very difficult I would like to spent some playing with it and contribute to your project with a patch.

Do you know any alternative lib that I could use to convert SVG to PNG on a UWP App?

mntone commented 8 years ago

I think it’s difficult. Related implementation related to text (tspan, tref) is complex. Of course, rendering basic text is easy.

Do you know any alternative lib that I could use to convert SVG to PNG on a UWP App?

As far as I know, there is next alternative SVG library.

https://github.com/damyanp/SvgWin2D

However, it doesn't have SVG to PNG conversion feather.