updated test code
compute ellipsization of text relative to max lines