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

# convert(_:)

Converts the specified font using the settings in the receiver, with the aid of the shared `NSFontManager` if necessary.

```
func convert(_ fontObj: NSFont) -> NSFont
```

## Parameters

`fontObj`

The font to be converted.

## Return Value

The converted font, or `aFont` itself if it can’t be converted.

## Discussion

For example, if `aFont` is Helvetica Oblique 12.0 point and the user has selected the Times font family (and nothing else) in the Font panel, the font returned is Times Italic 12.0 point.

## See Also

[`-  convertFont:`](/documentation/AppKit/NSFontManager/convert(_:))

Converts the given font according to the object that initiated a font change, typically the Font panel or Font menu.



---

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)