Text Field Resize Bug

Changing the textField's format in run time will result in an bug 

I need this functionality to work as im rendering something that is directly effected by the text field size.

I have to set the textFormat each time im rendering since the textFormat itself changes.

Any idea how to fix it ? 

*EDIT* 
solution : http://wonderfl.net/c/fcPL