# `GSLayer autohintError:`

*Instance Method*

Adds generated PostScript hints to the layer.

## Declaration

```swift
func autohintError() throws
```

```objc
- (BOOL) autohintError:(NSError **) error;
```

```python
autohintError_() -> tuple[bool, 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

`YES` if autohinting finished.

## Discussion

Existing PostScript hints are replaced.

## See Also

### Autohinting

- [`GSLayer autohint`](/Core/GlyphsCore/GSLayer/autohint) — Adds generated PostScript hints to the layer.
- [`GSLayer getAutohintsDoHorizontal:doVertical:error:`](/Core/GlyphsCore/GSLayer/getAutohintsDoHorizontal:doVertical:error:) — Generates PostScript hints for the layer.
- [`GSLayer hintsFromCharString:doLinks:`](/Core/GlyphsCore/GSLayer/hintsFromCharString:doLinks:) — Extracts PostScript hints from Type 2 charstring text.
- [`GSLayer hintsFromCharString:doLinks:ignoreVerticalStems:`](/Core/GlyphsCore/GSLayer/hintsFromCharString:doLinks:ignoreVerticalStems:) — Extracts PostScript hints from Type 2 charstring text.
- [`GSLayer hintsFromValue1:value2:vertical:doLinks:`](/Core/GlyphsCore/GSLayer/hintsFromValue1:value2:vertical:doLinks:) — Builds a PostScript hint from a charstring stem pair.

