better width calculation of truncated text