---
title: "withSize(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsfontdescriptor/withsize(_:)"
---

# withSize(_:)

Returns a new font descriptor based on the current object, but with the specified point size.

## Declaration

```swift
func withSize(_ newPointSize: CGFloat) -> NSFontDescriptor
```

## Parameters

- `newPointSize`: The replacement point size.

## Return Value

Return Value The new font descriptor.

## See Also

### Modifying an Existing Font Descriptor

- [addingAttributes(_:)](appkit/nsfontdescriptor/addingattributes(_:).md)
- [withFace(_:)](appkit/nsfontdescriptor/withface(_:).md)
- [withFamily(_:)](appkit/nsfontdescriptor/withfamily(_:).md)
- [withMatrix(_:)](appkit/nsfontdescriptor/withmatrix(_:).md)
- [withSymbolicTraits(_:)](appkit/nsfontdescriptor/withsymbolictraits(_:).md)
- [withDesign(_:)](appkit/nsfontdescriptor/withdesign(_:).md)
- [NSFontDescriptor.SystemDesign](appkit/nsfontdescriptor/systemdesign.md)
