multiline text optimization