Class
GSComponent
A reference to another glyph placed as a shape in a glyph layer.
Declaration
class GSComponentDeclaration
@interface GSComponent : GSTransformableElementDeclaration
class GSComponent(GSTransformableElement)Overview
The base glyph is the glyph referenced by the component.
The component layer is the specific layer that is referenced.
The containing layer is the layer in which the component is used as a shape.
Components can use automatic alignment to determine their position in the containing layer. There are different kinds of automatic alignment, see GSComponent.AlignmentGSComponentAlignmentGSComponentAlignment.
Automatic positioning can also be affected by using an anchor to snap a component into place. This mirrors the use of anchors in OpenType layout for mark positioning and cursive attachment.
Smart Components are components that reference a Smart Glyph. A Smart Glyph defines glyph-local axes that can be used to alter components of the glyph.
A component references a glyph by its glyph name. This can cause an invalid state in the following situations:
The referenced glyph does not exist (no base glyph).
The component references itself, causing an infinite reference cycle (bad reference).
The referenced layer does not contain an outline (empty base glyph).
Topics
Creating a Component
Creates a component that references a base glyph by name.
Base Glyph
The name of the referenced base glyph.
The base glyph resolved from componentName in the font of the containing layer.
Resolves the base glyph and updates the reference when the glyph was renamed.
Resolves the base glyph without registering a change to the component.
Resolves the base glyph without undo or change notifications.
Base Layer
The ID of the base-glyph master to use.
The applicable layer of the base glyph.
Prepares an interpolated smart-component layer for later access.
Alignment
A policy or result of automatically positioning a component.
The policy for automatic positioning.
Sets the automatic-positioning policy without undo, change notifications, or layer updates.
The result of the most recent automatic positioning.
The coordinate mode used for automatic base-glyph alignment.
Whether the component participates in automatic base-glyph alignment under the current policy.
Whether the component and containing glyph normally qualify for automatic base-glyph alignment.
Enables automatic positioning.
Attachment
The base anchor name to use for automatic attachment.
Whether the component participates in automatic anchor attachment under the current policy.
Whether the component normally qualifies for automatic anchor attachment.
Whether anchor traversal includes anchors from the component layer.
Smart Components
Explicit interpolation values for smart-component axes.
Replaces the smart-component settings without copying, undo, or change notifications.
Sets an explicit interpolation value for a smart-component axis.
Removes an explicit interpolation value for a smart-component axis.
The explicit interpolation value for a smart-component axis, or
nilwhen the axis has no explicit value.The effective interpolation value for a smart-component axis.
Geometry
The bounds of the transformed component representation.
Whether the closed-path representation crosses that of another component.
Whether the closed-path representation crosses that of another component without first comparing their bounds.
Intersections between the transformed component representation and a line segment.
Representations
The transformed closed paths of the component layer and its nested components.
The transformed closed paths of the component layer and its nested components.
Collects the transformed closed paths while traversing a component hierarchy.
The transformed open paths of the component layer and its nested components.
Collects the transformed open paths while traversing a component hierarchy.
Decomposition
Replaces the component in its containing layer with transformed copies of the base-glyph layer contents.
Detached paths produced by flattening the transformed component contents.
Hangul Composition
The name of the model syllable selected for the component’s Hangul position.
Whether the containing glyph is the model syllable selected for the component’s Hangul position.
Layer API
Moves the component to the beginning of its containing layer’s shape order.
Equality
Whether another component has matching placement and selected configuration values.
Placeholder Representations
A new placeholder path for an unresolved base glyph.
A new placeholder path for a base-glyph hierarchy without paths.
A new placeholder path for a recursive component reference.
Instance Methods
Topics
Creating a Component
Creates a component that references a base glyph by name.
Base Glyph
The name of the referenced base glyph.
The base glyph resolved from componentName in the font of the containing layer.
Resolves the base glyph and updates the reference when the glyph was renamed.
Resolves the base glyph without registering a change to the component.
Resolves the base glyph without undo or change notifications.
Base Layer
The ID of the base-glyph master to use.
The applicable layer of the base glyph.
Prepares an interpolated smart-component layer for later access.
Alignment
A policy or result of automatically positioning a component.
The policy for automatic positioning.
Sets the automatic-positioning policy without undo, change notifications, or layer updates.
The result of the most recent automatic positioning.
The coordinate mode used for automatic base-glyph alignment.
Whether the component participates in automatic base-glyph alignment under the current policy.
Whether the component and containing glyph normally qualify for automatic base-glyph alignment.
Enables automatic positioning.
Attachment
The base anchor name to use for automatic attachment.
Whether the component participates in automatic anchor attachment under the current policy.
Whether the component normally qualifies for automatic anchor attachment.
Whether anchor traversal includes anchors from the component layer.
Smart Components
Explicit interpolation values for smart-component axes.
Replaces the smart-component settings without copying, undo, or change notifications.
Sets an explicit interpolation value for a smart-component axis.
Removes an explicit interpolation value for a smart-component axis.
The explicit interpolation value for a smart-component axis.
The effective interpolation value for a smart-component axis.
Geometry
The bounds of the transformed component representation.
Whether the closed-path representation crosses that of another component.
Whether the closed-path representation crosses that of another component without first comparing their bounds.
Intersections between the transformed component representation and a line segment.
Representations
The transformed closed paths of the component layer and its nested components.
The transformed closed paths of the component layer and its nested components.
Collects the transformed closed paths while traversing a component hierarchy.
The transformed open paths of the component layer and its nested components.
Collects the transformed open paths while traversing a component hierarchy.
Decomposition
Replaces the component in its containing layer with transformed copies of the base-glyph layer contents.
Detached paths produced by flattening the transformed component contents.
Hangul Composition
The name of the model syllable selected for the component’s Hangul position.
Whether the containing glyph is the model syllable selected for the component’s Hangul position.
Layer API
Moves the component to the beginning of its containing layer’s shape order.
Equality
Whether another component has matching placement and selected configuration values.
Placeholder Representations
A new placeholder path for an unresolved base glyph.
A new placeholder path for a base-glyph hierarchy without paths.
A new placeholder path for a recursive component reference.
Instance Methods
Relationships
Inherits From
Conforms To
Foundation.NSCopying- GSSelectableElementProtocol
- GSUserDataProtocol
ObjectiveC.NSObjectProtocolSwift.CVarArgSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.EquatableSwift.Hashable
Relationships
Inherits From
See Also
Shapes
An abstract base class for graphical elements stored in a glyph layer.
A graphical path made of nodes.
A shape group combines zero or more shapes into a single shape, forming a shape tree.