Kind of late in the game, but I see no one has answered.
You are going to have to do it the hard way:
- Build your text string one line at a time, until it fills the column width.
- Start the next line if you overflow. Accumulate the heights of the lines.
- Draw a rectangle when you have typeset all the lines.
- If a box contains text that does not fill the box, position the text at the top of the box.
With great power comes great responsibility :o)