much more reliable way to size attributed strings