Instance Method


Returns the font attributes in effect for the character at the given location.


- (NSDictionary<NSAttributedStringKey, id> *)fontAttributesInRange:(NSRange)range;



The range.

Return Value

A dictionary containing the font attributes for the range.


The dictionary attributes are all those listed in Character Attributes, except NSLinkAttributeName, NSParagraphStyleAttributeName, and NSAttachmentAttributeName.

Use this method to obtain font attributes that are to be copied or pasted with “copy font” operations.

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

See Also

Retrieving Font Attribute Information

- rulerAttributesInRange:

Returns the ruler (paragraph) attributes in effect for the characters within the given range.