# `GSGuide`

*Class*

A guide used to align and measure outlines while editing.

## Declaration

```swift
class GSGuide
```

```objc
@interface GSGuide : GSElement
```

```python
class GSGuide(GSElement)
```

## Overview

Guides assist drawing in the editor and are not exported as part of a font’s outlines. A guide has a position and angle in the coordinate system of the layer where it is displayed.

A guide belongs either to a layer (**local guide**) or to a master (**global guide**).

A global guide can use a filter to limit the glyphs in which it is visible. The `space` glyph shows all global guides, ignoring their filters.

Attach and detach guides through the guide collection APIs of the layer or master to keep ownership consistent.

## Overview

A guide belongs either to a layer or to a master. Local guides apply to one layer, while global guides can be displayed across the layers associated with their master.

## Topics

### Angle

- [`GSGuide.angle`](/Core/GlyphsCore/GSGuide/angle) — The rotation in degrees, with zero degrees along the positive x-axis.
- [`GSGuide.lockAngle`](/Core/GlyphsCore/GSGuide/lockAngle) — Whether changes to the angle are disabled.
- [`GSGuide.hasSlope`](/Core/GlyphsCore/GSGuide/hasSlope) — Whether the angle is represented as a slope.
- [`GSGuide.angleUI`](/Core/GlyphsCore/GSGuide/angleUI) — The UI representation of the angle as degrees or a slope.
- [`GSGuide beginPointForLayerWidth:`](/Core/GlyphsCore/GSGuide/beginPointForLayerWidth:) — The start point used to represent the line at the specified layer width.
- [`GSGuide endPointForLayerWidth:`](/Core/GlyphsCore/GSGuide/endPointForLayerWidth:) — The end point used to represent the line at the specified layer width.

### Identity and Visibility

- [`GSGuide.name`](/Core/GlyphsCore/GSGuide/name) — A descriptive name displayed along the guide.
- [`GSGuide.filter`](/Core/GlyphsCore/GSGuide/filter) — A predicate controlling which glyphs display a global guide.
- [`GSGuide visibleInGlyph:`](/Core/GlyphsCore/GSGuide/visibleInGlyph:) — Whether the guide is visible in a glyph.

### Measurements and Grid

- [`GSGuide.showMeasurement`](/Core/GlyphsCore/GSGuide/showMeasurement) — Whether distances between consecutive outline intersections are displayed.
- [`GSGuide.grid`](/Core/GlyphsCore/GSGuide/grid) — The distance in font units between tick marks along a line guide.
- [`GSGuide.intersections`](/Core/GlyphsCore/GSGuide/intersections) — The outline intersections calculated for the most recently supplied layer.
- [`GSGuide calculateIntersectionsForLayer:`](/Core/GlyphsCore/GSGuide/calculateIntersectionsForLayer:) — Calculates the intersections between the guide and a layer’s outlines.

### Interaction

- [`GSGuide.handle`](/Core/GlyphsCore/GSGuide/handle) — A transient handle for rotating the guide.
- [`GSGuide hitTest:inLayer:tolerance:`](/Core/GlyphsCore/GSGuide/hitTest:inLayer:tolerance:) — Whether a point is within a given distance of the guide.

### Equality

- [`GSGuide isEqualToGuide:`](/Core/GlyphsCore/GSGuide/isEqualToGuide:) — Whether another guide has equivalent geometry and settings.

### Legacy API

- [`GSGuideType`](/Core/GlyphsCore/GSGuideType) — The geometry of a guide.
- [`GSGuide.type`](/Core/GlyphsCore/GSGuide/type) — The type of the guide.
- [`GSGuide.length`](/Core/GlyphsCore/GSGuide/length) — The length of the guide.
- [`GSGuide.size`](/Core/GlyphsCore/GSGuide/size) — The size of the guide.

## Relationships

### Inherits From

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

