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

# set(in:)

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

## Declaration

```swift
func set(in graphicsContext: NSGraphicsContext)
```

## Parameters

- `graphicsContext`: The graphics context for which the font is 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()](appkit/nsfont/set().md)
