Project Info

 

We had to put text on circles on some of our projects. As an easy and fast way to do this we came up with this simple component.

It has a few small problems but it does the job with the least amount of code.

Here are the problems you should know about before you run into them yourself:

  • You have to position the circle with absolute coordinates as it's not measured correctly for now.
  • Due to some antialiasing sometimes text looks like it's not perfectly wrapped and that some letter are further from the circle than others. This effect is more or less visible depending on the font used, font size, and actual letter rotation and circle radius.

I am planning on extending the functionality by externalizing the function that arranges the letters and add the possibility to place text on ellipse, spiral, and custom paths.

You can download the source by pressing the big DOWNLOAD button below.

 

download