Type Method

fontNames(forFamilyName:)

Returns an array of font names available in a particular font family.

Declaration

class func fontNames(forFamilyName familyName: String) -> [String]

Parameters

familyName

The name of the font family. Use the familyNames method to get an array of the available font family names on the system.

Return Value

An array of NSString objects, each of which contains a font name associated with the specified family.

Discussion

You can pass the returned strings as parameters to the init(name:size:) method to retrieve an actual font object.

See Also

Getting the Available Font Names

class var familyNames: [String]

Returns an array of font family names available on the system.