---
title: "fontDescriptorWithFontAttributes:"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsfontdescriptor/fontdescriptorwithfontattributes:"
---

# fontDescriptorWithFontAttributes:

Returns a font descriptor with a dictionary of attributes.

## Declaration

```occ
+ (NSFontDescriptor *) fontDescriptorWithFontAttributes:(NSDictionary<NSString *,id> *) attributes;
```

## Parameters

- `attributes`: The attributes for the font descriptor. If nil, the font descriptor’s dictionary will be empty.

## Return Value

Return Value The new font descriptor.

## See Also

### Creating a Font Descriptor

- [preferredFontDescriptor(forTextStyle:options:)](appkit/nsfontdescriptor/preferredfontdescriptor(fortextstyle:options:).md)
- [init(name:matrix:)](appkit/nsfontdescriptor/init(name:matrix:).md)
- [init(name:size:)](appkit/nsfontdescriptor/init(name:size:).md)
- [init(fontAttributes:)](appkit/nsfontdescriptor/init(fontattributes:).md)
