Rotate text on arc

Aug 6, 2013 at 10:57 AM
Edited Aug 6, 2013 at 8:43 PM

Is there a way to make a text object follow a circle/arc?
I want to have some text surrounding a circle, I hope you understand what I mean. :)

Also, I can't seem to find in the DXF docs if there's a way to set maximum width of a text object, if text is too long then it should be compressed, is this possible?

I've been using your project for SVG to DXF-conversion and it's working great so far!
Great work!
Aug 7, 2013 at 6:13 PM
No, there is no automatic way to make a text follow a path since there is no entity in a dxf file to represent that. You will have to do it yourself with the existing entities. If your path is restricted to circles and arcs you could use the method called PolygonalVertexes to get a list of evenly spaced vertexes, as the starting point for the base position of each character that makes the original string, but then, not all characters have the same width (except monospaced fonts).

About your second question, there is no way to get the width of a text, this kind of information is linked to the rendering system used to draw the text and this library is independent to any kind of rendering method. You could try the Graphics.MeasureString method in the System.Drawing assembly. For OpenGL you could use QuickFont a font printing library that uses OpenTK as the rendering engine.

Oct 16, 2014 at 9:27 AM
SVG to DXF using using "net dxf reader-writer"?

Can I have source code, or examples, or indications, or anything?
Thank you.

Excelente trabajo, haplokuon.
Si extiendo la librería para poder visualizar el documento te mandaré código.
Un saludo.