---
title: "getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstypesetter/getglyphs(in:glyphs:characterindexes:glyphinscriptions:elasticbits:bidilevels:)"
---

# getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)

Extracts the information needed to lay out the provided glyphs from the provided range.

## Declaration

```swift
func getGlyphs(in glyphsRange: NSRange, glyphs glyphBuffer: UnsafeMutablePointer<NSGlyph>!, characterIndexes charIndexBuffer: UnsafeMutablePointer<Int>!, glyphInscriptions inscribeBuffer: UnsafeMutablePointer<NSGlyphInscription>!, elasticBits elasticBuffer: UnsafeMutablePointer<ObjCBool>!, bidiLevels bidiLevelBuffer: UnsafeMutablePointer<UInt8>!) -> Int
```

## Parameters

- `glyphsRange`: The range of glyphs.
- `glyphBuffer`: The glyphs to lay out.
- `charIndexBuffer`: The original characters for the glyphs. Note that a glyph at index 1 is not necessarily mapped to the character at index 1, because a glyph may be for a ligature or accent.
- `inscribeBuffer`: The inscription attributes for each glyph, which are used to layout characters that are combined together.
- `elasticBuffer`: Contains a Boolean value indicating whether a glyph is elastic for each glyph. An elastic glyph can be made longer at the end of a line or when needed for justification.
- `bidiLevelBuffer`: Contains the bidirectional level value generated by doc://com.apple.appkit/documentation/AppKit/NSGlyphGenerator, in case a subclass chooses to use this value.

## Discussion

Discussion A subclass can override this method to interact with custom glyph storage.

## See Also

### Deprecated

- [actionForControlCharacter(at:)](appkit/nstypesetter/actionforcontrolcharacter(at:).md)
- [deleteGlyphs(in:)](appkit/nstypesetter/deleteglyphs(in:).md)
- [substituteGlyphs(in:withGlyphs:)](appkit/nstypesetter/substituteglyphs(in:withglyphs:).md)
- [insertGlyph(_:atGlyphIndex:characterIndex:)](appkit/nstypesetter/insertglyph(_:atglyphindex:characterindex:).md)
- [NSTypesetterControlCharacterAction](appkit/nstypesettercontrolcharacteraction.md)
