Automatic measuring of line widths