Type Method

fontNamesForFamilyName:

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

Declaration

+ (NSArray<NSString *> *)fontNamesForFamilyName:(NSString *)familyName;

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 fontWithName:size: method to retrieve an actual font object.

See Also

Getting the Available Font Names

familyNames

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