# `GSLayer getAutohintsDoHorizontal:doVertical:error:`

*Instance Method*

Generates PostScript hints for the layer.

## Declaration

```swift
func getAutohintsDoHorizontal(_ doHorizontal: Bool, doVertical: Bool) throws -> [Any]
```

```objc
- (NSArray *) getAutohintsDoHorizontal:(BOOL) doHorizontal doVertical:(BOOL) doVertical error:(NSError **) error;
```

```python
getAutohintsDoHorizontal_doVertical_error_(doHorizontal: bool, doVertical: bool) -> tuple[list, NSError]
```

## Parameters

- `doHorizontal` — Whether to generate horizontal hints.
- `doVertical` — Whether to generate vertical hints.
- `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 hints. On failure, this method returns `nil`.

## Discussion

The returned hints are not added to the layer.

## See Also

### Autohinting

- [`GSLayer autohint`](/Core/GlyphsCore/GSLayer/autohint) — Adds generated PostScript hints to the layer.
- [`GSLayer autohintError:`](/Core/GlyphsCore/GSLayer/autohintError:) — Adds generated PostScript hints to 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.

