---
title: "CTFontDescriptorCreateWithAttributes(_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontdescriptorcreatewithattributes(_:)"
---

# CTFontDescriptorCreateWithAttributes(_:)

Creates a new font descriptor reference from a dictionary of attributes.

## Declaration

```swift
func CTFontDescriptorCreateWithAttributes(_ attributes: CFDictionary) -> CTFontDescriptor
```

## Parameters

- `attributes`: A dictionary containing arbitrary attributes.

## Return Value

Return Value A new font descriptor with the attributes specified.

## Discussion

Discussion The provided attribute dictionary can contain arbitrary attributes that are preserved; however, unrecognized attributes are ignored on font creation and may not be preserved over the round trip from descriptor to font and back to descriptor.

## See Also

### Creating Font Descriptors

- [CTFontDescriptorCreateWithNameAndSize(_:_:)](coretext/ctfontdescriptorcreatewithnameandsize(_:_:).md)
- [CTFontDescriptorCreateCopyWithAttributes(_:_:)](coretext/ctfontdescriptorcreatecopywithattributes(_:_:).md)
- [CTFontDescriptorCreateCopyWithVariation(_:_:_:)](coretext/ctfontdescriptorcreatecopywithvariation(_:_:_:).md)
- [CTFontDescriptorCreateCopyWithFeature(_:_:_:)](coretext/ctfontdescriptorcreatecopywithfeature(_:_:_:).md)
- [CTFontDescriptorCreateCopyWithFamily(_:_:)](coretext/ctfontdescriptorcreatecopywithfamily(_:_:).md)
- [CTFontDescriptorCreateCopyWithSymbolicTraits(_:_:_:)](coretext/ctfontdescriptorcreatecopywithsymbolictraits(_:_:_:).md)
- [CTFontDescriptorCreateMatchingFontDescriptors(_:_:)](coretext/ctfontdescriptorcreatematchingfontdescriptors(_:_:).md)
- [CTFontDescriptorCreateMatchingFontDescriptor(_:_:)](coretext/ctfontdescriptorcreatematchingfontdescriptor(_:_:).md)
