---
title: "substituteFont(for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsatstypesetter/substitutefont(for:)"
---

# substituteFont(for:)

Returns a screen font suitable for use in place of the specified original font,.

## Declaration

```swift
func substituteFont(for originalFont: NSFont) -> NSFont
```

## Discussion

Discussion A screen font can be substituted if the receiver is set to use screen fonts and if no NSTextView associated with the receiver is scaled or rotated. If a suitable screen font isn’t available or usable, this method returns the original font.
