fixed a memory leak with text entities and multiline text

also made optimization in changing multiline text that will not reload
font if not needed.