updated FormatSize with 'viewport' option