Declaration

class GSComponent

Declaration

@interface GSComponent : GSTransformableElement

Declaration

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

Base Glyph

Base Layer

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

Geometry

Representations

Decomposition

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

Instance Methods

Topics

Creating a Component

Base Glyph

Base Layer

Alignment

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

Geometry

Representations

Decomposition

Hangul Composition

Layer API

  • Moves the component to the beginning of its containing layer’s shape order.

Equality

Placeholder Representations

Instance Methods

Relationships

Inherits From

Conforms To

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.