Instance Method

applyFontTraits:range:

Applies the font attributes specified by mask to the characters in aRange.

Declaration

- (void)applyFontTraits:(NSFontTraitMask)traitMask range:(NSRange)range;

Parameters

mask

The font attributes to apply. For information about the font traits you can apply, see NSFontManager.

aRange

The range of characters.

Discussion

Raises an NSRangeException if any part of aRange lies beyond the end of the receiver’s characters.

See Also

Changing attributes

- setAttributes:range:

Sets the attributes for the characters in the specified range to the specified attributes.

- addAttribute:value:range:

Adds an attribute with the given name and value to the characters in the specified range.

- addAttributes:range:

Adds the given collection of attributes to the characters in the specified range.

- removeAttribute:range:

Removes the named attribute from the characters in the specified range.

- setAlignment:range:

Sets the alignment characteristic of the paragraph style attribute for the characters in aRange to alignment.

- setBaseWritingDirection:range:

Sets the base writing direction for the characters in range to writingDirection.

- subscriptRange:

Decrements the value of the superscript attribute for characters in aRange by 1.

- superscriptRange:

Increments the value of the superscript attribute for characters in aRange by 1.

- unscriptRange:

Removes the superscript attribute from the characters in aRange.