# GSLayer Hints

*API Collection*

Manual and generated hint data on a layer.

## Overview

Hints include PostScript hints, TrueType instructions, and path component hints such as corners, caps, brushes, and segments.

Layer hint APIs preserve ownership, undo, and layer update behavior when hints are added or removed through the normal mutation methods. Fast hint access is for setup and performance-sensitive internal code that handles those responsibilities itself.

## Topics

- [`GSHint`](/Core/GlyphsCore/GSHint)

### Hints

- [`GSLayer.hints`](/Core/GlyphsCore/GSLayer/hints) — Layer hints.
- [`GSLayer.hintsFast`](/Core/GlyphsCore/GSLayer/hintsFast) — Low-level hint storage access.
- [`GSLayer countOfHints`](/Core/GlyphsCore/GSLayer/countOfHints) — The number of stored hints.
- [`GSLayer countOfPostScriptHints`](/Core/GlyphsCore/GSLayer/countOfPostScriptHints) — The number of PostScript hints.
- [`GSLayer indexOfObjectInHints:`](/Core/GlyphsCore/GSLayer/indexOfObjectInHints:) — The index of a hint in the layer.
- [`GSLayer hintWithKey:`](/Core/GlyphsCore/GSLayer/hintWithKey:) — The hint for a stable hint key.
- [`GSLayer objectInHintsAtIndex:`](/Core/GlyphsCore/GSLayer/objectInHintsAtIndex:) — The hint at an index.

### Adding Hints

- [`GSLayer addHint:`](/Core/GlyphsCore/GSLayer/addHint:) — Adds a hint.
- [`GSLayer addHintCheck:`](/Core/GlyphsCore/GSLayer/addHintCheck:) — Adds a hint, checking for an existing path component hint at the same index path.
- [`GSLayer insertObject:inHintsAtIndex:`](/Core/GlyphsCore/GSLayer/insertObject:inHintsAtIndex:) — Inserts a hint at an index.

### Removing Hints

- [`GSLayer removeHint:`](/Core/GlyphsCore/GSLayer/removeHint:) — Removes a hint.
- [`GSLayer removeObjectFromHintsAtIndex:`](/Core/GlyphsCore/GSLayer/removeObjectFromHintsAtIndex:) — Removes the hint at an index.

### Hint Queries

- [`GSLayer.hasHints`](/Core/GlyphsCore/GSLayer/hasHints) — Whether the layer has PostScript or TrueType hints.
- [`GSLayer.hasTrueTypeHints`](/Core/GlyphsCore/GSLayer/hasTrueTypeHints) — Whether the layer has TrueType hints.
- [`GSLayer.hasPostScriptHints`](/Core/GlyphsCore/GSLayer/hasPostScriptHints) — Whether the layer has PostScript hints.
- [`GSLayer.hasCorners`](/Core/GlyphsCore/GSLayer/hasCorners) — Whether the layer has path component hints.
- [`GSLayer.allTrueTypeHints`](/Core/GlyphsCore/GSLayer/allTrueTypeHints) — The TrueType hints stored on the layer.
- [`GSLayer.allPostScriptHints`](/Core/GlyphsCore/GSLayer/allPostScriptHints) — The PostScript hints stored on the layer.
- [`GSLayer.allPathComponents`](/Core/GlyphsCore/GSLayer/allPathComponents) — The path component hints stored on the layer.

### Hint Updates

- [`GSLayer updateCorners`](/Core/GlyphsCore/GSLayer/updateCorners) — Updates path component hints after referenced glyphs or components changed.
- [`GSLayer saveHints`](/Core/GlyphsCore/GSLayer/saveHints) — Saves hint positions before path changes.
- [`GSLayer restoreHints`](/Core/GlyphsCore/GSLayer/restoreHints) — Restores saved hint positions after path changes.
- [`GSLayer updateHints`](/Core/GlyphsCore/GSLayer/updateHints) — Updates hint indexes from their referenced nodes.
- [`GSLayer adjustHintsForReversedPaths:`](/Core/GlyphsCore/GSLayer/adjustHintsForReversedPaths:) — Adjusts hints after reversing paths.
- [`GSLayer applyHints:`](/Core/GlyphsCore/GSLayer/applyHints:) — Applies TrueType hints to the layer at a scale.

### 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 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.

### Hint Locks

- [`GSLayer lockReadHints`](/Core/GlyphsCore/GSLayer/lockReadHints) — Acquires the read lock for hints.
- [`GSLayer unlockReadHints`](/Core/GlyphsCore/GSLayer/unlockReadHints) — Releases the read lock for hints.
- [`GSLayer lockWriteHints`](/Core/GlyphsCore/GSLayer/lockWriteHints) — Acquires the write lock for hints.
- [`GSLayer unlockWriteHints`](/Core/GlyphsCore/GSLayer/unlockWriteHints) — Releases the write lock for hints.

## See Also

- [GSLayer Kind](/Core/GlyphsCore/GSLayer-Kind) — The different roles that a layer can serve.
- [GSLayer Shapes](/Core/GlyphsCore/GSLayer-Shapes) — The paths and components that form the outline of a layer.
- [GSLayer Bounds](/Core/GlyphsCore/GSLayer-Bounds) — Bounding rectangles of outlines, selections, and metrics.
- [GSLayer Metrics](/Core/GlyphsCore/GSLayer-Metrics) — Side bearings, baseline offsets, layer box, and metrics keys.
- [GSLayer Grid](/Core/GlyphsCore/GSLayer-Grid) — Setting for rounding coordinates on a layer.
- [GSLayer Background](/Core/GlyphsCore/GSLayer-Background) — Background content and reference images associated with a layer.
- [GSLayer Anchors](/Core/GlyphsCore/GSLayer-Anchors) — Named attachment points on a layer.
- [GSLayer Guides](/Core/GlyphsCore/GSLayer-Guides) — Layer-local guides used while editing outlines.
- [GSLayer Kerning](/Core/GlyphsCore/GSLayer-Kerning) — Spacing adjustment between specific layers.
- [GSLayer Annotations](/Core/GlyphsCore/GSLayer-Annotations) — Layer-local notes displayed with a glyph.
- [GSLayer Interpolation](/Core/GlyphsCore/GSLayer-Interpolation) — Axis coordinates and rules that place layers in a design space.
- [GSLayer Color](/Core/GlyphsCore/GSLayer-Color) — Colors used to draw a layer.
- [GSLayer Attributes](/Core/GlyphsCore/GSLayer-Attributes) — Additional values stored for a layer.
- [GSLayer Inspection](/Core/GlyphsCore/GSLayer-Inspection) — Intersections between layer outlines and line segments.
- [GSLayer Editing](/Core/GlyphsCore/GSLayer-Editing) — Operations for modifying outlines and other layer content.

