fix for bug where rich text markup was messing with the calculated size of text