---
title: "setFont(_:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfannotationfreetext/setfont(_:)"
---

# setFont(_:)

Sets the font used in the text field of the annotation.

## Declaration

```swift
func setFont(_ font: NSFont!)
```

## Parameters

- `font`: The font to be used in the text field of the annotation.

## See Also

### Managing Font and Font Color

- [font()](pdfkit/pdfannotationfreetext/font().md)
- [fontColor()](pdfkit/pdfannotationfreetext/fontcolor().md)
- [setFontColor(_:)](pdfkit/pdfannotationfreetext/setfontcolor(_:).md)
