---
title: "textLayoutManager(_:renderingAttributesForLink:at:defaultAttributes:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextlayoutmanagerdelegate/textlayoutmanager(_:renderingattributesforlink:at:defaultattributes:)"
---

# textLayoutManager(_:renderingAttributesForLink:at:defaultAttributes:)

The method the framework calls to return a dictionary of attributes for rendering a link attribute name.

## Declaration

```swift
optional func textLayoutManager(_ textLayoutManager: NSTextLayoutManager, renderingAttributesForLink link: Any, at location: any NSTextLocation, defaultAttributes renderingAttributes: [NSAttributedString.Key : Any] = [:]) -> [NSAttributedString.Key : Any]?
```

## Parameters

- `textLayoutManager`: The NSTextLayoutManager.
- `link`: The link.
- `location`: The doc://com.apple.appkit/documentation/AppKit/NSTextLocation of the link.
- `renderingAttributes`: A dictionary of attributes whose keys are doc://com.apple.documentation/documentation/Foundation/NSAttributedString/Key values.

## Return Value

Return Value A dictionary of attributes.

## See Also

### Responding to layout changes

- [textLayoutManager(_:shouldBreakLineBefore:hyphenating:)](appkit/nstextlayoutmanagerdelegate/textlayoutmanager(_:shouldbreaklinebefore:hyphenating:).md)
- [textLayoutManager(_:textLayoutFragmentFor:in:)](appkit/nstextlayoutmanagerdelegate/textlayoutmanager(_:textlayoutfragmentfor:in:).md)
