Text Wont Convert

Mar 8, 2012 at 11:42 PM
Edited Mar 8, 2012 at 11:43 PM

Could someone please help me as to why the SVG file located here - http://www.dominoswizard.com/register/Test.zip 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 - http://www.dominoswizard.com/register/Test.bmp

TIA - Shawn

Mar 9, 2012 at 12: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 12: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!