API Collection
GSLayer Editing
Operations for modifying outlines and other layer content.
Overview
Selection-sensitive operations apply to the selected elements when the layer has a selection and otherwise apply to all applicable elements. Fast operations are intended for controlled bulk changes and omit parts of normal edit bookkeeping.
Topics
Connecting Paths
Connects two path endpoints.
Connects two path endpoints and optionally adjusts their adjacent segments.
Opens or divides the path at a node.
Divides paths at two on-curve nodes and reconnects the resulting endpoints crosswise.
Reconnects four on-curve nodes according to their tangent directions.
Connects coincident endpoints of open paths.
Connects the nearest endpoints of a collection of open paths.
Cleaning Paths
Removes empty and negligible paths and simplifies the remaining paths.
Updates node connections to match the geometry of their paths.
Sets closed path directions according to containment and puts the outer path first.
Finds paths whose nodes have coincident positions.
Rounding Coordinates
Rounds selected element coordinates to a grid.
Rounds path, component, and anchor coordinates using the associated font master settings.
Rounds path, component, and anchor coordinates to a grid.
Rounds path, component, and anchor coordinates to a grid without normal edit bookkeeping.
Rounds shape and anchor coordinates to a uniform grid and rounds the layer width to at most unit precision.
Rounds shape and anchor coordinates to a uniform grid without normal edit bookkeeping.
Adding Path Nodes
Adds nodes at extrema of all path segments where needed.
Adds nodes at extrema of path segments.
Adds nodes at inflection points of cubic segments.
General Transformations
Applies an affine transform to the selected elements.
Applies an affine transform to editable layer content.
Applies an affine transform to editable layer content.
Applies an affine transform to editable layer content and conditionally transforms components.
Applies an affine transform to the complete layer without normal edit bookkeeping.
Applies an affine transform to the complete layer and conditionally transforms components without normal edit bookkeeping.
Shifting Content
Shifts layer content horizontally while compensating components for shifts of their base glyphs.
Shifts layer content vertically while compensating components for shifts of their base glyphs.
Moves the shapes, anchors, guides, and background image by an offset.
Slanting
Slants content horizontally around an origin.
Slants content horizontally with configurable outline corrections.
Slants content vertically around an origin.
Corrects stem contrast for a horizontal slant.
Corrects outlines for a horizontal slant using associated font master stems.
Corrects outlines for a horizontal slant using explicit stem dimensions and a correction center.
Boolean Operations
Removes overlaps between applicable paths.
Removes overlaps between applicable paths using explicit open-path and grid settings.
Removes overlaps between paths according to a set of options.
Subtracts selected paths from unselected paths.
Subtracts selected paths from unselected paths.
Subtracts one mutable path collection from another.
Intersects selected paths with unselected paths.
Intersects applicable selected and unselected paths.
Flattening Outlines
Replaces the layer contents with their flattened path outlines and removes overlaps.
Replaces the layer contents with their flattened path outlines.
Replaces the layer contents with flattened path outlines for a drawing feature set.
Synced Editing
Invokes a block for the layers in the same layer group that participate in synced editing.
Invokes a block for the layers of the glyph that participate in synced editing.
Invokes a block for the other layers in the same layer group that participate in synced editing.
See Also
The different roles that a layer can serve.
The paths and components that form the outline of a layer.
Bounding rectangles of outlines, selections, and metrics.
Side bearings, baseline offsets, layer box, and metrics keys.
Setting for rounding coordinates on a layer.
Background content and reference images associated with a layer.
Named attachment points on a layer.
Manual and generated hint data on a layer.
Layer-local guides used while editing outlines.
Spacing adjustment between specific layers.
Layer-local notes displayed with a glyph.
Axis coordinates and rules that place layers in a design space.
Colors used to draw a layer.
Additional values stored for a layer.
Intersections between layer outlines and line segments.