# `GSFont index(of:)`

*Instance Method*

The index of a glyph, or `nil` when the glyph is not defined by the font.

## Declaration

```swift
func index(of glyph: GSGlyph) -> Int?
```

## See Also

### Glyphs

- [`GSFont.glyphs`](/Core/GlyphsCore/GSFont/glyphs) — The local glyphs defined by the font.
- [`GSFont.allGlyphs`](/Core/GlyphsCore/GSFont/allGlyphs) — The local and imported glyphs available to the font.
- [`GSFont.importedGlyphs`](/Core/GlyphsCore/GSFont/importedGlyphs) — The glyphs supplied by linked fonts.
- [`GSFont.count`](/Core/GlyphsCore/GSFont/count) — The number of local glyphs defined by the font.
- [`GSFont countOfGlyphs`](/Core/GlyphsCore/GSFont/countOfGlyphs) — The number of local glyphs defined by the font.
- [`GSFont glyphAtIndex:`](/Core/GlyphsCore/GSFont/glyphAtIndex:) — Returns the local glyph at an index in [`GSFont.glyphs`](/Core/GlyphsCore/GSFont/glyphs), or `nil` when the index is out of bounds.

