Contents

CTRunGetGlyphsPtr(_:)

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

Declaration

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

Parameters

  • run:

    The run from which to return glyphs.

Return Value

A valid pointer to an array of CGGlyph structures, or NULL.

Discussion

The glyph array will have a length equal to the value returned by 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(_:_:_:) to fetch the glyphs.

See Also

Getting Glyph Run Data