---
title: "CTRunGetAttributes(_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctrungetattributes(_:)"
---

# CTRunGetAttributes(_:)

Returns the attribute dictionary that was used to create the glyph run.

## Declaration

```swift
func CTRunGetAttributes(_ run: CTRun) -> CFDictionary
```

## Parameters

- `run`: The run for which to return attributes.

## Return Value

Return Value A valid CFDictionary or NULL on error or if the run has no attributes.

## Discussion

Discussion The dictionary returned is either the same one that was set as an attribute dictionary on the original attributed string or a dictionary that has been manufactured by the layout engine. Attribute dictionaries can be manufactured in the case of font substitution or if the run is missing critical attributes.

## See Also

### Getting Glyph Run Data

- [CTRunGetGlyphCount(_:)](coretext/ctrungetglyphcount(_:).md)
- [CTRunGetStatus(_:)](coretext/ctrungetstatus(_:).md)
- [CTRunGetGlyphsPtr(_:)](coretext/ctrungetglyphsptr(_:).md)
- [CTRunGetGlyphs(_:_:_:)](coretext/ctrungetglyphs(_:_:_:).md)
- [CTRunGetPositionsPtr(_:)](coretext/ctrungetpositionsptr(_:).md)
- [CTRunGetPositions(_:_:_:)](coretext/ctrungetpositions(_:_:_:).md)
- [CTRunGetAdvancesPtr(_:)](coretext/ctrungetadvancesptr(_:).md)
- [CTRunGetAdvances(_:_:_:)](coretext/ctrungetadvances(_:_:_:).md)
- [CTRunGetStringIndicesPtr(_:)](coretext/ctrungetstringindicesptr(_:).md)
- [CTRunGetStringIndices(_:_:_:)](coretext/ctrungetstringindices(_:_:_:).md)
- [CTRunGetStringRange(_:)](coretext/ctrungetstringrange(_:).md)
