# `GSFont.parent`

*Instance Property*

The document containing the font.

## Declaration

```swift
weak var parent: GSDocument? { get set }
```

```objc
@property (nonatomic, weak) GSDocument * parent;
```

[See also `parent` in the Python API](https://docu.glyphsapp.com/#GSFont.parent)

```python
pyobjc_instanceMethods.parent() -> GSDocument
pyobjc_instanceMethods.setParent_(parent: GSDocument)
```

## Discussion

This is `nil` when the font is used independently of a document. The document provides the undo manager for font information and changes to the glyph collection. Individual glyphs use their own undo managers.

## See Also

### Document

- [`GSFont fileURL`](/Core/GlyphsCore/GSFont/fileURL) — The location of the document containing the font.

