Added logic to auto-scale when output width is smaller than the scaled clipwidth