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

# CTLineGetBoundsWithOptions(_:_:)

Calculates the bounds for a line.

```
func CTLineGetBoundsWithOptions(_ line: CTLine, _ options: CTLineBoundsOptions) -> CGRect
```

## Parameters

`line`

The line for which you calculate the bounds.

`options`

Desired options or `0` if none.

## Return Value

The bounds of the line as specified by the type and options, such that the coordinate origin is coincident with the line origin and the rect origin is at the bottom left. If the line is invalid, this function will return <doc://com.apple.documentation/documentation/CoreGraphics/CGRectNull>.

## See Also

[`CTLineBoundsOptions`](/documentation/CoreText/CTLineBoundsOptions)

Options for getting the bounds of a line of text.



---

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)