---
title: "CTLineGetTypographicBounds(_:_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctlinegettypographicbounds(_:_:_:_:)"
---

# CTLineGetTypographicBounds(_:_:_:_:)

Calculates the typographic bounds of a line.

## Declaration

```swift
func CTLineGetTypographicBounds(_ line: CTLine, _ ascent: UnsafeMutablePointer<CGFloat>?, _ descent: UnsafeMutablePointer<CGFloat>?, _ leading: UnsafeMutablePointer<CGFloat>?) -> Double
```

## Parameters

- `line`: The line whose typographic bounds are calculated.
- `ascent`: On output, the ascent of the line. This parameter can be set to NULL if not needed.
- `descent`: On output, the descent of the line. This parameter can be set to NULL if not needed.
- `leading`: On output, the leading of the line. This parameter can be set to NULL if not needed.

## Return Value

Return Value The typographic width of the line. If the line is invalid, this function returns 0.

## See Also

### Measuring Lines

- [CTLineGetImageBounds(_:_:)](coretext/ctlinegetimagebounds(_:_:).md)
- [CTLineGetTrailingWhitespaceWidth(_:)](coretext/ctlinegettrailingwhitespacewidth(_:).md)
