---
title: "cgGlyph(at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nslayoutmanager/cgglyph(at:)"
---

# cgGlyph(at:)

Returns the glyph at the specified index.

## Declaration

```swift
func cgGlyph(at glyphIndex: Int) -> CGGlyph
```

## Parameters

- `glyphIndex`: The index of the glyph that you want. If the index is out of range, this method raises an exception with the error doc://com.apple.documentation/documentation/Foundation/NSExceptionName/rangeException.

## Return Value

Return Value The glyph at the specified index.

## Discussion

Discussion Calling this method generates all of the glyphs (as needed) up to and including the glyph at the specified index.

## See Also

### Accessing glyphs

- [getGlyphs(in:glyphs:properties:characterIndexes:bidiLevels:)](appkit/nslayoutmanager/getglyphs(in:glyphs:properties:characterindexes:bidilevels:).md)
- [cgGlyph(at:isValidIndex:)](appkit/nslayoutmanager/cgglyph(at:isvalidindex:).md)
- [setGlyphs(_:properties:characterIndexes:font:forGlyphRange:)](appkit/nslayoutmanager/setglyphs(_:properties:characterindexes:font:forglyphrange:).md)
- [characterIndexForGlyph(at:)](appkit/nslayoutmanager/characterindexforglyph(at:).md)
- [glyphIndexForCharacter(at:)](appkit/nslayoutmanager/glyphindexforcharacter(at:).md)
- [isValidGlyphIndex(_:)](appkit/nslayoutmanager/isvalidglyphindex(_:).md)
- [numberOfGlyphs](appkit/nslayoutmanager/numberofglyphs.md)
- [propertyForGlyph(at:)](appkit/nslayoutmanager/propertyforglyph(at:).md)
- [NSLayoutManager.GlyphProperty](appkit/nslayoutmanager/glyphproperty.md)
