This project has moved. For the latest updates, please go here.

Outlining text (text -> vectors)

Oct 3, 2013 at 2:27 PM
First off: I'm very new to dxf files and have no CAD experience.
I'm however finding your project of great use for my needs, but now I'm at a loss.

I need to generate dxf files based on text input from a user (on a website)
I'm using C# and VS2010 so I have no problems getting your code to run and have also played around with the basics.
My issue is that the machine that is to read the dxf files generated does not know the font I use, and thus I need to convert the text to vectors. I was not able to find any way to do this with your code (except doing the hole thing by hand - which I hope to avoid) - is there a way??
So fare I have found these 2 apps: devfont & font-2-dxf that do the trick, but they do not seem to be controllable by for instance the command line.
So I would appreciate any input you could give me on this! - maybe you know of project specialising in this that can be used in conjunction with yours??
Thanks in advance! Kresten
Oct 3, 2013 at 6:23 PM
The library does not have a direct way to generate the outline of a true type font, but in the GDI+ there is a class, named GraphicsPath, that might be exactly what you are looking for. Check this link

You can see an example where this class is being used in There you will find a way to tessellate a true type font, and the first step, to get the polygons that represents the font outlines, is what you are trying to achieve. From here you can convert the GraphicsPath data to a set of Lines, LwPolylines, Polylines.