calculateTextBounds hack