<!--
{
  "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/CTRunGetGlyphsPtr(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTRunGetGlyphsPtr"
  },
  "title" : "CTRunGetGlyphsPtr(_:)"
}
-->

# CTRunGetGlyphsPtr(_:)

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

```
func CTRunGetGlyphsPtr(_ run: CTRun) -> UnsafePointer<CGGlyph>?
```

## Parameters

`run`

The run from which to return glyphs.

## Return Value

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

## Discussion

The glyph 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 [`CTRunGetGlyphs(_:_:_:)`](/documentation/CoreText/CTRunGetGlyphs(_:_:_:)) to fetch the glyphs.

---

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)