---
title: "setFont(_:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfannotationtextwidget/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 annotation’s text field.

## See Also

### Managing the Font and Font Color

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