Here is my method of word wrapper, it uses draw_text_ex though, and it's kinda laggy
Code:
def process_character(c, text, pos)
@text = text
if text[0] != ' '
w = text_size(get_word(text)).width + 6
if (pos[:x] + w) >= contents.width
process_new_line(text, pos)
return
end
end
super
end
def get_word(text)
result = ''
text.each_char do |c|
break if c =~ /\s/
result += c
end
result
end