Splitting text to fit on a line.

Monkey Forums/Monkey Programming/Splitting text to fit on a line.

Farflame(Posted 2012) [#1]
Duh, couldn't think of the word for that, but what I'm getting at is, has anyone got a little routine to split text so that when it reaches the end of a line, the next word prints on the next line. Kinda like how this forum text box does, when you type over the end of the line, your word is moved down to the next line. I vaguely know how to do this but it's a tad time-consuming and was wondering if anybody has a ready-made routine I could use. I'm using fonts from Fontmachine.


Jesse(Posted 2012) [#2]
the Angle Font mod has a function that split a group of words by word to fit on a line.


Farflame(Posted 2012) [#3]
Cool, will it work with Fontmachine fonts?


Jesse(Posted 2012) [#4]
I doubt it will work directly, but it should give you an idea on how to deal with it. the function is
in the simpleTextBox class.