# `GSFont prepareName2Glyph`

*Instance Method*

Rebuilds the cache that maps local glyph names to glyphs.

## Declaration

```swift
func prepareName2Glyph()
```

```objc
- (void) prepareName2Glyph;
```

```python
prepareName2Glyph()
```

## Discussion

Call this method after changing the glyph collection or glyph names without using their regular mutation APIs.

## See Also

### Glyph Name Queries

- [`GSFont glyphNamesForWildcard:contextLabel:error:`](/Core/GlyphsCore/GSFont/glyphNamesForWildcard:contextLabel:error:) — Returns the local glyph names matching a name query.
- [`GSFont expandWildcardsInNameList:contextLabel:error:`](/Core/GlyphsCore/GSFont/expandWildcardsInNameList:contextLabel:error:) — Expands name queries into a set of local glyph names.
- [`GSFont baseName:forWildCard:`](/Core/GlyphsCore/GSFont/baseName:forWildCard:) — Returns the part of a matching glyph name represented by `*` in a name pattern, or `nil` when the pattern does not contain `*` or the glyph name is shorter than the pattern.

