# `GSAxis`

*Class*

`GSAxis` represents an axis in a `GSFont` object.

## Declaration

```swift
class GSAxis
```

```objc
@interface GSAxis : NSObject
```

```python
class GSAxis(NSObject)
```

## Topics

### Instance Properties

- [`GSAxis.axisId`](/Core/GlyphsCore/GSAxis/axisId)
- [`GSAxis.axisTag`](/Core/GlyphsCore/GSAxis/axisTag) — A tag representing the axis type.
- [`GSAxis.canonicalTag`](/Core/GlyphsCore/GSAxis/canonicalTag) — The four-character tag representing the axis type.
- [`GSAxis.defaultValue`](/Core/GlyphsCore/GSAxis/defaultValue) — For variation axes, this is the default value.
- [`GSAxis.isCanonical`](/Core/GlyphsCore/GSAxis/isCanonical) — Whether the axis has a four letter axis tag. Axis with longer tags are used for HOI.
- [`GSAxis.isDefault`](/Core/GlyphsCore/GSAxis/isDefault) — TODO: Add documentation
- [`GSAxis.hidden`](/Core/GlyphsCore/GSAxis/hidden) — The hidden.
- [`GSAxis.name`](/Core/GlyphsCore/GSAxis/name) — The human-readable axis name.
- [`GSAxis.names`](/Core/GlyphsCore/GSAxis/names) — The names.
- [`GSAxis.parent`](/Core/GlyphsCore/GSAxis/parent) — `GSFont` for font-wide axes, `GSGlyph` for glyph-local axes.
- [`GSAxis.tempData`](/Core/GlyphsCore/GSAxis/tempData) — a  dictionary that stores data. It will not be written to disk.
- [`GSAxis.userData`](/Core/GlyphsCore/GSAxis/userData)

### Instance Methods

- [`GSAxis addName:`](/Core/GlyphsCore/GSAxis/addName:) — Adds the name
- [`GSAxis axisTagDefault`](/Core/GlyphsCore/GSAxis/axisTagDefault)
- [`GSAxis countOfNames`](/Core/GlyphsCore/GSAxis/countOfNames) — The number of names
- [`GSAxis indexOfObjectInNames:`](/Core/GlyphsCore/GSAxis/indexOfObjectInNames:) — Returns the index of name in names
- [`GSAxis initWithDict:format:`](/Core/GlyphsCore/GSAxis/initWithDict:format:)
- [`GSAxis initWithName:tag:`](/Core/GlyphsCore/GSAxis/initWithName:tag:) — Convenience initializer (the properties are mutable after initialization).
- [`GSAxis insertObject:inNamesAtIndex:`](/Core/GlyphsCore/GSAxis/insertObject:inNamesAtIndex:) — Inserts the name at index into names
- [`GSAxis objectInNamesAtIndex:`](/Core/GlyphsCore/GSAxis/objectInNamesAtIndex:) — Returns object at idx in names
- [`GSAxis propertyListValueFormat:error:`](/Core/GlyphsCore/GSAxis/propertyListValueFormat:error:)
- [`GSAxis removeObjectFromNames:`](/Core/GlyphsCore/GSAxis/removeObjectFromNames:) — Removes the name
- [`GSAxis removeObjectFromNamesAtIndex:`](/Core/GlyphsCore/GSAxis/removeObjectFromNamesAtIndex:) — Removes the name at idx
- [`GSAxis removeUserDataForKey:`](/Core/GlyphsCore/GSAxis/removeUserDataForKey:) — Removed the object with this key.
- [`GSAxis saveToFile:format:context:error:`](/Core/GlyphsCore/GSAxis/saveToFile:format:context:error:)
- [`GSAxis setTempData:forKey:`](/Core/GlyphsCore/GSAxis/setTempData:forKey:) — Adds key/value to tempData. Pass nil as value to remove previous set data
- [`GSAxis setUserData:forKey:`](/Core/GlyphsCore/GSAxis/setUserData:forKey:) — Adds something to the fonts userData.
- [`GSAxis shortAxisTag`](/Core/GlyphsCore/GSAxis/shortAxisTag) — shorter axisTag for UI purposes
- [`GSAxis tempDataForKey:`](/Core/GlyphsCore/GSAxis/tempDataForKey:) — return value for key in tempData
- [`GSAxis userDataForKey:`](/Core/GlyphsCore/GSAxis/userDataForKey:) — convenience accessor to get to the content of the userData dict

### Type Methods

- [`GSAxis axisIdToTags:axes:`](/Core/GlyphsCore/GSAxis/axisIdToTags:axes:)
- [`GSAxis axisNameToTagMapping`](/Core/GlyphsCore/GSAxis/axisNameToTagMapping)
- [`GSAxis axisTagIsOpenTypeCompliant:`](/Core/GlyphsCore/GSAxis/axisTagIsOpenTypeCompliant:) — [https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#syntactic-requirements-for-design-variation-axis-tags](https://learn.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#syntactic-requirements-for-design-variation-axis-tags)
- [`GSAxis axisTagToNameMapping`](/Core/GlyphsCore/GSAxis/axisTagToNameMapping)
- [`GSAxis cornerAxes`](/Core/GlyphsCore/GSAxis/cornerAxes)
- [`GSAxis defaultAxisTags`](/Core/GlyphsCore/GSAxis/defaultAxisTags)
- [`GSAxis filterEmptyRegions:`](/Core/GlyphsCore/GSAxis/filterEmptyRegions:)
- [`GSAxis shortAxisTagForTag:`](/Core/GlyphsCore/GSAxis/shortAxisTagForTag:)

## Relationships

### Inherits From

- `NSObject`

### Conforms To

- [`GSContainerProtocol`](/Core/GlyphsCore/GSContainerProtocol)
- [`GSIdentifiableParameter`](/Core/GlyphsCore/GSIdentifiableParameter)
- [`GSUserDataProtocol`](/Core/GlyphsCore/GSUserDataProtocol)

## See Also

### Essentials

- [`GSFont`](/Core/GlyphsCore/GSFont) — The top-level model object of a Glyphs document.
- [`GSGlyph`](/Core/GlyphsCore/GSGlyph) — A named glyph and its layer collection in a font.
- [`GSLayer`](/Core/GlyphsCore/GSLayer) — The drawing and editing representation of a glyph.
- [`GSFontMaster`](/Core/GlyphsCore/GSFontMaster)
- [`GSInstance`](/Core/GlyphsCore/GSInstance)

