---
title: CTRunDelegateGetWidthCallback
framework: coretext
role: symbol
role_heading: Type Alias
path: coretext/ctrundelegategetwidthcallback
---

# CTRunDelegateGetWidthCallback

Defines a pointer to a function that determines the typographic width of glyphs in the run.

## Declaration

```swift
typealias CTRunDelegateGetWidthCallback = (UnsafeMutableRawPointer) -> CGFloat
```

## Parameters

- `refCon`: The reference-constant value supplied to the doc://com.apple.coretext/documentation/CoreText/CTRunDelegateCreate(_:_:) function when the run delegate was created.

## Return Value

Return Value The typographic width of glyphs in the run associated with the run delegate.  A value of 0.0 indicates that the glyphs should not be drawn.

## Discussion

Discussion You would declare the get-width function like this if you were to name it MyGetWidthCallback:

## See Also

### Callbacks

- [CTRunDelegateGetAscentCallback](coretext/ctrundelegategetascentcallback.md)
- [CTRunDelegateGetDescentCallback](coretext/ctrundelegategetdescentcallback.md)
- [CTRunDelegateDeallocateCallback](coretext/ctrundelegatedeallocatecallback.md)
