calculate optimal column widths to fit table on screen