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

# addingAttributes(_:)

Returns a new font descriptor based on the current object, but with the specified attributes taking precedence over the existing ones.

## Declaration

```swift
func addingAttributes(_ attributes: [NSFontDescriptor.AttributeName : Any] = [:]) -> NSFontDescriptor
```

## Parameters

- `attributes`: The replacement attributes for the new font descriptor.

## Return Value

Return Value The new font descriptor.

## See Also

### Modifying an Existing Font Descriptor

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