<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFontManager/convertAttributes(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFontManager(im)convertAttributes:"
  },
  "title" : "convertAttributes(_:)"
}
-->

# convertAttributes(_:)

Converts attributes in response to an object initiating an attribute change, typically the Font panel or Font menu.

```
func convertAttributes(_ attributes: [String : Any] = [:]) -> [String : Any]
```

## Parameters

`attributes`

The current attributes.

## Return Value

The converted attributes, or `attributes` itself if the conversion isn’t possible.

## Discussion

Attributes unused by the sender should not be changed or removed.

This method is usually invoked on the sender of [`changeAttributes(_:)`](/documentation/AppKit/NSTextView/changeAttributes(_:)). See [Working with the Font Manager](https://developer.apple.com/library/archive/documentation/TextFonts/Conceptual/CocoaTextArchitecture/FontHandling/FontHandling.html#//apple_ref/doc/uid/TP40009459-CH5-SW9) for more information.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)