<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTRunDelegateGetWidthCallback",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@T@CTRunDelegateGetWidthCallback"
  },
  "title" : "CTRunDelegateGetWidthCallback"
}
-->

# CTRunDelegateGetWidthCallback

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

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

## Parameters

`refCon`

The reference-constant value supplied to the [`CTRunDelegateCreate(_:_:)`](/documentation/CoreText/CTRunDelegateCreate(_:_:)) function when the run delegate was created.

## 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

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

---

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)