Class
GSFont
The top-level model object of a Glyphs document.
Declaration
class GSFontDeclaration
@interface GSFont : NSObjectDeclaration
class GSFont(NSObject)Overview
A font owns the glyphs, masters, instances, axes, kerning, and layout code, and metadata that make up a type project.
Axes describe the types of styles that the font has. Masters define the type metrics at specific axis locations. Instances pinpoint the styles that are exported to font files. Text characters are mapped to glyphs. Layers make up the visual component of a glyph. Kerning controls the positioning of consecutive glyphs. Layout code further controls glyph positioning and glyph substitution to produce the final text layout.
The font distinguishes local data from data imported from linked fonts. Local glyphs and masters belong to the font and are edited through its mutation APIs. Imported glyphs and masters supplement lookup and interpolation APIs but remain owned by their source fonts.
Topics
Creating a Font
Creates a font by reading a Glyphs file or package.
Creates a font from the contents of a Glyphs file.
Creates a font from a Glyphs property-list representation.
Creates a font from a Glyphs property-list representation with an associated file path.
Document
The document containing the font.
The location of the document containing the font.
Font Information
The default-language family name.
A family name suitable for displaying the font in the user interface.
The number of font units per em.
The major component of the font version.
The minor component of the font version.
The creation date recorded for the font.
The ten-number PANOSE classification, or
nilwhen no classification is specified.A note stored with the font for use in the editor.
Font Type
The interpolation and export mode of a font.
The interpolation and export mode used by the font.
Returns the project-file key for a font type.
Returns the font type represented by a project-file key.
Glyphs
The local glyphs defined by the font.
The local and imported glyphs available to the font.
The glyphs supplied by linked fonts.
The number of local glyphs defined by the font.
The number of local glyphs defined by the font.
Returns the local glyph at an index in glyphs, or
nilwhen the index is out of bounds.The index of a glyph, or
nilwhen the glyph is not defined by the font.
Accessing Glyphs
Returns the local or imported glyph with a name, or
nilwhen no glyph matches.Returns a glyph for a local lookup by name, or
nilwhen no glyph matches.Returns the local glyph with a name, or
nilwhen no glyph matches.Returns the local or imported glyph with an identifier, or
nilwhen no glyph matches.Returns whether the font defines a local glyph with a name.
The names of the local glyphs in glyph order.
The distinct tags used by local glyphs, sorted by name.
Returns glyph-name completions for the partial name around a range.
Unicode & Characters
Returns the local or imported glyph associated with a Unicode scalar, or
nilwhen no glyph matches.Returns the local or imported glyph associated with a Unicode scalar, or
nilwhen no glyph matches.Returns the local or imported glyph associated with the first matching Unicode scalar, or
nilwhen none match.Returns a glyph from this font’s character cache associated with a Unicode scalar, or
nilwhen no glyph matches.Returns a glyph from this font’s character cache associated with the first matching Unicode scalar, or
nilwhen none match.Returns the local or imported glyph represented by a Unicode scalar or temporary display character, or
nilwhen no glyph matches.Returns the primary Unicode scalar of an encoded glyph or a temporary display character for an unencoded glyph.
The lookup cache used to map Unicode strings and temporary display characters to glyphs.
Returns the cached local or imported glyph associated with a Unicode scalar, or
nilwhen no glyph matches.Returns the cached local or imported glyph represented by a Unicode scalar or temporary display character, or
nilwhen no glyph matches.Returns the cached local or imported glyph represented by a Unicode scalar or temporary display character, or
nilwhen no glyph matches.Prepares the character cache from the local and imported glyphs.
Converts display text containing slash-prefixed glyph names to a string of display characters.
Adding and Removing Glyphs
Creates a glyph configured for the font without adding it to glyphs.
Creates a glyph configured for the font without adding it to glyphs.
Adds a glyph to the font.
Adds a glyph without undo, observer notifications, synchronization, or cache updates.
Adds a sequence of glyphs to the font as one undoable change.
Removes a glyph from the font and clears its parent.
Removes a sequence of glyphs from the font as one undoable change.
Creates and adds glyphs for a sequence of glyph names and Unicode ranges.
Glyph Names
A name that is unique among the local glyphs in the font.
A name that is unique among the local glyphs in the font.
A suffix that makes the glyph name unique among the local glyphs in the font, or
nilwhen no suffix is needed.Makes the glyph name unique among the local glyphs in the font.
Notifies the font that a glyph name has changed.
The kinds of references affected by renamed glyphs.
Updates references to renamed glyphs after confirmation when affected references exist.
Updates references to renamed glyphs without requesting confirmation.
Returns whether OpenType feature code contains a glyph name as a complete token.
Glyph Name Queries
Returns the local glyph names matching a name query.
Expands name queries into a set of local glyph names.
Returns the part of a matching glyph name represented by
*in a name pattern, ornilwhen the pattern does not contain*or the glyph name is shorter than the pattern.Rebuilds the cache that maps local glyph names to glyphs.
Exporting Glyphs
The names of the local and imported glyphs that are included in export.
Returns the glyph names for Unicode scalars that resolve to local or imported glyphs included in export.
Returns whether all named local or imported glyphs are present and included in export.
Returns whether all Unicode scalars resolve to local or imported glyphs included in export.
Returns the names of local or imported glyphs that are present and included in export.
Returns the number of matches found for local or imported glyph infos in the font.
Returns the number of Unicode scalars that resolve to local or imported glyphs in the font.
Glyph Relationships
Returns component glyph names used by a glyph.
Returns component glyph names used by a glyph on a master.
Returns glyphs that reference a component glyph on a master layer.
Glyph information used to derive glyph metadata and component relationships.
Glyph Ordering and Caches
Keeps alternate glyphs next to their base glyph when sorting glyphs.
Sorts the font’s glyphs using the font glyph order and glyph metadata.
Sorts a mutable glyph array using a glyph-name order list and glyph metadata.
Invalidates the glyph name and identifier lookup caches.
Axes
The font axes defining the font design space.
The number of font axes.
The font axis at an index, or
nilwhen the index is out of range.The index of a font axis, or
nilwhen the axis is not in the font.The canonical font axes.
Returns the font axis with an identifier, or
nilwhen no axis matches.Returns the font axis with a name, or
nilwhen no axis matches.Returns the font axis with an OpenType variation tag, or
nilwhen no axis matches.Adds a font axis.
Inserts a font axis at an index.
Removes a font axis.
Removes the font axis at an index.
Returns font axes derived from legacy master coordinate data.
Axis Values
Returns sorted internal coordinate values for all masters and a glyph.
Returns sorted internal coordinate values for the selected masters and glyph.
Returns internal variation ranges keyed by OpenType variation tag.
Returns editable axis positions for a master in font-axis order.
Internal axis positions in the order of the supplied font axes.
Axis values from internal axis positions in font-axis order.
Masters
The local masters of the font.
The number of local masters.
Returns the local or imported master at an index, or
nilwhen the index is out of bounds.The index of a local master, or
nilwhen the master is not in the font.Returns the local or imported master with an identifier, or
nilwhen no master matches.Returns the first local or imported master with a name, or
nilwhen no master matches.Returns the master used as the default interpolation origin.
Returns an unused master identifier.
Inserts a local master without adding layer content.
Appends a local master without adding layer content.
Removes a local master without removing layer content.
Master Content
Adds a local master and copies the content associated with it into the font.
Inserts a local master and copies the content associated with it into the font.
Removes a local master and the layer content associated with it.
Replaces a local master at an index without changing layer content.
Copies glyph layers associated with one master identifier to another master identifier.
Copies layers associated with one master identifier to another master identifier.
Copies master-specific font information from one master identifier to another master identifier.
Adds a master from another font as a new local master.
Adds the generated contents of an instance as a new local master.
Imported Masters and Fonts
The masters imported from linked fonts.
The fonts that supply imported glyphs or imported masters.
The local and imported masters of the font.
The number of local and imported masters.
Returns the local or imported master at an index, or
nilwhen the index is out of bounds.The index of a local or imported master, or
nilwhen the master is not in the font.Reloads linked fonts and refreshes imported masters and imported glyphs.
Master Locations
Returns the master nearest to an internal design-space position.
Returns the master or Intermediate layer nearest to an internal design-space position.
Returns the master at an internal design-space position.
Calculates internal and external coordinate ranges for the font axes.
Calculates internal and external coordinate ranges for font axes and masters.
Instances
Export configurations of the font.
The number of instances in the font.
Returns the instance at an index, or
nilwhen the index is out of range.Inserts an instance at an index.
Inserts an instance at an index.
Adds an instance to the font.
Adds an instance without undo registration or change notifications.
Removes an instance from the font.
Removes instances from the font.
Removes the instance at an index.
Replaces the instance at an index.
Instance groups for UI presentation.
Instances with unique interpolation locations.
Returns the instance at an internal design-space position.
Metrics
Font-wide metrics definitions.
KVO marker for changes that affect metrics.
Returns the number of font-wide metrics definitions.
Returns the metric at an index.
Returns the first metric with a name.
Returns the first metric with a type and name.
Returns the first metric with a type, name, and filter.
Adds a metric definition to the font.
Removes a metric definition from the font.
Sorts metric definitions by filter and position.
Creates metrics from dictionary descriptions.
Marks layer metrics for recalculation.
Assigns default layer widths for a glyph.
Stems
Font-wide stem definitions.
Returns the number of stem definitions.
Returns the stem at an index.
Returns the first stem with an identifier.
Returns the first stem with a name.
Adds a stem definition to the font.
Removes a stem definition from the font.
Numbers
Font-wide number definitions.
Returns the number of number definitions.
Returns the number definition at an index.
Returns the first number definition with an identifier.
Returns the first number definition with a name.
Adds a number definition to the font.
Removes a number definition from the font.
Grid
Main grid spacing used for rounding coordinates.
Subdivision applied to the main grid spacing.
Effective grid length used for rounding coordinates.
Stored main grid spacing.
Stored grid subdivision.
Editing Settings
Small keyboard movement step in font units.
Larger keyboard movement step in font units.
Largest keyboard movement step in font units.
A Boolean value that controls whether editing operations snap to nearby objects.
A Boolean value that controls whether preview drawing removes overlaps.
Text strings stored for edit tabs.
Kerning
Left-to-right kerning data.
Right-to-left kerning data.
Vertical kerning data.
Kerning dictionary for a writing direction.
Kerning dictionary for one master and writing direction.
Kerning value between two glyphs in a master and writing direction.
Kerning value between two glyphs in a master kerning dictionary.
Kerning value for a pair of kerning keys.
Sets the kerning value for a pair of kerning keys.
Removes the kerning value for a pair of kerning keys.
Replaces the kerning dictionary for one master and writing direction.
Adds kerning pairs to the kerning dictionary for one master and writing direction.
Returns the master identifier used for metrics and kerning data.
Returns the master identifier used for metrics and kerning data.
Contextual Kerning
Contextual kerning data.
Contextual kerning value for a context key and master.
Sets the contextual kerning value for a context key and master.
Removes the contextual kerning value for a context key and master.
Replaces a context key while keeping its master values.
Parses a contextual kerning key into glyph tokens and class tokens.
Kerning Maintenance
Converts redundant glyph kerning to group kerning for a writing direction.
Removes kerning pairs that reference missing glyphs or unused groups.
Sorts the kerning dictionaries into font order.
Replaces a kerning key in selected masters and writing direction.
Moves right-to-left kerning from left-to-right kerning data to right-to-left kerning data.
Returns migrated right-to-left kerning data from a kerning dictionary.
Returns right-to-left kerning converted back into left-to-right kerning data.
Converts imported kerning from glyph names to glyph identifiers.
Layout Features
Layout features used when compiling OpenType feature code.
Number of layout features.
Layout feature at an index, or
nilwhen the index is out of range.The index of a layout feature, or
nilwhen the feature is not in the font.Returns the first layout feature with a tag.
Returns the first enabled layout feature with a tag.
Returns the first automatic layout feature with a tag.
Returns the first automatic layout feature with a tag.
Adds a layout feature.
Inserts a layout feature at an index.
Removes a layout feature.
Removes the layout feature at an index.
Replaces the layout feature at an index.
Updates automatic layout features and classes.
Imports OpenType feature code into the font.
Layout Classes
Layout classes in the font.
A mutable array of layout classes.
The number of layout classes.
The layout class at an index.
The index of a layout class, or
nilwhen the layout class is not in the font.The layout class with the specified name.
Adds a layout class.
Adds a layout class parsed from FEA class code.
Inserts a layout class at an index.
Removes a layout class.
Removes the layout class at an index.
Replaces the layout class at an index.
Layout Prefixes
Feature prefixes in the font.
The number of feature prefixes.
The feature prefix at an index.
The feature prefix with the specified name.
Adds a feature prefix.
Inserts a feature prefix at an index.
Removes a feature prefix.
Removes the feature prefix at an index.
Replaces the feature prefix at an index.
Layout Code
Returns the FEA block (feature, class, prefix) matching the given file name.
Adds a feature block to the font, basing the type and title on the file name.
Script and language tags that have layout rules in the compiled temporary font.
Properties
The font info properties stored in the font.
The number of font info properties.
The font info property at an index, or
nilwhen the index is out of range.The index of a font info property, or
nilwhen the property is not in the font.The font info property for a property name, or
nilwhen the font has no matching property.The localized font info value for a property name and language tag, or
nilwhen the font has no matching value.The default-language value for a font info property, or
nilwhen the font has no matching value.Sets a font info value for a property name and language tag.
Sets the default-language value for a font info property.
Adds a font info property.
Adds a font info property without undo registration or change notifications.
Inserts a font info property at an index.
Removes a font info property.
Removes the font info property at an index.
The font info property names supported by the font.
The preferred localized family names.
Custom Parameters
Custom parameters stored in the font.
The number of custom parameters.
The custom parameter at an index.
The first custom parameter with a name.
The first active custom parameter with a name.
The value of an active custom parameter.
The Boolean value of an active custom parameter.
The color value of an active custom parameter.
Sets the value of a custom parameter.
Adds a custom parameter.
Inserts a custom parameter at an index.
Removes a custom parameter.
Removes the custom parameter at an index.
Removes the first custom parameter with a name.
Replaces the custom parameter at an index.
Invalidates cached active custom parameter values.
Colors
The RGB color space used by document colors in the font.
Changes the color space used by document colors in the font.
Returns the given color converted to match the color space of the font.
Passes each document color to the given block and updates it if the block returns a new color.
Color Label
The color label used to organize the font, or
nilif no color label is assigned.A standard color label, or GSLabelColor.noColor if the font has a custom color label or no color label.
User Data
Returns user data for a key, or
nilif no value is set.Sets user data for a key.
Removes user data for a key.
Temporary Data
Runtime data stored on the font.
Returns temporary data for a key, or
nilif no value is set.Sets temporary data for a key.
Undo
The undo manager used for font-level changes, or
nilwhen no document provides one.Disables undo registration for the font and its glyphs.
Enables undo registration for the font and its glyphs.
Change Tracking
Reports that a font element changed.
Change keys collected while interface updates are disabled.
Whether automatic glyph name substitution is disabled.
Interface Updates
Defers interface updates and change notifications.
Performs work while deferring interface updates and change notifications.
Suppresses interface updates and change notifications.
Performs work while suppressing interface updates and change notifications.
Processes deferred interface updates and resumes normal update behavior.
Resumes normal update behavior without reporting changes made while updates were disabled.
Returns whether interface updates and change notifications are enabled.
Glyph Locking
Acquires shared read access to the glyph collection.
Releases shared read access to the glyph collection.
Acquires exclusive write access to the glyph collection.
Releases exclusive write access to the glyph collection.
Dependencies
External dependencies required by the font.
Adds or replaces an external dependency.
Removes an external dependency.
File Format
The Glyphs file format version used to read and write the font.
The package type recorded in serialized font data.
The Glyphs app version that last wrote the font.
Filters default-language properties that cannot be represented in legacy formats.
Font info property names used by legacy file formats.
Importing Font Data
Reads editor and file settings from a Glyphs property-list representation.
Stores temporary serialized data for post-read processing.
Completes the font after reading serialized data.
Completes editor-facing state after reading serialized data.
Imports metrics and kerning from Adobe Font Metrics data.
Saving
Saves the font to a file or package.
Saves the font to a file or package using an explicit format and save context.
Creates a save context for a destination and package type.
A property-list representation of the font.
Prepares the font before writing.
A property-list representation of editor and file settings.
Copying and Scaling
Creates a copy of the font with selected glyph and layer data.
Scales the font by a factor.
Initializers
Creates a partially initialized font for reading serialized data.
Creates a font containing glyphs with the given names for testing.
Creates a font by reading its Glyphs file representation.
Instance Properties
Disables automatic component alignment.
Skips compatibility warnings during interpolation and generation.
The original file format version preserved while saving in another format.
The path to the temp font
Instance Methods
Applies glyph-set export parameters from an instance to the receiver.
Finds the longest dot-separated base name of
namethat resolves to a glyph accepted bytest. this is useful for finding glyph info for alternate of PUA glyphs.Recalculates the temp font.
Applies the default settings used when creating or reading a font.
Collects glyph-set export parameters from an instance.
Generates a static font from an instance.
Generates a variable font source from an instance.
Interpolates a master for an instance.
Returns the master identifier used as source for hints.
Returns the instance nearest to an internal design-space position.
Returns normalized design-space locations for selected masters and Intermediate layers.
Returns normalized design-space locations for masters.
Topics
Creating a Font
Creates a font by reading a Glyphs file or package.
Creates a font from the contents of a Glyphs file.
Creates a font from a Glyphs property-list representation.
Creates a font from a Glyphs property-list representation with an associated file path.
Document
The document containing the font.
The location of the document containing the font.
Font Information
The default-language family name.
A family name suitable for displaying the font in the user interface.
The number of font units per em.
The major component of the font version.
The minor component of the font version.
The creation date recorded for the font.
The ten-number PANOSE classification, or
nilwhen no classification is specified.A note stored with the font for use in the editor.
Font Type
The interpolation and export mode of a font.
The interpolation and export mode used by the font.
Returns the project-file key for a font type.
Returns the font type represented by a project-file key.
Glyphs
The local glyphs defined by the font.
The local and imported glyphs available to the font.
The glyphs supplied by linked fonts.
The number of local glyphs defined by the font.
The number of local glyphs defined by the font.
Returns the local glyph at an index in glyphs, or
nilwhen the index is out of bounds.Returns the index of a local glyph in glyphs, or
NSNotFoundwhen the glyph is not present.
Accessing Glyphs
Returns the local or imported glyph with a name, or
nilwhen no glyph matches.Returns a glyph for a local lookup by name, or
nilwhen no glyph matches.Returns the local glyph with a name, or
nilwhen no glyph matches.Returns the local or imported glyph with an identifier, or
nilwhen no glyph matches.Returns whether the font defines a local glyph with a name.
Returns the local or imported glyphs matching a sequence of names.
The names of the local glyphs in glyph order.
The distinct tags used by local glyphs, sorted by name.
Returns glyph-name completions for the partial name around a range.
Unicode & Characters
Returns the local or imported glyph associated with a Unicode code point, or
nilwhen no glyph matches.Returns the local or imported glyph associated with a Unicode code point, or
nilwhen no glyph matches.Returns the local or imported glyph associated with the first matching Unicode code point, or
nilwhen none match.Returns a glyph from this font’s character cache associated with a Unicode code point, or
nilwhen no glyph matches.Returns a glyph from this font’s character cache associated with the first matching Unicode code point, or
nilwhen none match.Returns the local or imported glyph represented by a Unicode scalar or temporary display character, or
nilwhen no glyph matches.Returns the primary Unicode scalar of an encoded glyph or a temporary display character for an unencoded glyph.
The lookup cache used to map Unicode strings and temporary display characters to glyphs.
Returns the cached local or imported glyph associated with a Unicode code point, or
nilwhen no glyph matches.Returns the cached local or imported glyph represented by a Unicode scalar or temporary display character, or
nilwhen no glyph matches.Returns the cached local or imported glyph represented by a Unicode scalar or temporary display character, or
nilwhen no glyph matches.Prepares the character cache from the local and imported glyphs.
Converts display text containing slash-prefixed glyph names to a string of display characters.
Adding and Removing Glyphs
Creates a glyph configured for the font without adding it to glyphs.
Creates a glyph configured for the font without adding it to glyphs.
Adds a glyph to the font.
Adds a glyph without undo, observer notifications, synchronization, or cache updates.
Adds a sequence of glyphs to the font as one undoable change.
Removes a glyph from the font and clears its parent.
Removes a sequence of glyphs from the font as one undoable change.
Creates and adds glyphs for a sequence of glyph names and Unicode ranges.
Glyph Names
A name that is unique among the local glyphs in the font.
A name that is unique among the local glyphs in the font.
A suffix that makes the glyph name unique among the local glyphs in the font, or
nilwhen no suffix is needed.Makes the glyph name unique among the local glyphs in the font.
Notifies the font that a glyph name has changed.
The kinds of references affected by renamed glyphs.
Updates references to renamed glyphs after confirmation when affected references exist.
Updates references to renamed glyphs without requesting confirmation.
Returns whether OpenType feature code contains a glyph name as a complete token.
Glyph Name Queries
Returns the local glyph names matching a name query.
Expands name queries into a set of local glyph names.
Returns the part of a matching glyph name represented by
*in a name pattern, ornilwhen the pattern does not contain*or the glyph name is shorter than the pattern.Rebuilds the cache that maps local glyph names to glyphs.
Exporting Glyphs
The names of the local and imported glyphs that are included in export.
Returns the glyph names for Unicode code points that resolve to local or imported glyphs included in export.
Returns whether all named local or imported glyphs are present and included in export.
Returns whether all Unicode code points resolve to local or imported glyphs included in export.
Returns the names of local or imported glyphs that are present and included in export.
Returns the names and Unicode queries that resolve to local or imported glyphs in the font.
Returns the number of matches found for local or imported glyph infos in the font.
Returns the number of Unicode code points that resolve to local or imported glyphs in the font.
Glyph Relationships
Returns component glyph names used by a glyph.
Returns component glyph names used by a glyph on a master.
Returns glyphs that reference a component glyph on a master layer.
Glyph information used to derive glyph metadata and component relationships.
Glyph Ordering and Caches
Keeps alternate glyphs next to their base glyph when sorting glyphs.
Sorts the font’s glyphs using the font glyph order and glyph metadata.
Sorts a mutable glyph array using a glyph-name order list and glyph metadata.
Invalidates the glyph name and identifier lookup caches.
Axes
The font axes defining the font design space.
The number of font axes.
The font axis at an index, or
nilwhen the index is out of range.Returns the index of a font axis, or
NSNotFoundwhen the axis is not in the font.The canonical font axes.
Returns the font axis with an identifier, or
nilwhen no axis matches.Returns the font axis with a name, or
nilwhen no axis matches.Returns the font axis with an OpenType variation tag, or
nilwhen no axis matches.Adds a font axis.
Inserts a font axis at an index.
Removes a font axis.
Removes the font axis at an index.
Returns font axes derived from legacy master coordinate data.
Axis Values
Returns sorted internal coordinate values for all masters and a glyph.
Returns sorted internal coordinate values for the selected masters and glyph.
Returns internal variation ranges keyed by OpenType variation tag.
Returns editable axis positions for a master in font-axis order.
Returns a newly allocated list of internal axis positions in font-axis order.
Writes internal axis positions into a caller-provided list in font-axis order.
Returns axis values from a list of internal axis positions.
Masters
The local masters of the font.
The number of local masters.
Returns the local or imported master at an index, or
nilwhen the index is out of bounds.Returns the index of a local master, or
NSNotFoundwhen the master is not local.Returns the local or imported master with an identifier, or
nilwhen no master matches.Returns the first local or imported master with a name, or
nilwhen no master matches.Returns the master used as the default interpolation origin.
Returns an unused master identifier.
Inserts a local master without adding layer content.
Appends a local master without adding layer content.
Removes a local master without removing layer content.
Master Content
Adds a local master and copies the content associated with it into the font.
Inserts a local master and copies the content associated with it into the font.
Removes a local master and the layer content associated with it.
Replaces a local master at an index without changing layer content.
Copies glyph layers associated with one master identifier to another master identifier.
Copies layers associated with one master identifier to another master identifier.
Copies master-specific font information from one master identifier to another master identifier.
Adds a master from another font as a new local master.
Adds the generated contents of an instance as a new local master.
Imported Masters and Fonts
The masters imported from linked fonts.
The fonts that supply imported glyphs or imported masters.
The local and imported masters of the font.
The number of local and imported masters.
Returns the local or imported master at an index, or
nilwhen the index is out of bounds.Returns the index of a local or imported master, or
NSNotFoundwhen the master is not in the font.Reloads linked fonts and refreshes imported masters and imported glyphs.
Master Locations
Returns the master nearest to an internal design-space position.
Returns the master or Intermediate layer nearest to an internal design-space position.
Returns the master at an internal design-space position.
Calculates internal and external coordinate ranges for the font axes.
Calculates internal and external coordinate ranges for font axes and masters.
Instances
Export configurations of the font.
The number of instances in the font.
Returns the instance at an index, or
nilwhen the index is out of range.Inserts an instance at an index.
Inserts an instance at an index.
Adds an instance to the font.
Adds an instance without undo registration or change notifications.
Removes an instance from the font.
Removes instances from the font.
Removes the instance at an index.
Replaces the instance at an index.
Instance groups for UI presentation.
Instances with unique interpolation locations.
Returns the instance at an internal design-space position.
Returns the instance nearest to an internal design-space position.
Metrics
Font-wide metrics definitions.
KVO marker for changes that affect metrics.
Returns the number of font-wide metrics definitions.
Returns the metric at an index.
Returns the first metric with a name.
Returns the first metric with a type and name.
Returns the first metric with a type, name, and filter.
Adds a metric definition to the font.
Removes a metric definition from the font.
Sorts metric definitions by filter and position.
Creates metrics from dictionary descriptions.
Marks layer metrics for recalculation.
Assigns default layer widths for a glyph.
Stems
Font-wide stem definitions.
Returns the number of stem definitions.
Returns the stem at an index.
Returns the first stem with an identifier.
Returns the first stem with a name.
Adds a stem definition to the font.
Removes a stem definition from the font.
Numbers
Font-wide number definitions.
Returns the number of number definitions.
Returns the number definition at an index.
Returns the first number definition with an identifier.
Returns the first number definition with a name.
Adds a number definition to the font.
Removes a number definition from the font.
Grid
Main grid spacing used for rounding coordinates.
Subdivision applied to the main grid spacing.
Effective grid length used for rounding coordinates.
Stored main grid spacing.
Stored grid subdivision.
Editing Settings
Small keyboard movement step in font units.
Larger keyboard movement step in font units.
Largest keyboard movement step in font units.
A Boolean value that controls whether editing operations snap to nearby objects.
A Boolean value that controls whether preview drawing removes overlaps.
Text strings stored for edit tabs.
Kerning
Left-to-right kerning data.
Right-to-left kerning data.
Vertical kerning data.
Kerning dictionary for a writing direction.
Kerning dictionary for one master and writing direction.
Kerning value between two glyphs in a master and writing direction, or
NSNotFoundwhen no pair applies.Kerning value between two glyphs in a master kerning dictionary, or
NSNotFoundwhen no pair applies.- kerningForFontMasterID:
leftKey: kerningForFontMasterID_rightKey: direction: leftKey_ rightKey_ direction_ Kerning value for a pair of kerning keys, or
NSNotFoundwhen no pair is stored. Sets the kerning value for a pair of kerning keys.
Removes the kerning value for a pair of kerning keys.
Replaces the kerning dictionary for one master and writing direction.
Adds kerning pairs to the kerning dictionary for one master and writing direction.
Returns the master identifier used for metrics and kerning data.
Returns the master identifier used for metrics and kerning data.
Contextual Kerning
Contextual kerning data.
Contextual kerning value for a context key and master, or
NSNotFoundwhen no value is stored.Sets the contextual kerning value for a context key and master.
Removes the contextual kerning value for a context key and master.
Replaces a context key while keeping its master values.
Parses a contextual kerning key into glyph tokens and class tokens.
Kerning Maintenance
Converts redundant glyph kerning to group kerning for a writing direction.
Removes kerning pairs that reference missing glyphs or unused groups.
Sorts the kerning dictionaries into font order.
Replaces a kerning key in selected masters and writing direction.
Moves right-to-left kerning from left-to-right kerning data to right-to-left kerning data.
Returns migrated right-to-left kerning data from a kerning dictionary.
Returns right-to-left kerning converted back into left-to-right kerning data.
Converts imported kerning from glyph names to glyph identifiers.
Layout Features
Layout features used when compiling OpenType feature code.
Number of layout features.
Layout feature at an index, or
nilwhen the index is out of range.Index of a layout feature, or
NSNotFoundwhen the feature is not in the font.Returns the first layout feature with a tag.
Returns the first enabled layout feature with a tag.
Returns the first automatic layout feature with a tag.
Returns the first automatic layout feature with a tag.
Adds a layout feature.
Inserts a layout feature at an index.
Removes a layout feature.
Removes the layout feature at an index.
Replaces the layout feature at an index.
Updates automatic layout features and classes.
Imports OpenType feature code into the font.
Layout Classes
Layout classes in the font.
A mutable array of layout classes.
The number of layout classes.
The layout class at an index.
The index of a layout class, or
NSNotFoundwhen the class is not in the font.The layout class with the specified name.
Adds a layout class.
Adds a layout class parsed from FEA class code.
Inserts a layout class at an index.
Removes a layout class.
Removes the layout class at an index.
Replaces the layout class at an index.
Layout Prefixes
Feature prefixes in the font.
The number of feature prefixes.
The feature prefix at an index.
The feature prefix with the specified name.
Adds a feature prefix.
Inserts a feature prefix at an index.
Removes a feature prefix.
Removes the feature prefix at an index.
Replaces the feature prefix at an index.
Layout Code
Returns the FEA block (feature, class, prefix) matching the given file name.
Adds a feature block to the font, basing the type and title on the file name.
Script and language tags that have layout rules in the compiled temporary font.
Properties
The font info properties stored in the font.
The number of font info properties.
The font info property at an index, or
nilwhen the index is out of range.Returns the index of a font info property, or
NSNotFoundwhen the property is not in the font.The font info property for a property name, or
nilwhen the font has no matching property.The localized font info value for a property name and language tag, or
nilwhen the font has no matching value.The default-language value for a font info property, or
nilwhen the font has no matching value.Sets a font info value for a property name and language tag.
Sets the default-language value for a font info property.
Adds a font info property.
Adds a font info property without undo registration or change notifications.
Inserts a font info property at an index.
Removes a font info property.
Removes the font info property at an index.
The font info property names supported by the font.
The preferred localized family names.
Custom Parameters
Custom parameters stored in the font.
The number of custom parameters.
The custom parameter at an index.
The first custom parameter with a name.
The first active custom parameter with a name.
The value of an active custom parameter.
The Boolean value of an active custom parameter.
The color value of an active custom parameter.
Sets the value of a custom parameter.
Adds a custom parameter.
Inserts a custom parameter at an index.
Removes a custom parameter.
Removes the custom parameter at an index.
Removes the first custom parameter with a name.
- replaceObjectInCustomParametersAtIndex:
withObject: replaceObjectInCustomParametersAtIndex_withObject_ Replaces the custom parameter at an index.
Invalidates cached active custom parameter values.
Colors
The RGB color space used by document colors in the font.
Changes the color space used by document colors in the font.
Returns the given color converted to match the color space of the font.
Passes each document color to the given block and updates it if the block returns a new color.
Color Label
The color label used to organize the font, or
nilif no color label is assigned.A standard color label, or GSLabelColorNoColorGSLabelColorNoColor if the font has a custom color label or no color label.
User Data
Returns user data for a key, or
nilif no value is set.Sets user data for a key.
Removes user data for a key.
Temporary Data
Runtime data stored on the font.
Returns temporary data for a key, or
nilif no value is set.Sets temporary data for a key.
Undo
The undo manager used for font-level changes, or
nilwhen no document provides one.Disables undo registration for the font and its glyphs.
Enables undo registration for the font and its glyphs.
Change Tracking
Reports that a font element changed.
Change keys collected while interface updates are disabled.
Whether automatic glyph name substitution is disabled.
Interface Updates
Defers interface updates and change notifications.
Suppresses interface updates and change notifications.
Processes deferred interface updates and resumes normal update behavior.
Resumes normal update behavior without reporting changes made while updates were disabled.
Returns whether interface updates and change notifications are enabled.
Glyph Locking
Acquires shared read access to the glyph collection.
Releases shared read access to the glyph collection.
Acquires exclusive write access to the glyph collection.
Releases exclusive write access to the glyph collection.
Dependencies
External dependencies required by the font.
Adds or replaces an external dependency.
Removes an external dependency.
File Format
The Glyphs file format version used to read and write the font.
The package type recorded in serialized font data.
The Glyphs app version that last wrote the font.
Filters default-language properties that cannot be represented in legacy formats.
Font info property names used by legacy file formats.
Importing Font Data
Reads editor and file settings from a Glyphs property-list representation.
Stores temporary serialized data for post-read processing.
Completes the font after reading serialized data.
Completes editor-facing state after reading serialized data.
Imports metrics and kerning from Adobe Font Metrics data.
Saving
Saves the font to a file or package.
Saves the font to a file or package using an explicit format and save context.
Creates a save context for a destination and package type.
A property-list representation of the font.
Prepares the font before writing.
A property-list representation of editor and file settings.
Copying and Scaling
Creates a copy of the font with selected glyph and layer data.
Scales the font by a factor.
Instance Properties
Disables automatic component alignment.
Skips compatibility warnings during interpolation and generation.
The original file format version preserved while saving in another format.
The path to the temp font
Instance Methods
Applies glyph-set export parameters from an instance to the receiver.
Finds the longest dot-separated base name of
namethat resolves to a glyph accepted bytest. this is useful for finding glyph info for alternate of PUA glyphs.Recalculates the temp font.
Applies the default settings used when creating or reading a font.
Collects glyph-set export parameters from an instance.
Generates a static font from an instance.
Generates a variable font source from an instance.
Creates a partially initialized font for reading serialized data.
Creates a font by reading its Glyphs file representation.
Interpolates a master for an instance.
Returns the master identifier used as source for hints.
Returns normalized design-space locations for selected masters and Intermediate layers.
Returns normalized design-space locations for masters.
Type Methods
Creates a font containing glyphs with the given names for testing.
Relationships
Inherits From
NSObject
Conforms To
NSCodingNSCopying- GSContainerProtocol
- GSParametersAndPropertiesProtocol
- GSUserDataProtocol
ObjectiveC.NSObjectProtocolSwift.CVarArgSwift.CustomDebugStringConvertibleSwift.CustomStringConvertibleSwift.EquatableSwift.Hashable
Relationships
Inherits From
NSObject
Conforms To
See Also
Essentials
A named glyph and its layer collection in a font.
The drawing and editing representation of a glyph.
GSAxisrepresents an axis in aGSFontobject.