I have an array of simple strings (simple meaning 1-4 words, not in complete sentences) that I want to distribute “evenly” within an arbitrary shape.
By “evenly” I mean that the text does whatever it can to not overlap other text, but all the strings aren’t bunched up in one particular location. I don’t mean that the text has to be the max distance from eachother, I just want to fill the space as best as I can.
Example:
I have the following array:
var array = new [] {"#WhatIDidLastWeek", "Salena Gomez", "#WWF", "#IThinkOomf", "CES" };
and I have a circle of radius 600px that I want every string in the array to be inside that circle and be spaced far enough appart that they don’t overlap and that the general shape of the circle is apparent.
The first thing that comes to mind is to use some sort of MeasureString call in whatever environment you’re working with.
The basic idea is measure each word to see if it will fit in the allotted space. If it doesn’t fit, move it down to the next “line”. The hard part will be what to do when you run out of space to fit all the words.