This project is read-only.

Text Wont Convert

Mar 9, 2012 at 12:42 AM
Edited Mar 9, 2012 at 12:43 AM

Could someone please help me as to why the SVG file located here - does not convert the text labels in the chart?

(Sorry had to zip it. Server wouldn't "serve" the SVG file.)

I'm using just a simple 

svg.Draw().Save("File Location")

and the result is this -

TIA - Shawn

Mar 9, 2012 at 1:15 AM

Hey Shawn,

It appears to be that the library doesn't support the 'complex' font syntax in the style attribute. I can't work out why, because the standard FontConverter class should support that syntax (or at least similar ones).

If possible, change:


<text  x='33' y='301' style='font: 12px Arial' fill='#232323'>$0</text>



<text  x='33' y='301' font-size='12px' font-family='Arial' fill='#232323'>$0</text>

If that isn't possible, another option would be to pull down the source code and create a TypeConverter that can change your existing format into a Font type. Then you can register it on the SvgText.Font property using TypeConverterAttribute.


Mar 9, 2012 at 1:17 AM

Thanks I did:

strSVG = strSVG.Replace("style='font: 12px Arial,Helvetica,sans-serif'", "font-family='Arial,Helvetica,sans-serif' font-size='12'")

strSVG = strSVG.Replace("style='font: 16px Arial,Helvetica,sans-serif'", "font-family='Arial,Helvetica,sans-serif' font-size='16'")


And it worked like a charm!