<!--
{
  "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/CTTypesetterCreateLine(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTTypesetterCreateLine"
  },
  "title" : "CTTypesetterCreateLine(_:_:)"
}
-->

# CTTypesetterCreateLine(_:_:)

Creates an immutable line from the typesetter.

```
func CTTypesetterCreateLine(_ typesetter: CTTypesetter, _ stringRange: CFRange) -> CTLine
```

## Parameters

`typesetter`

The typesetter that creates the line. This parameter is required and cannot be set to `NULL`.

`stringRange`

The string range on which the line is based. If the length portion of range is set to `0`, then the typesetter continues to add glyphs to the line until it runs out of characters in the string. The location and length of the range must be within the bounds of the string, or the call will fail.

## Return Value

A reference to a CTLine object if the call was successful; otherwise, `NULL`.

## Discussion

The resultant line consists of glyphs in the correct visual order, ready to draw. This function is equivalent to [`CTTypesetterCreateLineWithOffset(_:_:_:)`](/documentation/CoreText/CTTypesetterCreateLineWithOffset(_:_:_:)) with an offset of 0.0.

---

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)