---
title: "CTRunGetTypographicBounds(_:_:_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctrungettypographicbounds(_:_:_:_:_:)"
---

# CTRunGetTypographicBounds(_:_:_:_:_:)

Gets the typographic bounds of the run.

## Declaration

```swift
func CTRunGetTypographicBounds(_ run: CTRun, _ range: CFRange, _ ascent: UnsafeMutablePointer<CGFloat>?, _ descent: UnsafeMutablePointer<CGFloat>?, _ leading: UnsafeMutablePointer<CGFloat>?) -> Double
```

## Parameters

- `run`: The run for which to calculate the typographic bounds.
- `range`: The portion of the run to measure. If the length of the range is set to 0, then the measure operation continues from the range’s start index to the end of the run.
- `ascent`: On output, the ascent of the run. This can be set to NULL if not needed.
- `descent`: On output, the descent of the run. This can be set to NULL if not needed.
- `leading`: On output, the leading of the run. This can be set to NULL if not needed.

## Return Value

Return Value The typographic width of the run, or if run or range is invalid, 0.

## See Also

### Measuring the Glyph Run

- [CTLineGetBoundsWithOptions(_:_:)](coretext/ctlinegetboundswithoptions(_:_:).md)
- [CTRunGetImageBounds(_:_:_:)](coretext/ctrungetimagebounds(_:_:_:).md)
- [CTRunGetBaseAdvancesAndOrigins(_:_:_:_:)](coretext/ctrungetbaseadvancesandorigins(_:_:_:_:).md)
