I'm looking for an algorithm that can clip a text ( GUI Mesh text ) when it's length is over 20 characters. The problem is I have one background image(textured plane) (orthographic), where I want to put a Gui mesh text on it, it happens that sometimes the text is larger in length than the supposed background image, and it gets out of the background mesh boundary.
Is it possible to fit that gui mesh into the boundary of the background plane mesh ?