Prevent NumberFormatException that caused TextInfo dimensions to be ignored