# `GSFont sortGlyphs`

*Instance Method*

Sorts the font’s glyphs using the font glyph order and glyph metadata.

## Declaration

```swift
func sortGlyphs()
```

```objc
- (void) sortGlyphs;
```

```python
sortGlyphs()
```

## See Also

### Glyph Ordering and Caches

- [`GSFont.keepAlternatesTogether`](/Core/GlyphsCore/GSFont/keepAlternatesTogether) — Keeps alternate glyphs next to their base glyph when sorting glyphs.
- [`GSFont sortGlyphs:withList:`](/Core/GlyphsCore/GSFont/sortGlyphs:withList:) — Sorts a mutable glyph array using a glyph-name order list and glyph metadata.
- [`GSFont resetCache`](/Core/GlyphsCore/GSFont/resetCache) — Invalidates the glyph name and identifier lookup caches.

