This is something we’ve all had to deal with at one time or another. I thought that this article had an interesting take on the problem. The author also provides all the code to take care of breaking on spaces.
The interesting part was that he programmatically inserts “invisible” spaces into words that are too long so that the string can break in reasonable places.
Anyway, if you ever have a super long word screwing up your format you should look at this.


