Output this as POV source code. Create a POV box 10 units long and measure the pixels, and then by division you can compute the size of each character in POV units. I used the timrom.ttf font. My code reads a file to get a single line of text. include the output from the C program into a POV file and render. I used a make file to simplify things.
Results are surprisingly good.
The trig is basic. Below are the files I used for the above image. Basically, just type make, and then render wrap.pov. On my system Make gave errors even though it worked, and If you know why please fill me in. Not all character widths have been computed.