---
title: font
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextview/font
---

# font

The font of the text.

## Declaration

```swift
var font: UIFont? { get set }
```

## Discussion

Discussion This property applies to the entire text string. The default value of this property is the body style of the system font. note: You can get information about the fonts available on the system using the methods of the UIFont class. In iOS 6 and later, assigning a new value to this property causes the new font to be applied to the entire contents of the text view. If you want to apply the font to only a portion of the text, you must create a new attributed string with the desired style information and assign it to the attributedText property.

## See Also

### Configuring appearance attributes

- [textColor](uikit/uitextview/textcolor.md)
- [textAlignment](uikit/uitextview/textalignment.md)
- [typingAttributes](uikit/uitextview/typingattributes.md)
- [linkTextAttributes](uikit/uitextview/linktextattributes.md)
- [borderStyle](uikit/uitextview/borderstyle-swift.property.md)
- [textHighlightAttributes](uikit/uitextview/texthighlightattributes.md)
- [drawTextHighlightBackground(for:origin:)](uikit/uitextview/drawtexthighlightbackground(for:origin:).md)
- [UITextView.BorderStyle](uikit/uitextview/borderstyle-swift.enum.md)
