API Collection
GSLayer Metrics
Side bearings, baseline offsets, layer box, and metrics keys.
Overview
Side bearings describe the distance between layer content and the layer advance. Horizontal layout uses left and right side bearings with width. Vertical layout uses top and bottom side bearings with vertWidth and vertOrigin.
Metrics keys link a metric to another glyph, layer, side, or fixed value. Layer metrics keys override glyph metrics keys when present.
Topics
Horizontal Metrics
Advance width for horizontal text layout.
Horizontal distance from the origin to the left outline edge.
Cached left side bearing without updating metrics.
Left side bearing without normalizing the no-outline value.
Horizontal distance from the right outline edge to the advance width.
Cached right side bearing without updating metrics.
Right side bearing without normalizing the no-outline value.
Left side bearing measured at a y coordinate.
Sets the left side bearing measured at a y coordinate.
Right side bearing measured at a y coordinate.
Sets the right side bearing measured at a y coordinate.
Vertical Metrics
Distance from the top metric to the top outline edge.
Cached top side bearing without updating metrics.
Top side bearing without normalizing the no-outline value.
Distance from the bottom outline edge to the vertical advance.
Cached bottom side bearing without updating metrics.
Bottom side bearing without normalizing the no-outline value.
Advance width for vertical text layout.
Vertical origin offset for vertical text layout.
Top side bearing measured at an x coordinate.
Sets the top side bearing measured at an x coordinate.
Bottom side bearing measured at an x coordinate.
Sets the bottom side bearing measured at an x coordinate.
Master Metrics
Vertical metrics for the associated master.
Vertical metrics for a master.
Master metric value for a metrics type.
Master metric value for a metric name, or
nilwhen no matching metric exists.Whether a metric is secondary for the layer’s glyph case.
Stem values for a master.
Common Master Metrics
Ascender value from the associated master.
Descender value from the associated master.
Italic angle from the associated master.
Slant height from the associated master.
Top height from the associated master.
Glyph Metrics
Glyph metrics for left-to-right layout.
Glyph metrics for a writing direction.
Metric Values
Metric value for a side at a measurement height.
Value described by a metrics key for a metric side, or
nilwhen the key cannot be resolved.Value and height described by a metrics key for a metric side, or
nilwhen the key cannot be resolved.
Metrics Keys
Layer-specific metrics key for the advance width.
Layer-specific metrics key for the left side bearing.
Layer-specific metrics key for the right side bearing.
Layer-specific metrics key for the top side bearing.
Layer-specific metrics key for the bottom side bearing.
Layer-specific metrics key for the vertical advance width.
Layer-specific metrics key for the vertical origin.
Parses a metrics key into its referenced glyph, operator, numeric value, opposite side, height, and master.
Metrics Key Alignment
Whether automatic alignment controls the layer width.
Whether automatic alignment controls side bearings.
Whether components are currently aligned by automatic alignment.
Whether an automatic alignment operation is in progress.
Whether automatic component alignment can be applied to the layer.
Applies automatic width alignment.
Metrics key offsets used by automatic component alignment.
Metrics Sync
Tolerance used when deciding whether metrics need synchronization.
Applies all available metrics keys.
Applies the left side-bearing metrics key.
Applies the advance-width metrics key.
Applies the right side-bearing metrics key.
Applies the top side-bearing metrics key.
Applies the bottom side-bearing metrics key.
Applies the vertical advance-width metrics key.
Reinterpolates the horizontal metrics of an Alternative layer or interpolated layer.
Recalculates side bearings from the layer contents.
Horizontal Metrics Keys UI
Display and editing string for the left metrics key.
State flags for the left metrics key.
Display string for the left metrics key and its state.
Plain effective metrics key for the left side bearing.
Display and editing string for the width metrics key.
Fast display string for the width metrics key.
State flags for the width metrics key.
Display string for the width metrics key and its state.
Plain effective metrics key for the advance width.
Display and editing string for the right metrics key.
State flags for the right metrics key.
Display string for the right metrics key and its state.
Plain effective metrics key for the right side bearing.
Vertical Metrics Keys UI
Display and editing string for the top metrics key.
State flags for the top metrics key.
Display string for the top metrics key and its state.
Plain effective metrics key for the top side bearing.
Display and editing string for the bottom metrics key.
State flags for the bottom metrics key.
Display string for the bottom metrics key and its state.
Plain effective metrics key for the bottom side bearing.
Vertical advance width for display.
Display and editing string for the vertical width metrics key.
State flags for the vertical width metrics key.
Display string for the vertical width metrics key and its state.
Plain effective metrics key for the vertical advance width.
Display and editing string for the vertical origin metrics key.
State flags for the vertical origin metrics key.
Display string for the vertical origin metrics key and its state.
Plain effective metrics key for the vertical origin.
Metrics Keys Utilities
Plain metrics key for display and editing.
Attributed display string for a metrics key.
Numeric offset encoded in an aligned metrics key.
Whether any horizontal metrics key is out of sync.
Whether any horizontal metrics key is invalid.
Localized label for a metric side.
Display color for metrics key state flags.
Metrics Locks
Acquires the read lock for metrics.
Releases the read lock for metrics.
Acquires the write lock for metrics.
Releases the write lock for metrics.
Alignment Locks
Acquires the read lock for alignment information.
Releases the read lock for alignment information.
Acquires the write lock for alignment information.
Releases the write lock for alignment information.
Topics
Horizontal Metrics
Advance width for horizontal text layout.
Horizontal distance from the origin to the left outline edge.
Cached left side bearing without updating metrics.
Left side bearing without normalizing the no-outline value.
Horizontal distance from the right outline edge to the advance width.
Cached right side bearing without updating metrics.
Right side bearing without normalizing the no-outline value.
Left side bearing measured at a y coordinate.
Sets the left side bearing measured at a y coordinate.
Right side bearing measured at a y coordinate.
Sets the right side bearing measured at a y coordinate.
Vertical Metrics
Distance from the top metric to the top outline edge.
Cached top side bearing without updating metrics.
Top side bearing without normalizing the no-outline value.
Distance from the bottom outline edge to the vertical advance.
Cached bottom side bearing without updating metrics.
Bottom side bearing without normalizing the no-outline value.
Advance width for vertical text layout.
Vertical origin offset for vertical text layout.
Top side bearing measured at an x coordinate.
Sets the top side bearing measured at an x coordinate.
Bottom side bearing measured at an x coordinate.
Sets the bottom side bearing measured at an x coordinate.
Master Metrics
Vertical metrics for the associated master.
Vertical metrics for a master.
Master metric value for a metrics type.
Master metric value for a metric name.
Whether a metric is secondary for the layer’s glyph case.
Stem values for a master.
Common Master Metrics
Ascender value from the associated master.
Descender value from the associated master.
Italic angle from the associated master.
Slant height from the associated master.
Top height from the associated master.
Glyph Metrics
Glyph metrics for left-to-right layout.
Glyph metrics for a writing direction.
Metric Values
Metric value for a side at a measurement height.
Value described by a metrics key for a metric side.
Evaluates a metrics key for a metric side.
Metrics Keys
Layer-specific metrics key for the advance width.
Layer-specific metrics key for the left side bearing.
Layer-specific metrics key for the right side bearing.
Layer-specific metrics key for the top side bearing.
Layer-specific metrics key for the bottom side bearing.
Layer-specific metrics key for the vertical advance width.
Layer-specific metrics key for the vertical origin.
Parses a metrics key into its referenced glyph, operator, numeric value, opposite side, height, and master.
Metrics Key Alignment
Whether automatic alignment controls the layer width.
Whether automatic alignment controls side bearings.
Whether components are currently aligned by automatic alignment.
Whether an automatic alignment operation is in progress.
Whether automatic component alignment can be applied to the layer.
Applies automatic width alignment.
Metrics key offsets used by automatic component alignment.
Metrics Sync
Tolerance used when deciding whether metrics need synchronization.
Applies all available metrics keys.
Applies the left side-bearing metrics key.
Applies the advance-width metrics key.
Applies the right side-bearing metrics key.
Applies the top side-bearing metrics key.
Applies the bottom side-bearing metrics key.
Applies the vertical advance-width metrics key.
Reinterpolates the horizontal metrics of an Alternative layer or interpolated layer.
Recalculates side bearings from the layer contents.
Horizontal Metrics Keys UI
Display and editing string for the left metrics key.
State flags for the left metrics key.
Display string for the left metrics key and its state.
Plain effective metrics key for the left side bearing.
Display and editing string for the width metrics key.
Fast display string for the width metrics key.
State flags for the width metrics key.
Display string for the width metrics key and its state.
Plain effective metrics key for the advance width.
Display and editing string for the right metrics key.
State flags for the right metrics key.
Display string for the right metrics key and its state.
Plain effective metrics key for the right side bearing.
Vertical Metrics Keys UI
Display and editing string for the top metrics key.
State flags for the top metrics key.
Display string for the top metrics key and its state.
Plain effective metrics key for the top side bearing.
Display and editing string for the bottom metrics key.
State flags for the bottom metrics key.
Display string for the bottom metrics key and its state.
Plain effective metrics key for the bottom side bearing.
Vertical advance width for display.
Display and editing string for the vertical width metrics key.
State flags for the vertical width metrics key.
Display string for the vertical width metrics key and its state.
Plain effective metrics key for the vertical advance width.
Display and editing string for the vertical origin metrics key.
State flags for the vertical origin metrics key.
Display string for the vertical origin metrics key and its state.
Plain effective metrics key for the vertical origin.
Metrics Keys Utilities
Plain metrics key for display and editing.
Attributed display string for a metrics key.
Numeric offset encoded in an aligned metrics key.
Whether any horizontal metrics key is out of sync.
Whether any horizontal metrics key is invalid.
Localized label for a metric side.
Display color for metrics key state flags.
Metrics Locks
Acquires the read lock for metrics.
Releases the read lock for metrics.
Acquires the write lock for metrics.
Releases the write lock for metrics.
Alignment Locks
Acquires the read lock for alignment information.
Releases the read lock for alignment information.
Acquires the write lock for alignment information.
Releases the write lock for alignment information.
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.
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.
Operations for modifying outlines and other layer content.