Fixed algorithm for setting widths of labels