measure the width of String