use measureText instead of getTextBounds