---
title: "convert(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsfontpanel/convert(_:)"
---

# convert(_:)

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

## Declaration

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

## Parameters

- `fontObj`: The font to be converted.

## Return Value

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

## Discussion

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

### Related Documentation

- [convert(_:)](appkit/nsfontmanager/convert(_:).md)
