# `GSFont generateInstance:error:`

*Instance Method*

Generates a static font from an instance.

## Declaration

```swift
func generateInstance(_ instance: GSInstance) throws -> GSFont
```

```objc
- (GSFont *) generateInstance:(GSInstance *) instance error:(NSError **) error;
```

```python
generateInstance_error_(instance: GSInstance) -> tuple[GSFont, NSError]
```

## Parameters

- `error` — On output, a pointer to an error object that describes why the method failed, or `nil` if no error occurred. If you are not interested in the error information, pass `nil` for this parameter.

## Return Value

The generated font, or `nil` when generation fails.

## Discussion

The returned font contains one interpolated master and the glyph set configured by the instance export parameters.

