Contents

font

The font used to render the receiver’s text.

Declaration

var font: CFTypeRef? { get set }

Discussion

May be either a CTFont, a CGFont, an instance of NSFont (macOS only), or a string naming the font. In iOS, you cannot assign a UIFont object to this property. Defaults to Helvetica.

The font property is only used when the string property is not an NSAttributedString.

See Also

Text Visual Properties