# GSLayer Import/Export

*API Collection*

Encoding and decoding for layer data.

## Overview

Glyphs file serialization depends on a format version. Encoding can fail when layer content cannot be represented by the requested version.

## Topics

### Encoding

- [`GSLayer propertyListValueFormat:error:`](/Core/GlyphsCore/GSLayer/propertyListValueFormat:error:) — A property-list representation for the specified Glyphs file format version.
- [`GSLayer saveToFile:format:context:error:`](/Core/GlyphsCore/GSLayer/saveToFile:format:context:error:) — Writes the layer in the specified Glyphs file format.
- [`GSLayer attributesDict:`](/Core/GlyphsCore/GSLayer/attributesDict:) — An attribute representation for the specified Glyphs file format version.
- [`GSLayer.readBuffer`](/Core/GlyphsCore/GSLayer/readBuffer) — Values deferred until the layer can complete format-dependent decoding.
- [`GSLayer setReadBuffer:forKey:`](/Core/GlyphsCore/GSLayer/setReadBuffer:forKey:) — Stores a value for format-dependent decoding after the layer hierarchy is available.
- [`GSLayer postRead:format:`](/Core/GlyphsCore/GSLayer/postRead:format:) — Completes format-dependent decoding after the layer has been attached to its object hierarchy.
- [`GSLayer layerDataFromDict:format:error:`](/Core/GlyphsCore/GSLayer/layerDataFromDict:format:error:) — Encodes layer elements as Glyphs property-list data.

### Importing Outlines

- [`GSLayer canImportOutlinesFromFile:`](/Core/GlyphsCore/GSLayer/canImportOutlinesFromFile:) — Whether a file name identifies a supported outline format.
- [`GSLayer canImportOutlinesFromURL:`](/Core/GlyphsCore/GSLayer/canImportOutlinesFromURL:) — Whether a file URL identifies a supported outline format.
- [`GSLayer importOutlinesFromURL:scale:error:`](/Core/GlyphsCore/GSLayer/importOutlinesFromURL:scale:error:) — Imports outlines and adds them to the layer.
- [`GSLayer scaleToFullHeight:bounds:`](/Core/GlyphsCore/GSLayer/scaleToFullHeight:bounds:) — Scales the layer contents to the vertical span of the glyph metrics.

### Export Preparation

- [`GSLayer fontInfoStringFontMaster:error:`](/Core/GlyphsCore/GSLayer/fontInfoStringFontMaster:error:) — A PostScript autohinting font-info representation of a font master.
- [`GSLayer decomposeBraceLayers`](/Core/GlyphsCore/GSLayer/decomposeBraceLayers) — Creates missing Intermediate layers required by component Intermediate layers.
- [`GSLayer decomposeBraceLayersAxesMin:axesMax:`](/Core/GlyphsCore/GSLayer/decomposeBraceLayersAxesMin:axesMax:) — Creates missing Intermediate layers required within an axis range.

## 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 Hints](/Core/GlyphsCore/GSLayer-Hints) — Manual and generated hint data 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.

