When processing text ending with a newline character, calling MeasuredText#setPara() on the whole buffer is inefficient because the call results in a copy of the entire buffer. Change-Id: I6fa038d950f6287665bad3dc0070234c98bc8a7a