SvgForXaml icon indicating copy to clipboard operation
SvgForXaml copied to clipboard

Texts disappeared while converting to PNG

Open JohnTortugo opened this issue 8 years ago • 4 comments

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 avatar Feb 28 '16 20:02 JohnTortugo

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.

JohnTortugo avatar Feb 29 '16 02:02 JohnTortugo

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

The behavior is by design.

mntone avatar Feb 29 '16 04:02 mntone

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?

JohnTortugo avatar Feb 29 '16 04:02 JohnTortugo

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.

mntone avatar Mar 07 '16 00:03 mntone