# `GSFont insertFontMaster:atIndex:`

*Instance Method*

Inserts a local master without adding layer content.

## Declaration

```swift
func insertFontMaster(_ fontMaster: GSFontMaster, at idx: UInt)
```

```objc
- (void) insertFontMaster:(GSFontMaster *) fontMaster atIndex:(NSUInteger) idx;
```

```python
insertFontMaster_atIndex_(fontMaster: GSFontMaster, idx: int)
```

## Parameters

- `fontMaster` — The master to insert.

## Discussion

If the master has no identifier or the identifier is already used, a new identifier is assigned.

## See Also

### Masters

- [`GSFont.fontMasters`](/Core/GlyphsCore/GSFont/fontMasters) — The local masters of the font.
- [`GSFont.countOfFontMasters`](/Core/GlyphsCore/GSFont/countOfFontMasters) — The number of local masters.
- [`GSFont fontMasterAtIndex:`](/Core/GlyphsCore/GSFont/fontMasterAtIndex:) — Returns the local or imported master at an index, or `nil` when the index is out of bounds.
- [`GSFont indexOfFontMaster:`](/Core/GlyphsCore/GSFont/indexOfFontMaster:) — Returns the index of a local master, or `NSNotFound` when the master is not local.
- [`GSFont fontMasterForId:`](/Core/GlyphsCore/GSFont/fontMasterForId:) — Returns the local or imported master with an identifier, or `nil` when no master matches.
- [`GSFont fontMasterForName:`](/Core/GlyphsCore/GSFont/fontMasterForName:) — Returns the first local or imported master with a name, or `nil` when no master matches.
- [`GSFont defaultFontMaster:`](/Core/GlyphsCore/GSFont/defaultFontMaster:) — Returns the master used as the default interpolation origin.
- [`GSFont newMasterId`](/Core/GlyphsCore/GSFont/newMasterId) — Returns an unused master identifier.
- [`GSFont addFontMaster:`](/Core/GlyphsCore/GSFont/addFontMaster:) — Appends a local master without adding layer content.
- [`GSFont removeFontMaster:`](/Core/GlyphsCore/GSFont/removeFontMaster:) — Removes a local master without removing layer content.

