<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTFramesetterCreateWithAttributedString(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTFramesetterCreateWithAttributedString"
  },
  "title" : "CTFramesetterCreateWithAttributedString(_:)"
}
-->

# CTFramesetterCreateWithAttributedString(_:)

Creates an immutable framesetter object from an attributed string.

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

## Parameters

`attrString`

The attributed string for constructing the framesetter object.

## Return Value

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

## Discussion

Use the framesetter object to create and fill text frames with the [`CTFramesetterCreateFrame(_:_:_:_:)`](/documentation/CoreText/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 ``doc://com.apple.coretext/documentation/CoreText/CTTypesetter`` with the ``doc://com.apple.coretext/documentation/CoreText/kCTTypesetterOptionAllowUnboundedLayout`` option set to <doc://com.apple.documentation/documentation/CoreFoundation/kCFBooleanTrue>, then use ``doc://com.apple.coretext/documentation/CoreText/CTFramesetterCreateWithTypesetter(_:)`` instead.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)