# `GSFont.keepAlternatesTogether`

*Instance Property*

Keeps alternate glyphs next to their base glyph when sorting glyphs.

## Declaration

```swift
var keepAlternatesTogether: Bool { get set }
```

```objc
@property (nonatomic) BOOL keepAlternatesTogether;
```

```python
keepAlternatesTogether() -> bool
setKeepAlternatesTogether_(keepAlternatesTogether: bool)
```

## Discussion

This affects the order produced by [`GSFont sortGlyphs`](/Core/GlyphsCore/GSFont/sortGlyphs) and [`GSFont sortGlyphs:withList:`](/Core/GlyphsCore/GSFont/sortGlyphs:withList:).

## See Also

### Glyph Ordering and Caches

- [`GSFont sortGlyphs`](/Core/GlyphsCore/GSFont/sortGlyphs) — Sorts the font’s glyphs using the font glyph order and glyph metadata.
- [`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.

