Instance Method

fontDescriptorWithFamily:

Returns a new font descriptor whose attributes are the same as the receiver but from the specified family.

Declaration

- (NSFontDescriptor *)fontDescriptorWithFamily:(NSString *)newFamily;

Parameters

newFamily

The new font family.

Return Value

The new font descriptor.

See Also

Creating a Font Descriptor

+ fontDescriptorWithFontAttributes:

Returns a font descriptor with a dictionary of attributes.

+ fontDescriptorWithName:matrix:

Returns a font descriptor with the NSFontNameAttribute and NSFontMatrixAttribute dictionary attributes set to the given values.

+ fontDescriptorWithName:size:

Returns a font descriptor with the NSFontNameAttribute and NSFontSizeAttribute dictionary attributes set to the given values.

- initWithFontAttributes:

Initializes and returns a new font descriptor with the specified attributes.

- fontDescriptorByAddingAttributes:

Returns a new font descriptor that is the same as the receiver but with the specified attributes taking precedence over the existing ones.

- fontDescriptorWithFace:

Returns a new font descriptor that is the same as the receiver but with the specified face.

- fontDescriptorWithMatrix:

Returns a new font descriptor that is the same as the receiver but with the specified matrix.

- fontDescriptorWithSize:

Returns a new font descriptor that is the same as the receiver but with the specified point size.

- fontDescriptorWithSymbolicTraits:

Returns a new font descriptor that is the same as the receiver but with the specified symbolic traits taking precedence over the existing ones.