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

# setFont(_:)

Sets the font used to display the text in the widget annotation.

## Declaration

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

## Parameters

- `font`: The font to be used for the text in the widget annotation.

## See Also

### Managing Font and Background Color Characteristics

- [backgroundColor()](pdfkit/pdfannotationchoicewidget/backgroundcolor().md)
- [setBackgroundColor(_:)](pdfkit/pdfannotationchoicewidget/setbackgroundcolor(_:).md)
- [font()](pdfkit/pdfannotationchoicewidget/font().md)
- [fontColor()](pdfkit/pdfannotationchoicewidget/fontcolor().md)
- [setFontColor(_:)](pdfkit/pdfannotationchoicewidget/setfontcolor(_:).md)
