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

# CTRunGetPositionsPtr(_:)

Returns a direct pointer for the glyph position array stored in the run.

```
func CTRunGetPositionsPtr(_ run: CTRun) -> UnsafePointer<CGPoint>?
```

## Parameters

`run`

The run from which to access glyph positions.

## Return Value

A valid pointer to an array of <doc://com.apple.documentation/documentation/CoreFoundation/CGPoint> structures, or `NULL`.

## Discussion

The glyph positions in a run are relative to the origin of the line containing the run. The position array will have a length equal to the value returned by [`CTRunGetGlyphCount(_:)`](/documentation/CoreText/CTRunGetGlyphCount(_:)). The caller should be prepared for this function to return `NULL` even if there are glyphs in the stream. If this function returns `NULL`, the caller must allocate its own buffer and call [`CTRunGetPositions(_:_:_:)`](/documentation/CoreText/CTRunGetPositions(_:_:_:)) to fetch the glyph positions.

---

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)