---
title: set()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsfont/set()
---

# set()

Sets this font as the font for the current graphics context.

## Declaration

```swift
func set()
```

## Discussion

Discussion This method sets the font for the graphics system but does not affect the higher-level settings of the Cocoa text system, which are controlled by text attributes.

## See Also

### Using a Font to Draw

- [set(in:)](appkit/nsfont/set(in:).md)
