---
title: "CTFramesetterCreateWithAttributedString(_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctframesettercreatewithattributedstring(_:)"
---

# CTFramesetterCreateWithAttributedString(_:)

Creates an immutable framesetter object from an attributed string.

## Declaration

```swift
func CTFramesetterCreateWithAttributedString(_ attrString: CFAttributedString) -> CTFramesetter
```

## Parameters

- `attrString`: The attributed string for constructing the framesetter object.

## Return Value

Return Value A reference to a framesetter object if the call is successful; otherwise, NULL.

## Discussion

Discussion Use the framesetter object to create and fill text frames with the CTFramesetterCreateFrame(_:_:_:_:) call. note: By default, the text system doesn’t typeset text that requires an unreasonable amount of effort. To create a framesetter that supports typesetting text regardless of the amount of effort necessary, create a CTTypesetter with the kCTTypesetterOptionAllowUnboundedLayout option set to kCFBooleanTrue, then use CTFramesetterCreateWithTypesetter(_:) instead.

## See Also

### Creating a Framesetter

- [CTFramesetterCreateWithTypesetter(_:)](coretext/ctframesettercreatewithtypesetter(_:).md)
